@rededor/cura 0.2.1 → 0.3.1

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 (102) hide show
  1. package/dist/assets/icons/iconset-default-list.ts +1 -1
  2. package/dist/assets/icons/iconset-default.svg +1 -1
  3. package/dist/cjs/app-globals-5f5b9fbf.js +398 -0
  4. package/dist/cjs/cura-display_5.cjs.entry.js +261 -0
  5. package/dist/cjs/cura.cjs.js +3 -3
  6. package/dist/cjs/{index-9092c64d.js → index-8686299e.js} +29 -0
  7. package/dist/cjs/loader.cjs.js +3 -3
  8. package/dist/collection/api/cura-api.js +10 -1
  9. package/dist/collection/api/modules/cura-theme-colors-module.js +69 -0
  10. package/dist/collection/api/modules/cura-theme-fonts-module.js +35 -0
  11. package/dist/collection/api/modules/cura-theme-module.js +4 -0
  12. package/dist/collection/api/theme-presets/static.js +103 -0
  13. package/dist/collection/api/theme-presets/theme-default.js +28 -22
  14. package/dist/collection/api/theme-presets/theme-maternity.js +10 -12
  15. package/dist/collection/assets/icons/iconset-default-list.js +1 -1
  16. package/dist/collection/assets/icons/iconset-default.svg +1 -1
  17. package/dist/collection/assets-raw/icons/default/facebook.svg +3 -0
  18. package/dist/collection/assets-raw/icons/default/google.svg +3 -0
  19. package/dist/collection/assets-raw/icons/default/instagram.svg +5 -0
  20. package/dist/collection/assets-raw/icons/default/lattes.svg +3 -0
  21. package/dist/collection/assets-raw/icons/default/likeHand.svg +4 -0
  22. package/dist/collection/assets-raw/icons/default/linkedin.svg +5 -0
  23. package/dist/collection/assets-raw/icons/default/twitter.svg +3 -0
  24. package/dist/collection/assets-raw/icons/default/unlikeHand.svg +4 -0
  25. package/dist/collection/assets-raw/icons/default/whatsapp.svg +4 -0
  26. package/dist/collection/assets-raw/icons/default/youtube.svg +4 -0
  27. package/dist/collection/collection-manifest.json +3 -1
  28. package/dist/collection/components/cura-icon/cura-icon.css +1 -43
  29. package/dist/collection/components/cura-icon/cura-icon.js +15 -12
  30. package/dist/collection/components/cura-icons-view/cura-icons-view.js +1 -1
  31. package/dist/collection/components/text/cura-display/cura-display.css +61 -0
  32. package/dist/collection/components/text/cura-display/cura-display.js +110 -0
  33. package/dist/collection/components/text/cura-heading/cura-heading.css +69 -0
  34. package/dist/collection/components/text/cura-heading/cura-heading.js +136 -0
  35. package/dist/collection/components/text/cura-paragraph/cura-paragraph.css +81 -0
  36. package/dist/collection/components/text/cura-paragraph/cura-paragraph.js +76 -0
  37. package/dist/components/{dummy-component.d.ts → cura-display.d.ts} +4 -4
  38. package/dist/components/cura-display.js +86 -0
  39. package/dist/components/cura-heading.d.ts +11 -0
  40. package/dist/components/cura-heading.js +95 -0
  41. package/dist/components/cura-icon2.js +12 -13
  42. package/dist/components/cura-icons-view.js +2 -2
  43. package/dist/components/cura-paragraph.d.ts +11 -0
  44. package/dist/components/cura-paragraph.js +69 -0
  45. package/dist/components/index.d.ts +3 -1
  46. package/dist/components/index.js +261 -36
  47. package/dist/cura/cura.esm.js +1 -1
  48. package/dist/cura/cura.js +1 -1
  49. package/dist/cura/p-265c1706.js +1 -0
  50. package/dist/cura/p-3d8bbf37.system.js +1 -0
  51. package/dist/cura/p-a50716bc.js +2 -0
  52. package/dist/cura/p-a8dcaaed.system.js +1 -0
  53. package/dist/cura/p-e447016d.system.js +2 -0
  54. package/dist/cura/p-fc50b109.system.entry.js +1 -0
  55. package/dist/cura/p-fc80cb18.entry.js +1 -0
  56. package/dist/esm/app-globals-d7dd3a4d.js +396 -0
  57. package/dist/esm/cura-display_5.entry.js +253 -0
  58. package/dist/esm/cura.js +3 -3
  59. package/dist/esm/{index-cec9b650.js → index-c3d31886.js} +29 -0
  60. package/dist/esm/loader.js +3 -3
  61. package/dist/esm-es5/app-globals-d7dd3a4d.js +1 -0
  62. package/dist/esm-es5/cura-display_5.entry.js +1 -0
  63. package/dist/esm-es5/cura.js +1 -1
  64. package/dist/esm-es5/index-c3d31886.js +2 -0
  65. package/dist/esm-es5/loader.js +1 -1
  66. package/dist/types/api/cura-api.type.d.ts +9 -0
  67. package/dist/types/api/modules/cura-theme-colors-module.d.ts +48 -0
  68. package/dist/types/api/modules/cura-theme-fonts-module.d.ts +24 -0
  69. package/dist/types/api/modules/cura-theme-module.d.ts +4 -0
  70. package/dist/types/api/theme-presets/static.d.ts +78 -0
  71. package/dist/types/api/theme-presets/theme-default.d.ts +28 -22
  72. package/dist/types/api/theme-presets/theme-maternity.d.ts +23 -19
  73. package/dist/types/api/theme-presets/theme-presets.d.ts +51 -41
  74. package/dist/types/components/cura-icon/cura-icon.d.ts +1 -1
  75. package/dist/types/components/text/cura-display/cura-display.d.ts +28 -0
  76. package/dist/types/components/text/cura-heading/cura-heading.d.ts +33 -0
  77. package/dist/types/components/text/cura-paragraph/cura-paragraph.d.ts +22 -0
  78. package/dist/types/components.d.ts +83 -9
  79. package/package.json +2 -2
  80. package/dist/cjs/app-globals-af978331.js +0 -175
  81. package/dist/cjs/cura-icon_2.cjs.entry.js +0 -81
  82. package/dist/cjs/dummy-component.cjs.entry.js +0 -19
  83. package/dist/collection/components/dummy-component/dummy-component.css +0 -3
  84. package/dist/collection/components/dummy-component/dummy-component.js +0 -18
  85. package/dist/components/dummy-component.js +0 -33
  86. package/dist/cura/p-18f978f3.system.entry.js +0 -1
  87. package/dist/cura/p-3132f4b7.system.js +0 -2
  88. package/dist/cura/p-5f113376.entry.js +0 -1
  89. package/dist/cura/p-70abb532.system.js +0 -1
  90. package/dist/cura/p-a0cd4b75.system.js +0 -1
  91. package/dist/cura/p-abcda1d1.js +0 -2
  92. package/dist/cura/p-ac79f9d1.entry.js +0 -1
  93. package/dist/cura/p-b4c69836.system.entry.js +0 -1
  94. package/dist/cura/p-d2dcd470.js +0 -1
  95. package/dist/esm/app-globals-962e5cc3.js +0 -173
  96. package/dist/esm/cura-icon_2.entry.js +0 -76
  97. package/dist/esm/dummy-component.entry.js +0 -15
  98. package/dist/esm-es5/app-globals-962e5cc3.js +0 -1
  99. package/dist/esm-es5/cura-icon_2.entry.js +0 -1
  100. package/dist/esm-es5/dummy-component.entry.js +0 -1
  101. package/dist/esm-es5/index-cec9b650.js +0 -2
  102. package/dist/types/components/dummy-component/dummy-component.d.ts +0 -3
@@ -0,0 +1,2 @@
1
+ var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r))e[r]=t[r]};return e(t,r)};return function(t,r){if(typeof r!=="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();var __awaiter=this&&this.__awaiter||function(e,t,r,n){function a(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,i){function l(e){try{o(n.next(e))}catch(e){i(e)}}function s(e){try{o(n["throw"](e))}catch(e){i(e)}}function o(e){e.done?r(e.value):a(e.value).then(l,s)}o((n=n.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,a,i,l;return l={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(l[Symbol.iterator]=function(){return this}),l;function s(e){return function(t){return o([e,t])}}function o(l){if(n)throw new TypeError("Generator is already executing.");while(r)try{if(n=1,a&&(i=l[0]&2?a["return"]:l[0]?a["throw"]||((i=a["return"])&&i.call(a),0):a.next)&&!(i=i.call(a,l[1])).done)return i;if(a=0,i)l=[l[0]&2,i.value];switch(l[0]){case 0:case 1:i=l;break;case 4:r.label++;return{value:l[1],done:false};case 5:r.label++;a=l[1];l=[0];continue;case 7:l=r.ops.pop();r.trys.pop();continue;default:if(!(i=r.trys,i=i.length>0&&i[i.length-1])&&(l[0]===6||l[0]===2)){r=0;continue}if(l[0]===3&&(!i||l[1]>i[0]&&l[1]<i[3])){r.label=l[1];break}if(l[0]===6&&r.label<i[1]){r.label=i[1];i=l;break}if(i&&r.label<i[2]){r.label=i[2];r.ops.push(l);break}if(i[2])r.ops.pop();r.trys.pop();continue}l=t.call(e,r)}catch(e){l=[6,e];a=0}finally{n=i=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(e,t,r){if(r||arguments.length===2)for(var n=0,a=t.length,i;n<a;n++){if(i||!(n in t)){if(!i)i=Array.prototype.slice.call(t,0,n);i[n]=t[n]}}return e.concat(i||Array.prototype.slice.call(t))};System.register([],(function(e,t){"use strict";return{execute:function(){var r=this;var n="cura";var a;var i;var l=false;var s=false;var o=function(e,t){if(t===void 0){t=""}{return function(){return}}};var f=function(e,t){{return function(){return}}};var u="{visibility:hidden}.hydrated{visibility:inherit}";var c="http://www.w3.org/1999/xlink";var $={};var v="http://www.w3.org/2000/svg";var h="http://www.w3.org/1999/xhtml";var p=function(e){return e!=null};var d=function(e){e=typeof e;return e==="object"||e==="function"};var m=e("h",(function(e,t){var r=[];for(var n=2;n<arguments.length;n++){r[n-2]=arguments[n]}var a=null;var i=false;var l=false;var s=[];var o=function(t){for(var r=0;r<t.length;r++){a=t[r];if(Array.isArray(a)){o(a)}else if(a!=null&&typeof a!=="boolean"){if(i=typeof e!=="function"&&!d(a)){a=String(a)}if(i&&l){s[s.length-1].$text$+=a}else{s.push(i?g(null,a):a)}l=i}}};o(r);if(t){{var f=t.className||t.class;if(f){t.class=typeof f!=="object"?f:Object.keys(f).filter((function(e){return f[e]})).join(" ")}}}var u=g(e,null);u.$attrs$=t;if(s.length>0){u.$children$=s}return u}));var g=function(e,t){var r={$flags$:0,$tag$:e,$text$:t,$elm$:null,$children$:null};{r.$attrs$=null}return r};var y=e("H",{});var w=function(e){return e&&e.$tag$===y};var b=function(e,t){if(e!=null&&!d(e)){if(t&4){return e==="false"?false:e===""||!!e}if(t&2){return parseFloat(e)}if(t&1){return String(e)}return e}return e};var _=e("g",(function(e){return ie(e).$hostElement$}));var S=function(e,t,r){var n=pe.ce(t,r);e.dispatchEvent(n);return n};var N=new WeakMap;var R=function(e,t,r){var n=$e.get(e);if(me&&r){n=n||new CSSStyleSheet;if(typeof n==="string"){n=t}else{n.replaceSync(t)}}else{n=t}$e.set(e,n)};var x=function(e,t,r,n){var a=C(t);var i=$e.get(a);e=e.nodeType===11?e:he;if(i){if(typeof i==="string"){e=e.head||e;var l=N.get(e);var s=void 0;if(!l){N.set(e,l=new Set)}if(!l.has(a)){{{s=he.createElement("style");s.innerHTML=i}e.insertBefore(s,e.querySelector("link"))}if(l){l.add(a)}}}else if(!e.adoptedStyleSheets.includes(i)){e.adoptedStyleSheets=__spreadArray(__spreadArray([],e.adoptedStyleSheets,true),[i],false)}}return a};var j=function(e){var t=e.$cmpMeta$;var r=e.$hostElement$;var n=t.$flags$;var a=o("attachStyles",t.$tagName$);var i=x(r.shadowRoot?r.shadowRoot:r.getRootNode(),t);if(n&10){r["s-sc"]=i;r.classList.add(i+"-h")}a()};var C=function(e,t){return"sc-"+e.$tagName$};var E=function(e,t,r,n,a,i){if(r!==n){var l=oe(e,t);var s=t.toLowerCase();if(t==="class"){var o=e.classList;var f=A(r);var u=A(n);o.remove.apply(o,f.filter((function(e){return e&&!u.includes(e)})));o.add.apply(o,u.filter((function(e){return e&&!f.includes(e)})))}else if(t==="style"){{for(var $ in r){if(!n||n[$]==null){if($.includes("-")){e.style.removeProperty($)}else{e.style[$]=""}}}}for(var $ in n){if(!r||n[$]!==r[$]){if($.includes("-")){e.style.setProperty($,n[$])}else{e.style[$]=n[$]}}}}else if(!l&&t[0]==="o"&&t[1]==="n"){if(t[2]==="-"){t=t.slice(3)}else if(oe(ve,s)){t=s.slice(2)}else{t=s[2]+t.slice(3)}if(r){pe.rel(e,t,r,false)}if(n){pe.ael(e,t,n,false)}}else{var v=d(n);if((l||v&&n!==null)&&!a){try{if(!e.tagName.includes("-")){var h=n==null?"":n;if(t==="list"){l=false}else if(r==null||e[t]!=h){e[t]=h}}else{e[t]=n}}catch(e){}}var p=false;{if(s!==(s=s.replace(/^xlink\:?/,""))){t=s;p=true}}if(n==null||n===false){if(n!==false||e.getAttribute(t)===""){if(p){e.removeAttributeNS(c,t)}else{e.removeAttribute(t)}}}else if((!l||i&4||a)&&!v){n=n===true?"":n;if(p){e.setAttributeNS(c,t,n)}else{e.setAttribute(t,n)}}}}};var k=/\s/;var A=function(e){return!e?[]:e.split(k)};var M=function(e,t,r,n){var a=t.$elm$.nodeType===11&&t.$elm$.host?t.$elm$.host:t.$elm$;var i=e&&e.$attrs$||$;var l=t.$attrs$||$;{for(n in i){if(!(n in l)){E(a,n,i[n],undefined,r,t.$flags$)}}}for(n in l){E(a,n,i[n],l[n],r,t.$flags$)}};var O=function(e,t,r,n){var i=t.$children$[r];var s=0;var o;var f;if(i.$text$!==null){o=i.$elm$=he.createTextNode(i.$text$)}else{if(!l){l=i.$tag$==="svg"}o=i.$elm$=he.createElementNS(l?v:h,i.$tag$);if(l&&i.$tag$==="foreignObject"){l=false}{M(null,i,l)}if(p(a)&&o["s-si"]!==a){o.classList.add(o["s-si"]=a)}if(i.$children$){for(s=0;s<i.$children$.length;++s){f=O(e,i,s);if(f){o.appendChild(f)}}}{if(i.$tag$==="svg"){l=false}else if(o.tagName==="foreignObject"){l=true}}}return o};var P=function(e,t,r,n,a,l){var s=e;var o;if(s.shadowRoot&&s.tagName===i){s=s.shadowRoot}for(;a<=l;++a){if(n[a]){o=O(null,r,a);if(o){n[a].$elm$=o;s.insertBefore(o,t)}}}};var T=function(e,t,r,n,a){for(;t<=r;++t){if(n=e[t]){a=n.$elm$;a.remove()}}};var L=function(e,t,r,n){var a=0;var i=0;var l=t.length-1;var s=t[0];var o=t[l];var f=n.length-1;var u=n[0];var c=n[f];var $;while(a<=l&&i<=f){if(s==null){s=t[++a]}else if(o==null){o=t[--l]}else if(u==null){u=n[++i]}else if(c==null){c=n[--f]}else if(I(s,u)){B(s,u);s=t[++a];u=n[++i]}else if(I(o,c)){B(o,c);o=t[--l];c=n[--f]}else if(I(s,c)){B(s,c);e.insertBefore(s.$elm$,o.$elm$.nextSibling);s=t[++a];c=n[--f]}else if(I(o,u)){B(o,u);e.insertBefore(o.$elm$,s.$elm$);o=t[--l];u=n[++i]}else{{$=O(t&&t[i],r,i);u=n[++i]}if($){{s.$elm$.parentNode.insertBefore($,s.$elm$)}}}}if(a>l){P(e,n[f+1]==null?null:n[f+1].$elm$,r,n,i,f)}else if(i>f){T(t,a,l)}};var I=function(e,t){if(e.$tag$===t.$tag$){return true}return false};var B=function(e,t){var r=t.$elm$=e.$elm$;var n=e.$children$;var a=t.$children$;var i=t.$tag$;var s=t.$text$;if(s===null){{l=i==="svg"?true:i==="foreignObject"?false:l}{if(i==="slot");else{M(e,t,l)}}if(n!==null&&a!==null){L(r,n,t,a)}else if(a!==null){if(e.$text$!==null){r.textContent=""}P(r,null,t,a,0,a.length-1)}else if(n!==null){T(n,0,n.length-1)}if(l&&i==="svg"){l=false}}else if(e.$text$!==s){r.data=s}};var z=function(e,t){var r=e.$hostElement$;var n=e.$cmpMeta$;var l=e.$vnode$||g(null,null);var s=w(t)?t:m(null,null,t);i=r.tagName;if(n.$attrsToReflect$){s.$attrs$=s.$attrs$||{};n.$attrsToReflect$.map((function(e){var t=e[0],n=e[1];return s.$attrs$[n]=r[t]}))}s.$tag$=null;s.$flags$|=4;e.$vnode$=s;s.$elm$=l.$elm$=r.shadowRoot||r;{a=r["s-sc"]}B(l,s)};var U=function(e,t){if(t&&!e.$onRenderResolve$&&t["s-p"]){t["s-p"].push(new Promise((function(t){return e.$onRenderResolve$=t})))}};var H=function(e,t){{e.$flags$|=16}if(e.$flags$&4){e.$flags$|=512;return}U(e,e.$ancestorComponent$);var r=function(){return V(e,t)};return Ne(r)};var V=function(e,t){var r=o("scheduleUpdate",e.$cmpMeta$.$tagName$);var n=e.$lazyInstance$;var a;r();return J(a,(function(){return q(e,n,t)}))};var q=function(e,t,n){return __awaiter(r,void 0,void 0,(function(){var r,a,i,l,s,f;return __generator(this,(function(u){r=e.$hostElement$;a=o("update",e.$cmpMeta$.$tagName$);i=r["s-rc"];if(n){j(e)}l=o("render",e.$cmpMeta$.$tagName$);{F(e,t)}if(i){i.map((function(e){return e()}));r["s-rc"]=undefined}l();a();{s=r["s-p"];f=function(){return W(e)};if(s.length===0){f()}else{Promise.all(s).then(f);e.$flags$|=4;s.length=0}}return[2]}))}))};var F=function(e,t,r){try{t=t.render();{e.$flags$&=~16}{e.$flags$|=2}{{{z(e,t)}}}}catch(t){fe(t,e.$hostElement$)}return null};var W=function(e){var t=e.$cmpMeta$.$tagName$;var r=e.$hostElement$;var n=o("postUpdate",t);var a=e.$ancestorComponent$;if(!(e.$flags$&64)){e.$flags$|=64;{K(r)}n();{e.$onReadyResolve$(r);if(!a){G()}}}else{n()}{if(e.$onRenderResolve$){e.$onRenderResolve$();e.$onRenderResolve$=undefined}if(e.$flags$&512){Se((function(){return H(e,false)}))}e.$flags$&=~(4|512)}};var G=function(e){{K(he.documentElement)}Se((function(){return S(ve,"appload",{detail:{namespace:n}})}))};var D=function(e,t,r){if(e&&e[t]){try{return e[t](r)}catch(e){fe(e)}}return undefined};var J=function(e,t){return e&&e.then?e.then(t):t()};var K=function(e){return e.classList.add("hydrated")};var Q=function(e,t){return ie(e).$instanceValues$.get(t)};var X=function(e,t,r,n){var a=ie(e);var i=a.$hostElement$;var l=a.$instanceValues$.get(t);var s=a.$flags$;var o=a.$lazyInstance$;r=b(r,n.$members$[t][0]);var f=Number.isNaN(l)&&Number.isNaN(r);var u=r!==l&&!f;if((!(s&8)||l===undefined)&&u){a.$instanceValues$.set(t,r);if(o){if(n.$watchers$&&s&128){var c=n.$watchers$[t];if(c){c.map((function(e){try{o[e](r,l,t)}catch(e){fe(e,i)}}))}}if((s&(2|16))===2){H(a,false)}}}};var Y=function(e,t,r){if(t.$members$){if(e.watchers){t.$watchers$=e.watchers}var n=Object.entries(t.$members$);var a=e.prototype;n.map((function(e){var n=e[0],i=e[1][0];if(i&31||r&2&&i&32){Object.defineProperty(a,n,{get:function(){return Q(this,n)},set:function(e){X(this,n,e,t)},configurable:true,enumerable:true})}}));if(r&1){var i=new Map;a.attributeChangedCallback=function(e,t,r){var n=this;pe.jmp((function(){var t=i.get(e);if(n.hasOwnProperty(t)){r=n[t];delete n[t]}else if(a.hasOwnProperty(t)&&typeof n[t]==="number"&&n[t]==r){return}n[t]=r===null&&typeof n[t]==="boolean"?false:r}))};e.observedAttributes=n.filter((function(e){var t=e[0],r=e[1];return r[0]&15})).map((function(e){var r=e[0],n=e[1];var a=n[1]||r;i.set(a,r);if(n[0]&512){t.$attrsToReflect$.push([r,a])}return a}))}}return e};var Z=function(e,t,n,a,i){return __awaiter(r,void 0,void 0,(function(){var e,r,a,l,s,u,c;return __generator(this,(function($){switch($.label){case 0:if(!((t.$flags$&32)===0))return[3,3];t.$flags$|=32;i=ce(n);if(!i.then)return[3,2];e=f();return[4,i];case 1:i=$.sent();e();$.label=2;case 2:if(!i.isProxied){{n.$watchers$=i.watchers}Y(i,n,2);i.isProxied=true}r=o("createInstance",n.$tagName$);{t.$flags$|=8}try{new i(t)}catch(e){fe(e)}{t.$flags$&=~8}{t.$flags$|=128}r();ee(t.$lazyInstance$);if(i.style){a=i.style;l=C(n);if(!$e.has(l)){s=o("registerStyles",n.$tagName$);R(l,a,!!(n.$flags$&1));s()}}$.label=3;case 3:u=t.$ancestorComponent$;c=function(){return H(t,true)};if(u&&u["s-rc"]){u["s-rc"].push(c)}else{c()}return[2]}}))}))};var ee=function(e){{D(e,"connectedCallback")}};var te=function(e){if((pe.$flags$&1)===0){var t=ie(e);var r=t.$cmpMeta$;var n=o("connectedCallback",r.$tagName$);if(!(t.$flags$&1)){t.$flags$|=1;{var a=e;while(a=a.parentNode||a.host){if(a["s-p"]){U(t,t.$ancestorComponent$=a);break}}}if(r.$members$){Object.entries(r.$members$).map((function(t){var r=t[0],n=t[1][0];if(n&31&&e.hasOwnProperty(r)){var a=e[r];delete e[r];e[r]=a}}))}{Z(e,t,r)}}else{ee(t.$lazyInstance$)}n()}};var re=function(e){if((pe.$flags$&1)===0){ie(e)}};var ne=e("b",(function(e,t){if(t===void 0){t={}}var r=o();var n=[];var a=t.exclude||[];var i=ve.customElements;var l=he.head;var s=l.querySelector("meta[charset]");var f=he.createElement("style");var c=[];var $;var v=true;Object.assign(pe,t);pe.$resourcesUrl$=new URL(t.resourcesUrl||"./",he.baseURI).href;e.map((function(e){e[1].map((function(t){var r={$flags$:t[0],$tagName$:t[1],$members$:t[2],$listeners$:t[3]};{r.$members$=t[2]}{r.$attrsToReflect$=[]}{r.$watchers$={}}var l=r.$tagName$;var s=function(e){__extends(t,e);function t(t){var n=e.call(this,t)||this;t=n;se(t,r);if(r.$flags$&1){{{t.attachShadow({mode:"open"})}}}return n}t.prototype.connectedCallback=function(){var e=this;if($){clearTimeout($);$=null}if(v){c.push(this)}else{pe.jmp((function(){return te(e)}))}};t.prototype.disconnectedCallback=function(){var e=this;pe.jmp((function(){return re(e)}))};t.prototype.componentOnReady=function(){return ie(this).$onReadyPromise$};return t}(HTMLElement);r.$lazyBundleId$=e[0];if(!a.includes(l)&&!i.get(l)){n.push(l);i.define(l,Y(s,r,1))}}))}));{f.innerHTML=n+u;f.setAttribute("data-styles","");l.insertBefore(f,s?s.nextSibling:l.firstChild)}v=false;if(c.length){c.map((function(e){return e.connectedCallback()}))}else{{pe.jmp((function(){return $=setTimeout(G,30)}))}}r()}));var ae=new WeakMap;var ie=function(e){return ae.get(e)};var le=e("r",(function(e,t){return ae.set(t.$lazyInstance$=e,t)}));var se=function(e,t){var r={$flags$:0,$hostElement$:e,$cmpMeta$:t,$instanceValues$:new Map};{r.$onReadyPromise$=new Promise((function(e){return r.$onReadyResolve$=e}));e["s-p"]=[];e["s-rc"]=[]}return ae.set(e,r)};var oe=function(e,t){return t in e};var fe=function(e,t){return(0,console.error)(e,t)};var ue=new Map;var ce=function(e,r,n){var a=e.$tagName$.replace(/-/g,"_");var i=e.$lazyBundleId$;var l=ue.get(i);if(l){return l[a]}
2
+ /*!__STENCIL_STATIC_IMPORT_SWITCH__*/return t.import("./".concat(i,".entry.js").concat("")).then((function(e){{ue.set(i,e)}return e[a]}),fe)};var $e=new Map;var ve=typeof window!=="undefined"?window:{};var he=ve.document||{head:{}};var pe={$flags$:0,$resourcesUrl$:"",jmp:function(e){return e()},raf:function(e){return requestAnimationFrame(e)},ael:function(e,t,r,n){return e.addEventListener(t,r,n)},rel:function(e,t,r,n){return e.removeEventListener(t,r,n)},ce:function(e,t){return new CustomEvent(e,t)}};var de=e("p",(function(e){return Promise.resolve(e)}));var me=function(){try{new CSSStyleSheet;return typeof(new CSSStyleSheet).replaceSync==="function"}catch(e){}return false}();var ge=[];var ye=[];var we=function(e,t){return function(r){e.push(r);if(!s){s=true;if(t&&pe.$flags$&4){Se(_e)}else{pe.raf(_e)}}}};var be=function(e){for(var t=0;t<e.length;t++){try{e[t](performance.now())}catch(e){fe(e)}}e.length=0};var _e=function(){be(ge);{be(ye);if(s=ge.length>0){pe.raf(_e)}}};var Se=function(e){return de().then(e)};var Ne=we(ye,true)}}}));
@@ -0,0 +1 @@
1
+ System.register(["./p-e447016d.system.js"],(function(t){"use strict";var e,s,o,i;return{setters:[function(t){e=t.r;s=t.h;o=t.H;i=t.g}],execute:function(){var l=":host{display:block;font-size:var(--font-size);text-transform:uppercase}:host h1,:host h2,:host h3,:host h4,:host h5,:host h6{font-family:var(--font-family);font-size:4.285em;font-weight:var(--font-weight-black);color:var(--color-body);line-height:120%;letter-spacing:-4%}:host h1.large,:host h2.large,:host h3.large,:host h4.large,:host h5.large,:host h6.large{font-size:6.21em}:host h1.small,:host h2.small,:host h3.small,:host h4.small,:host h5.small,:host h6.small{font-size:3em;font-weight:var(--font-weight-bold)}@media screen and (min-width: 768px) and (max-width: 1366px){:host h1,:host h2,:host h3,:host h4,:host h5,:host h6{font-size:4.92em}:host h1.large,:host h2.large,:host h3.large,:host h4.large,:host h5.large,:host h6.large{font-size:7.07em}:host h1.small,:host h2.small,:host h3.small,:host h4.small,:host h5.small,:host h6.small{font-size:3.428em}}@media screen and (min-width: 1367px){:host h1,:host h2,:host h3,:host h4,:host h5,:host h6{font-size:6.14em;line-height:125%}:host h1.large,:host h2.large,:host h3.large,:host h4.large,:host h5.large,:host h6.large{font-size:8.857em;letter-spacing:-6%}:host h1.small,:host h2.small,:host h3.small,:host h4.small,:host h5.small,:host h6.small{font-size:4.285em;letter-spacing:-2%}}:host ::slotted(b),:host ::slotted(strong){font-weight:var(--font-weight-bold)}:host ::slotted(a){font-weight:var(--font-weight-bold);color:var(--color-link);text-decoration:none;text-underline-offset:10%;cursor:pointer}:host ::slotted(abbr){color:var(--color-link);-webkit-text-decoration:underline dashed 1px var(--color-link);text-decoration:underline dashed 1px var(--color-link);text-underline-offset:10%;cursor:default}";var r=t("cura_display",function(){function t(t){e(this,t);this.level=1;this.size="regular"}t.prototype.connectedCallback=function(){this.weights=window.CuraAPI.theme.fonts.getWeights();this.setFontProperties();this.setColors()};t.prototype.getClasses=function(){var t={};t[this.size.toLowerCase()]=true;return t};t.prototype.setFontProperties=function(){this.styles={"--font-family":window.CuraAPI.theme.fonts.getFamily("display"),"--font-size":window.CuraAPI.theme.fonts.getSize(),"--font-weight-bold":this.weights.bold,"--font-weight-black":this.weights.black};this.setHostProperty("--font-size",window.CuraAPI.theme.fonts.getSize())};t.prototype.setColors=function(){var t=window.CuraAPI.theme.fonts.getColor();this.styles["--color-body"]=t||window.CuraAPI.theme.colors.getColor("neutral-darker");this.styles["--color-link"]=window.CuraAPI.theme.colors.getColor("primary-700")};t.prototype.setHostProperty=function(t,e){this.host.style.setProperty(t,e)};t.prototype.getHeadingTag=function(){var t={1:s("h1",{style:this.styles,class:this.getClasses()},s("slot",null)),2:s("h2",{style:this.styles,class:this.getClasses()},s("slot",null)),3:s("h3",{style:this.styles,class:this.getClasses()},s("slot",null)),4:s("h4",{style:this.styles,class:this.getClasses()},s("slot",null)),5:s("h5",{style:this.styles,class:this.getClasses()},s("slot",null)),6:s("h6",{style:this.styles,class:this.getClasses()},s("slot",null)),default:s("h1",{style:this.styles,class:this.getClasses()},s("slot",null))};return t["".concat(this.level)]||t["default"]};t.prototype.render=function(){return s(o,null,this.getHeadingTag())};Object.defineProperty(t.prototype,"host",{get:function(){return i(this)},enumerable:false,configurable:true});return t}());r.style=l;var n=":host{display:block;font-size:var(--font-size)}:host h1,:host h2,:host h3,:host h4,:host h5,:host h6{font-family:var(--font-family);font-size:1.71em;font-weight:var(--font-weight-regular);color:var(--color-body);line-height:130%;letter-spacing:0%}:host h1.bold-weight,:host h2.bold-weight,:host h3.bold-weight,:host h4.bold-weight,:host h5.bold-weight,:host h6.bold-weight{font-weight:var(--font-weight-medium)}:host h1.large,:host h2.large,:host h3.large,:host h4.large,:host h5.large,:host h6.large{font-size:2.07em;letter-spacing:-2%}:host h1.small,:host h2.small,:host h3.small,:host h4.small,:host h5.small,:host h6.small{font-size:1.214em;line-height:150%;letter-spacing:0%}:host h1.small.bold-weight,:host h2.small.bold-weight,:host h3.small.bold-weight,:host h4.small.bold-weight,:host h5.small.bold-weight,:host h6.small.bold-weight{font-weight:var(--font-weight-bold)}@media screen and (min-width: 768px) and (max-width: 1366px){:host h1,:host h2,:host h3,:host h4,:host h5,:host h6{font-size:2em}:host h1.large,:host h2.large,:host h3.large,:host h4.large,:host h5.large,:host h6.large{font-size:2.357em}:host h1.small,:host h2.small,:host h3.small,:host h4.small,:host h5.small,:host h6.small{font-size:1.357em}}@media screen and (min-width: 1367px){:host h1,:host h2,:host h3,:host h4,:host h5,:host h6{font-size:2.5em;line-height:135%;letter-spacing:-2%}:host h1.large,:host h2.large,:host h3.large,:host h4.large,:host h5.large,:host h6.large{font-size:2.92em}:host h1.small,:host h2.small,:host h3.small,:host h4.small,:host h5.small,:host h6.small{font-size:1.71em;line-height:160%;letter-spacing:0%}}:host ::slotted(b),:host ::slotted(strong){font-weight:var(--font-weight-bold)}:host ::slotted(a){font-weight:var(--font-weight-bold);color:var(--color-link);text-decoration:none;text-underline-offset:10%;cursor:pointer}:host ::slotted(abbr){color:var(--color-link);-webkit-text-decoration:underline dashed 1px var(--color-link);text-decoration:underline dashed 1px var(--color-link);text-underline-offset:10%;cursor:default}";var h=t("cura_heading",function(){function t(t){e(this,t);this.level=1;this.size="regular";this.weight="regular"}t.prototype.connectedCallback=function(){this.weights=window.CuraAPI.theme.fonts.getWeights();this.setFontProperties();this.setColors()};t.prototype.getClasses=function(){var t={};t[this.size.toLowerCase()]=true;t["".concat(this.weight.toLowerCase(),"-weight")]=true;return t};t.prototype.setFontProperties=function(){this.styles={"--font-family":window.CuraAPI.theme.fonts.getFamily("heading"),"--font-size":window.CuraAPI.theme.fonts.getSize(),"--font-weight-regular":this.weights.regular,"--font-weight-medium":this.weights.medium,"--font-weight-bold":this.weights.bold,"--font-weight-black":this.weights.black};this.setHostProperty("--font-size",window.CuraAPI.theme.fonts.getSize())};t.prototype.setColors=function(){var t=window.CuraAPI.theme.fonts.getColor();this.styles["--color-body"]=t||window.CuraAPI.theme.colors.getColor("neutral-darker");this.styles["--color-link"]=window.CuraAPI.theme.colors.getColor("primary-700")};t.prototype.setHostProperty=function(t,e){this.host.style.setProperty(t,e)};t.prototype.getHeadingTag=function(){var t={1:s("h1",{style:this.styles,class:this.getClasses()},s("slot",null)),2:s("h2",{style:this.styles,class:this.getClasses()},s("slot",null)),3:s("h3",{style:this.styles,class:this.getClasses()},s("slot",null)),4:s("h4",{style:this.styles,class:this.getClasses()},s("slot",null)),5:s("h5",{style:this.styles,class:this.getClasses()},s("slot",null)),6:s("h6",{style:this.styles,class:this.getClasses()},s("slot",null)),default:s("h1",{style:this.styles,class:this.getClasses()},s("slot",null))};return t["".concat(this.level)]||t["default"]};t.prototype.render=function(){return s(o,null,this.getHeadingTag())};Object.defineProperty(t.prototype,"host",{get:function(){return i(this)},enumerable:false,configurable:true});return t}());h.style=n;var a=":host{width:var(--size);height:var(--size)}:host svg{display:inline-block;stroke:var(--color);width:var(--size);height:var(--size);stroke-width:var(--stroke);fill:none}";var c=t("cura_icon",function(){function t(t){e(this,t);this.name="";this.color="neutral-base";this.iconset="default";this.disabled=false;this.sizes={128:{size:128,stroke:5.25},72:{size:72,stroke:3.5},64:{size:64,stroke:3.25},48:{size:48,stroke:2.75},40:{size:40,stroke:2.5},32:{size:32,stroke:2.25},24:{size:24,stroke:2},20:{size:20,stroke:1.75},16:{size:16,stroke:1.5},default:{size:24,stroke:2}}}t.prototype.sizeHandler=function(t){var e=this;var s=function(t){return"".concat(e.sizes[t].stroke*(e.sizes.default.size/e.sizes[t].size),"px")};this.setHostProperty("--size",this.sizes["".concat(t)]?"".concat(this.sizes[t].size,"px"):"".concat(this.sizes.default.size,"px"));this.setHostProperty("--stroke",this.sizes["".concat(t)]?s(t):s("default"))};t.prototype.colorHandler=function(){this.setHostProperty("--color",window.CuraAPI.theme.colors.getColor(this.disabled?"neutral-light":this.color))};t.prototype.connectedCallback=function(){this.assetsPath=window.CuraAPI.localAssetsPath;this.sizeHandler(this.size);this.colorHandler()};t.prototype.setHostProperty=function(t,e){this.host.style.setProperty(t,e)};t.prototype.render=function(){return s(o,null,s("svg",{version:"1.1",viewBox:"0 0 24 24",preserveAspectRatio:"xMidYMid meet",xmlns:"http://www.w3.org/2000/svg"},s("use",{xlinkHref:"".concat(this.assetsPath,"/icons/iconset-").concat(this.iconset,".svg#").concat(this.name)})))};Object.defineProperty(t.prototype,"host",{get:function(){return i(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{size:["sizeHandler"],color:["colorHandler"],disabled:["colorHandler"]}},enumerable:false,configurable:true});return t}());c.style=a;var g=["360","accessibility","alertCircle","alertTriangle","arrowDown","arrowDownCircle","arrowLeft","arrowLeftCircle","arrowRight","arrowRightCircle","arrowUp","arrowUpCircle","attach","avatarF","avatarM","biometry","bloodGroup","calendar","cam","camOff","central","chatCircle","check","checkBadge","checkCircle","checkDouble","clock","close","closeCircle","collapse","config","delete","desktop","deslike","download","duplicate","edit","exam","expand","facebook","fileBmp","fileJpg","filePdf","filePng","fileUpload","fileXls","filter","fullscreen","gallery","geotag","google","hate","healthPlan","height","height2","home","horizontalList","imageUp","info2","infoCircle","instagram","key","language","language2","languageEN","languagePT","lattes","like","likeHand","link","linkExternal","linkedin","list","login","logout","love","mail","mail2","medical","menuHamburguer","menuKebab","menuMeatballs","mic","micOff","minus","minusCircle","minusSquare","mobile","neutral","news","notification","order","partner","phone","play","plus","plusCircle","plusSquare","print","profile","profile2","pulldownG","pulldownP","pullupG","pullupP","questionCircle","questionSquare","range","reload","schedule","search","secure","share","share2","sound","soundOff","subItem","target","team","twitter","unLink","unSecure","unlikeHand","upload","verticalList","viewFalse","viewTrue","weight","whatsapp","wifi","youtube","zoomIn","zoomOut"];var u=":host{display:block;padding:24px;font-family:var(--cura-font-family-body)}.iconDetail{display:block}.iconSizes{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.iconSizes .size{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;text-align:center;margin-right:9px;padding:8px}.iconSizes .size:last-child{margin-right:0}.iconSizes .size span{font-size:10px}.iconSizes.invert{margin-top:12px}.iconSizes.invert .size{background-color:#262626;color:#F6F6F6;border-radius:3px}.icons{margin-top:28px;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;position:relative}.icons .icon{position:relative;padding:4px;cursor:pointer;opacity:0.6;-webkit-transition:opacity 0.2s linear;transition:opacity 0.2s linear}.icons .icon span{font-size:12px;padding:6px;-webkit-box-sizing:border-box;box-sizing:border-box;background:#000;color:#FFF;border-radius:2px;position:absolute;top:-2px;left:50%;-webkit-transform:translateX(-50%) translateY(-100%);transform:translateX(-50%) translateY(-100%);display:none}.icons .icon:hover{opacity:1}.icons .icon:hover span{display:block}";var d=t("cura_icons_view",function(){function t(t){var s=this;e(this,t);this.sizes=[16,20,24,32,40,48,64,72,128];this.colors=["primary","secondary","accent","info","warning","error","success","neutral"];this.selected="360";this.setSelected=function(t){s.selected=t}}t.prototype.render=function(){var t=this;return s(o,null,s("div",{class:"iconDetail"},s("h4",null,this.selected),s("div",{class:"iconSizes"},this.sizes.map((function(e){return s("div",{class:"size"},s("cura-icon",{name:t.selected,size:e}),s("span",null,e))}))),s("div",{class:"iconSizes invert"},this.sizes.map((function(e){return s("div",{class:"size"},s("cura-icon",{name:t.selected,size:e,color:"neutral-white"}),s("span",null,e))}))),s("div",{class:"iconSizes"},this.colors.map((function(e){return s("div",{class:"size"},s("cura-icon",{name:t.selected,color:e}),s("span",null,e))})),s("div",{class:"size"},s("cura-icon",{name:this.selected,disabled:true}),s("span",null,"Disabled")))),s("div",{class:"icons"},g.map((function(e){return s("div",{class:"icon",onClick:function(){return t.setSelected(e)}},s("cura-icon",{name:e}),s("span",null,e))}))))};return t}());d.style=u;var f=":host{display:block;font-size:var(--font-size)}:host p{font-family:var(--font-family);font-size:var(--font-size);font-weight:var(--font-weight-regular);color:var(--color-body);line-height:140%;letter-spacing:2%}:host p.large{font-size:1.21em;line-height:150%;letter-spacing:0%}:host p.small{font-size:0.85em;line-height:135%;letter-spacing:4%}:host p.caption{font-size:0.71em;line-height:135%;letter-spacing:6%}@media screen and (min-width: 768px) and (max-width: 1366px){:host p{font-size:1.14em;line-height:145%}:host p.large{font-size:1.35em;line-height:150%}:host p.small{font-size:1em;line-height:135%}:host p.caption{font-size:0.85em;line-height:135%;letter-spacing:6%}}@media screen and (min-width: 1367px){:host p{font-size:1.42em;line-height:150%;letter-spacing:0%}:host p.large{font-size:1.71em;line-height:160%}:host p.small{font-size:1.21em;line-height:145%;letter-spacing:0%}:host p.caption{font-size:1em;line-height:145%;letter-spacing:2%}}:host ::slotted(b),:host ::slotted(strong){font-weight:var(--font-weight-bold)}:host ::slotted(a){font-weight:var(--font-weight-medium);color:var(--color-link);text-underline-offset:10%}:host ::slotted(abbr){color:var(--color-link);-webkit-text-decoration:underline dashed 1px var(--color-link);text-decoration:underline dashed 1px var(--color-link);text-underline-offset:10%;cursor:default}";var p=t("cura_paragraph",function(){function t(t){e(this,t);this.size="regular"}t.prototype.connectedCallback=function(){this.weights=window.CuraAPI.theme.fonts.getWeights();this.setFontProperties();this.setColors()};t.prototype.setsizeClass=function(){var t={};t[this.size.toLowerCase()]=true;return t};t.prototype.setFontProperties=function(){this.styles={"--font-family":window.CuraAPI.theme.fonts.getFamily("body"),"--font-size":window.CuraAPI.theme.fonts.getSize(),"--font-weight-regular":this.weights.regular,"--font-weight-medium":this.weights.medium,"--font-weight-bold":this.weights.bold};this.setHostProperty("--font-size",window.CuraAPI.theme.fonts.getSize())};t.prototype.setColors=function(){var t=window.CuraAPI.theme.fonts.getColor();this.styles["--color-body"]=t||window.CuraAPI.theme.colors.getColor("neutral-darker");this.styles["--color-link"]=window.CuraAPI.theme.colors.getColor("primary-700")};t.prototype.setHostProperty=function(t,e){this.host.style.setProperty(t,e)};t.prototype.render=function(){return s(o,null,s("p",{style:this.styles,class:this.setsizeClass()},s("slot",null)))};Object.defineProperty(t.prototype,"host",{get:function(){return i(this)},enumerable:false,configurable:true});return t}());p.style=f}}}));
@@ -0,0 +1 @@
1
+ import{r as t,h as s,H as e,g as o}from"./p-a50716bc.js";const i=class{constructor(s){t(this,s),this.level=1,this.size="regular"}connectedCallback(){this.weights=window.CuraAPI.theme.fonts.getWeights(),this.setFontProperties(),this.setColors()}getClasses(){const t={};return t[this.size.toLowerCase()]=!0,t}setFontProperties(){this.styles={"--font-family":window.CuraAPI.theme.fonts.getFamily("display"),"--font-size":window.CuraAPI.theme.fonts.getSize(),"--font-weight-bold":this.weights.bold,"--font-weight-black":this.weights.black},this.setHostProperty("--font-size",window.CuraAPI.theme.fonts.getSize())}setColors(){const t=window.CuraAPI.theme.fonts.getColor();this.styles["--color-body"]=t||window.CuraAPI.theme.colors.getColor("neutral-darker"),this.styles["--color-link"]=window.CuraAPI.theme.colors.getColor("primary-700")}setHostProperty(t,s){this.host.style.setProperty(t,s)}getHeadingTag(){const t={1:s("h1",{style:this.styles,class:this.getClasses()},s("slot",null)),2:s("h2",{style:this.styles,class:this.getClasses()},s("slot",null)),3:s("h3",{style:this.styles,class:this.getClasses()},s("slot",null)),4:s("h4",{style:this.styles,class:this.getClasses()},s("slot",null)),5:s("h5",{style:this.styles,class:this.getClasses()},s("slot",null)),6:s("h6",{style:this.styles,class:this.getClasses()},s("slot",null)),default:s("h1",{style:this.styles,class:this.getClasses()},s("slot",null))};return t[`${this.level}`]||t.default}render(){return s(e,null,this.getHeadingTag())}get host(){return o(this)}};i.style=":host{display:block;font-size:var(--font-size);text-transform:uppercase}:host h1,:host h2,:host h3,:host h4,:host h5,:host h6{font-family:var(--font-family);font-size:4.285em;font-weight:var(--font-weight-black);color:var(--color-body);line-height:120%;letter-spacing:-4%}:host h1.large,:host h2.large,:host h3.large,:host h4.large,:host h5.large,:host h6.large{font-size:6.21em}:host h1.small,:host h2.small,:host h3.small,:host h4.small,:host h5.small,:host h6.small{font-size:3em;font-weight:var(--font-weight-bold)}@media screen and (min-width: 768px) and (max-width: 1366px){:host h1,:host h2,:host h3,:host h4,:host h5,:host h6{font-size:4.92em}:host h1.large,:host h2.large,:host h3.large,:host h4.large,:host h5.large,:host h6.large{font-size:7.07em}:host h1.small,:host h2.small,:host h3.small,:host h4.small,:host h5.small,:host h6.small{font-size:3.428em}}@media screen and (min-width: 1367px){:host h1,:host h2,:host h3,:host h4,:host h5,:host h6{font-size:6.14em;line-height:125%}:host h1.large,:host h2.large,:host h3.large,:host h4.large,:host h5.large,:host h6.large{font-size:8.857em;letter-spacing:-6%}:host h1.small,:host h2.small,:host h3.small,:host h4.small,:host h5.small,:host h6.small{font-size:4.285em;letter-spacing:-2%}}:host ::slotted(b),:host ::slotted(strong){font-weight:var(--font-weight-bold)}:host ::slotted(a){font-weight:var(--font-weight-bold);color:var(--color-link);text-decoration:none;text-underline-offset:10%;cursor:pointer}:host ::slotted(abbr){color:var(--color-link);-webkit-text-decoration:underline dashed 1px var(--color-link);text-decoration:underline dashed 1px var(--color-link);text-underline-offset:10%;cursor:default}";const l=class{constructor(s){t(this,s),this.level=1,this.size="regular",this.weight="regular"}connectedCallback(){this.weights=window.CuraAPI.theme.fonts.getWeights(),this.setFontProperties(),this.setColors()}getClasses(){const t={};return t[this.size.toLowerCase()]=!0,t[`${this.weight.toLowerCase()}-weight`]=!0,t}setFontProperties(){this.styles={"--font-family":window.CuraAPI.theme.fonts.getFamily("heading"),"--font-size":window.CuraAPI.theme.fonts.getSize(),"--font-weight-regular":this.weights.regular,"--font-weight-medium":this.weights.medium,"--font-weight-bold":this.weights.bold,"--font-weight-black":this.weights.black},this.setHostProperty("--font-size",window.CuraAPI.theme.fonts.getSize())}setColors(){const t=window.CuraAPI.theme.fonts.getColor();this.styles["--color-body"]=t||window.CuraAPI.theme.colors.getColor("neutral-darker"),this.styles["--color-link"]=window.CuraAPI.theme.colors.getColor("primary-700")}setHostProperty(t,s){this.host.style.setProperty(t,s)}getHeadingTag(){const t={1:s("h1",{style:this.styles,class:this.getClasses()},s("slot",null)),2:s("h2",{style:this.styles,class:this.getClasses()},s("slot",null)),3:s("h3",{style:this.styles,class:this.getClasses()},s("slot",null)),4:s("h4",{style:this.styles,class:this.getClasses()},s("slot",null)),5:s("h5",{style:this.styles,class:this.getClasses()},s("slot",null)),6:s("h6",{style:this.styles,class:this.getClasses()},s("slot",null)),default:s("h1",{style:this.styles,class:this.getClasses()},s("slot",null))};return t[`${this.level}`]||t.default}render(){return s(e,null,this.getHeadingTag())}get host(){return o(this)}};l.style=":host{display:block;font-size:var(--font-size)}:host h1,:host h2,:host h3,:host h4,:host h5,:host h6{font-family:var(--font-family);font-size:1.71em;font-weight:var(--font-weight-regular);color:var(--color-body);line-height:130%;letter-spacing:0%}:host h1.bold-weight,:host h2.bold-weight,:host h3.bold-weight,:host h4.bold-weight,:host h5.bold-weight,:host h6.bold-weight{font-weight:var(--font-weight-medium)}:host h1.large,:host h2.large,:host h3.large,:host h4.large,:host h5.large,:host h6.large{font-size:2.07em;letter-spacing:-2%}:host h1.small,:host h2.small,:host h3.small,:host h4.small,:host h5.small,:host h6.small{font-size:1.214em;line-height:150%;letter-spacing:0%}:host h1.small.bold-weight,:host h2.small.bold-weight,:host h3.small.bold-weight,:host h4.small.bold-weight,:host h5.small.bold-weight,:host h6.small.bold-weight{font-weight:var(--font-weight-bold)}@media screen and (min-width: 768px) and (max-width: 1366px){:host h1,:host h2,:host h3,:host h4,:host h5,:host h6{font-size:2em}:host h1.large,:host h2.large,:host h3.large,:host h4.large,:host h5.large,:host h6.large{font-size:2.357em}:host h1.small,:host h2.small,:host h3.small,:host h4.small,:host h5.small,:host h6.small{font-size:1.357em}}@media screen and (min-width: 1367px){:host h1,:host h2,:host h3,:host h4,:host h5,:host h6{font-size:2.5em;line-height:135%;letter-spacing:-2%}:host h1.large,:host h2.large,:host h3.large,:host h4.large,:host h5.large,:host h6.large{font-size:2.92em}:host h1.small,:host h2.small,:host h3.small,:host h4.small,:host h5.small,:host h6.small{font-size:1.71em;line-height:160%;letter-spacing:0%}}:host ::slotted(b),:host ::slotted(strong){font-weight:var(--font-weight-bold)}:host ::slotted(a){font-weight:var(--font-weight-bold);color:var(--color-link);text-decoration:none;text-underline-offset:10%;cursor:pointer}:host ::slotted(abbr){color:var(--color-link);-webkit-text-decoration:underline dashed 1px var(--color-link);text-decoration:underline dashed 1px var(--color-link);text-underline-offset:10%;cursor:default}";const h=class{constructor(s){t(this,s),this.name="",this.color="neutral-base",this.iconset="default",this.disabled=!1,this.sizes={128:{size:128,stroke:5.25},72:{size:72,stroke:3.5},64:{size:64,stroke:3.25},48:{size:48,stroke:2.75},40:{size:40,stroke:2.5},32:{size:32,stroke:2.25},24:{size:24,stroke:2},20:{size:20,stroke:1.75},16:{size:16,stroke:1.5},default:{size:24,stroke:2}}}sizeHandler(t){this.setHostProperty("--size",this.sizes[`${t}`]?`${this.sizes[t].size}px`:`${this.sizes.default.size}px`),this.setHostProperty("--stroke",(t=>this.sizes[t].stroke*(this.sizes.default.size/this.sizes[t].size)+"px")(this.sizes[`${t}`]?t:"default"))}colorHandler(){this.setHostProperty("--color",window.CuraAPI.theme.colors.getColor(this.disabled?"neutral-light":this.color))}connectedCallback(){this.assetsPath=window.CuraAPI.localAssetsPath,this.sizeHandler(this.size),this.colorHandler()}setHostProperty(t,s){this.host.style.setProperty(t,s)}render(){return s(e,null,s("svg",{version:"1.1",viewBox:"0 0 24 24",preserveAspectRatio:"xMidYMid meet",xmlns:"http://www.w3.org/2000/svg"},s("use",{xlinkHref:`${this.assetsPath}/icons/iconset-${this.iconset}.svg#${this.name}`})))}get host(){return o(this)}static get watchers(){return{size:["sizeHandler"],color:["colorHandler"],disabled:["colorHandler"]}}};h.style=":host{width:var(--size);height:var(--size)}:host svg{display:inline-block;stroke:var(--color);width:var(--size);height:var(--size);stroke-width:var(--stroke);fill:none}";const n=["360","accessibility","alertCircle","alertTriangle","arrowDown","arrowDownCircle","arrowLeft","arrowLeftCircle","arrowRight","arrowRightCircle","arrowUp","arrowUpCircle","attach","avatarF","avatarM","biometry","bloodGroup","calendar","cam","camOff","central","chatCircle","check","checkBadge","checkCircle","checkDouble","clock","close","closeCircle","collapse","config","delete","desktop","deslike","download","duplicate","edit","exam","expand","facebook","fileBmp","fileJpg","filePdf","filePng","fileUpload","fileXls","filter","fullscreen","gallery","geotag","google","hate","healthPlan","height","height2","home","horizontalList","imageUp","info2","infoCircle","instagram","key","language","language2","languageEN","languagePT","lattes","like","likeHand","link","linkExternal","linkedin","list","login","logout","love","mail","mail2","medical","menuHamburguer","menuKebab","menuMeatballs","mic","micOff","minus","minusCircle","minusSquare","mobile","neutral","news","notification","order","partner","phone","play","plus","plusCircle","plusSquare","print","profile","profile2","pulldownG","pulldownP","pullupG","pullupP","questionCircle","questionSquare","range","reload","schedule","search","secure","share","share2","sound","soundOff","subItem","target","team","twitter","unLink","unSecure","unlikeHand","upload","verticalList","viewFalse","viewTrue","weight","whatsapp","wifi","youtube","zoomIn","zoomOut"],a=class{constructor(s){t(this,s),this.sizes=[16,20,24,32,40,48,64,72,128],this.colors=["primary","secondary","accent","info","warning","error","success","neutral"],this.selected="360",this.setSelected=t=>{this.selected=t}}render(){return s(e,null,s("div",{class:"iconDetail"},s("h4",null,this.selected),s("div",{class:"iconSizes"},this.sizes.map((t=>s("div",{class:"size"},s("cura-icon",{name:this.selected,size:t}),s("span",null,t))))),s("div",{class:"iconSizes invert"},this.sizes.map((t=>s("div",{class:"size"},s("cura-icon",{name:this.selected,size:t,color:"neutral-white"}),s("span",null,t))))),s("div",{class:"iconSizes"},this.colors.map((t=>s("div",{class:"size"},s("cura-icon",{name:this.selected,color:t}),s("span",null,t)))),s("div",{class:"size"},s("cura-icon",{name:this.selected,disabled:!0}),s("span",null,"Disabled")))),s("div",{class:"icons"},n.map((t=>s("div",{class:"icon",onClick:()=>this.setSelected(t)},s("cura-icon",{name:t}),s("span",null,t))))))}};a.style=":host{display:block;padding:24px;font-family:var(--cura-font-family-body)}.iconDetail{display:block}.iconSizes{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.iconSizes .size{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;text-align:center;margin-right:9px;padding:8px}.iconSizes .size:last-child{margin-right:0}.iconSizes .size span{font-size:10px}.iconSizes.invert{margin-top:12px}.iconSizes.invert .size{background-color:#262626;color:#F6F6F6;border-radius:3px}.icons{margin-top:28px;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;position:relative}.icons .icon{position:relative;padding:4px;cursor:pointer;opacity:0.6;-webkit-transition:opacity 0.2s linear;transition:opacity 0.2s linear}.icons .icon span{font-size:12px;padding:6px;-webkit-box-sizing:border-box;box-sizing:border-box;background:#000;color:#FFF;border-radius:2px;position:absolute;top:-2px;left:50%;-webkit-transform:translateX(-50%) translateY(-100%);transform:translateX(-50%) translateY(-100%);display:none}.icons .icon:hover{opacity:1}.icons .icon:hover span{display:block}";const r=class{constructor(s){t(this,s),this.size="regular"}connectedCallback(){this.weights=window.CuraAPI.theme.fonts.getWeights(),this.setFontProperties(),this.setColors()}setsizeClass(){const t={};return t[this.size.toLowerCase()]=!0,t}setFontProperties(){this.styles={"--font-family":window.CuraAPI.theme.fonts.getFamily("body"),"--font-size":window.CuraAPI.theme.fonts.getSize(),"--font-weight-regular":this.weights.regular,"--font-weight-medium":this.weights.medium,"--font-weight-bold":this.weights.bold},this.setHostProperty("--font-size",window.CuraAPI.theme.fonts.getSize())}setColors(){const t=window.CuraAPI.theme.fonts.getColor();this.styles["--color-body"]=t||window.CuraAPI.theme.colors.getColor("neutral-darker"),this.styles["--color-link"]=window.CuraAPI.theme.colors.getColor("primary-700")}setHostProperty(t,s){this.host.style.setProperty(t,s)}render(){return s(e,null,s("p",{style:this.styles,class:this.setsizeClass()},s("slot",null)))}get host(){return o(this)}};r.style=":host{display:block;font-size:var(--font-size)}:host p{font-family:var(--font-family);font-size:var(--font-size);font-weight:var(--font-weight-regular);color:var(--color-body);line-height:140%;letter-spacing:2%}:host p.large{font-size:1.21em;line-height:150%;letter-spacing:0%}:host p.small{font-size:0.85em;line-height:135%;letter-spacing:4%}:host p.caption{font-size:0.71em;line-height:135%;letter-spacing:6%}@media screen and (min-width: 768px) and (max-width: 1366px){:host p{font-size:1.14em;line-height:145%}:host p.large{font-size:1.35em;line-height:150%}:host p.small{font-size:1em;line-height:135%}:host p.caption{font-size:0.85em;line-height:135%;letter-spacing:6%}}@media screen and (min-width: 1367px){:host p{font-size:1.42em;line-height:150%;letter-spacing:0%}:host p.large{font-size:1.71em;line-height:160%}:host p.small{font-size:1.21em;line-height:145%;letter-spacing:0%}:host p.caption{font-size:1em;line-height:145%;letter-spacing:2%}}:host ::slotted(b),:host ::slotted(strong){font-weight:var(--font-weight-bold)}:host ::slotted(a){font-weight:var(--font-weight-medium);color:var(--color-link);text-underline-offset:10%}:host ::slotted(abbr){color:var(--color-link);-webkit-text-decoration:underline dashed 1px var(--color-link);text-decoration:underline dashed 1px var(--color-link);text-underline-offset:10%;cursor:default}";export{i as cura_display,l as cura_heading,h as cura_icon,a as cura_icons_view,r as cura_paragraph}
@@ -0,0 +1,396 @@
1
+ /**
2
+ * Cura Default Theme
3
+ */
4
+ const ThemeDefault = {
5
+ /* Colors */
6
+ color: {
7
+ primary: {
8
+ '100': '#71C5E8',
9
+ '300': '#449CD5',
10
+ '500': '#005EB8',
11
+ '700': '#004890',
12
+ '900': '#002855'
13
+ },
14
+ secondary: {
15
+ '100': '#F5ECE3',
16
+ '300': '#DDC0A2',
17
+ '500': '#CCA074',
18
+ '700': '#886B4D',
19
+ '900': '#292017'
20
+ },
21
+ accent: {
22
+ '100': '#F9E8D5',
23
+ '300': '#E4A04F',
24
+ '500': '#DF8D2C',
25
+ '700': '#955E1D',
26
+ '900': '#2D1C09'
27
+ }
28
+ },
29
+ /* Spacing */
30
+ spacing: {
31
+ base: 4,
32
+ },
33
+ /* Fonts */
34
+ font: {
35
+ size: '14px',
36
+ color: '#4A4A4A',
37
+ body: "'Roboto', Arial, Helvetica, sans-serif",
38
+ heading: "'Roboto', Arial, Helvetica, sans-serif",
39
+ display: "'Roboto', Arial, Helvetica, sans-serif",
40
+ weights: {
41
+ thin: 100,
42
+ light: 300,
43
+ regular: 400,
44
+ medium: 500,
45
+ bold: 700,
46
+ black: 900
47
+ },
48
+ }
49
+ };
50
+
51
+ /**
52
+ * Maternity Theme
53
+ */
54
+ const ThemeMaternity = Object.assign(Object.assign({}, ThemeDefault), {
55
+ /* Custom */
56
+ /* Colors */
57
+ color: {
58
+ primary: {
59
+ '100': '#FCEFF6',
60
+ '300': '#FFBFE5',
61
+ '500': '#CD4D9A',
62
+ '700': '#99126C',
63
+ '900': '#00133B'
64
+ },
65
+ secondary: {
66
+ '100': '#EDF3FF',
67
+ '300': '#BDD2FF',
68
+ '500': '#189AB4',
69
+ '700': '#001C58',
70
+ '900': '#430E31'
71
+ }
72
+ } });
73
+
74
+ const ThemePresets = {
75
+ 'default': ThemeDefault,
76
+ 'maternidade': ThemeMaternity
77
+ };
78
+
79
+ /**
80
+ * Static
81
+ */
82
+ const Static = {
83
+ /* Colors */
84
+ color: {
85
+ success: {
86
+ lighter: '#DFF6E9',
87
+ light: '#94E1B5',
88
+ base: '#5FD290',
89
+ dark: '#3F8C60',
90
+ darker: '#132A1D',
91
+ depth100: '#DFF6E9',
92
+ depth300: '#94E1B5',
93
+ depth500: '#5FD290',
94
+ depth700: '#3F8C60',
95
+ depth900: '#132A1D',
96
+ },
97
+ info: {
98
+ lighter: '#CFE2FF',
99
+ light: '#95BFFF',
100
+ base: '#6EA8FF',
101
+ dark: '#517BBB',
102
+ darker: '#253855',
103
+ depth100: '#CFE2FF',
104
+ depth300: '#95BFFF',
105
+ depth500: '#6EA8FF',
106
+ depth700: '#517BBB',
107
+ depth900: '#253855',
108
+ },
109
+ error: {
110
+ lighter: '#FBDDDD',
111
+ light: '#F28F8F',
112
+ base: '#EB5757',
113
+ dark: '#9D3A3A',
114
+ darker: '#2F1111',
115
+ depth100: '#FBDDDD',
116
+ depth300: '#F28F8F',
117
+ depth500: '#EB5757',
118
+ depth700: '#9D3A3A',
119
+ depth900: '#2F1111',
120
+ },
121
+ warning: {
122
+ lighter: '#FCFAC4',
123
+ light: '#F8F489',
124
+ base: '#F5EF4E',
125
+ dark: '#A39F34',
126
+ darker: '#313010',
127
+ depth100: '#FCFAC4',
128
+ depth300: '#F8F489',
129
+ depth500: '#F5EF4E',
130
+ depth700: '#A39F34',
131
+ depth900: '#313010',
132
+ },
133
+ /* neutral: {
134
+ 'pure-white': '#FFFFFF',
135
+ white: '#F6F6F6',
136
+ pale: '#E9E9E9',
137
+ lighter: '#E2E2E2',
138
+ light: '#D4D4D4',
139
+ base: '#B7B7B7',
140
+ medium: '#929292',
141
+ dark: '#6E6E6E',
142
+ darker: '#4A4A4A',
143
+ black: '#262626',
144
+ depth0: '#FFFFFF',
145
+ depth100: '#F6F6F6',
146
+ depth200: '#E9E9E9',
147
+ depth300: '#E2E2E2',
148
+ depth400: '#D4D4D4',
149
+ depth500: '#B7B7B7',
150
+ depth600: '#929292',
151
+ depth700: '#6E6E6E',
152
+ depth800: '#4A4A4A',
153
+ depth900: '#262626',
154
+ }, */
155
+ neutral: {
156
+ '0': '#FFFFFF',
157
+ '100': '#F6F6F6',
158
+ '200': '#E9E9E9',
159
+ '300': '#E2E2E2',
160
+ '400': '#D4D4D4',
161
+ '500': '#B7B7B7',
162
+ '600': '#929292',
163
+ '700': '#6E6E6E',
164
+ '800': '#4A4A4A',
165
+ '900': '#262626',
166
+ },
167
+ },
168
+ /* Icons */
169
+ icons: {
170
+ 'sizes': ['128', '72', '64', '48', '40', '32', '24', '20', '16'],
171
+ 'strokes': ['5.25', '3.5', '3.25', '2.75', '2.5', '2.25', '2', '1.75', '1.5'],
172
+ 'default-size': '24',
173
+ },
174
+ /* Breakpoints */
175
+ breakpoints: {
176
+ small: '576px',
177
+ medium: '768px',
178
+ large: '992px',
179
+ xlarge: '1200px',
180
+ },
181
+ };
182
+
183
+ class CuraThemeColorsModule {
184
+ constructor() {
185
+ this.NeutralDepthAlias = {
186
+ 'purewhite': '0',
187
+ 'white': '100',
188
+ 'pale': '200',
189
+ 'lighter': '300',
190
+ 'light': '400',
191
+ 'base': '500',
192
+ 'medium': '600',
193
+ 'dark': '700',
194
+ 'darker': '800',
195
+ 'black': '900',
196
+ };
197
+ this.ColorDepthAlias = {
198
+ 'lighter': '100',
199
+ 'light': '300',
200
+ 'base': '500',
201
+ 'dark': '700',
202
+ 'darker': '900'
203
+ };
204
+ }
205
+ /**
206
+ * Get theme color.
207
+ * @param colorWithDepth string Ex.: primary-light
208
+ * @returns css color property. Color definition or related css var from the theme.
209
+ */
210
+ getColor(colorWithDepth = "primary-base") {
211
+ const { color, depth } = this.splitColorDepth(colorWithDepth);
212
+ const staticColor = this.getStatic(color, depth);
213
+ if (staticColor)
214
+ return staticColor;
215
+ return this.getDynamic(color, depth);
216
+ }
217
+ /**
218
+ * Internal: Look for static color by name and depth.
219
+ * @param color Color name.
220
+ * @param depth Depth number or alias.
221
+ * @returns Static color definition.
222
+ */
223
+ getStatic(color, depth) {
224
+ var _a, _b;
225
+ return ((_a = Static.color[color]) === null || _a === void 0 ? void 0 : _a[depth]) || ((_b = Static.color[color]) === null || _b === void 0 ? void 0 : _b[this.NeutralDepthAlias[depth]]) || null;
226
+ }
227
+ /**
228
+ * Internal: Look for theme dynamic colors.
229
+ * @param color Color name.
230
+ * @param depth Depth number or alias.
231
+ * @returns Related CSS variable defined by the theme.
232
+ */
233
+ getDynamic(color, depth) {
234
+ const themeVar = this.ColorDepthAlias[depth]
235
+ ? `--cura-color-${color}-${this.ColorDepthAlias[depth]}`
236
+ : `--cura-color-${color}-${depth}`;
237
+ return getComputedStyle(document.body).getPropertyValue(themeVar)
238
+ ? `var(${themeVar})`
239
+ : `var(--cura-color-primary-500)`;
240
+ }
241
+ /**
242
+ * Internal: Split color strings
243
+ * @param colorWithDepth Color string [color]-[depth]. Ex.: primary-dark or primary-700.
244
+ * @returns Object { color: string, depth: string }.
245
+ */
246
+ splitColorDepth(colorWithDepth) {
247
+ const [color, depth] = colorWithDepth.toLowerCase().split(/-(.*)/);
248
+ return { color: color !== null && color !== void 0 ? color : "primary", depth: depth !== null && depth !== void 0 ? depth : "base" };
249
+ }
250
+ }
251
+
252
+ class CuraThemeFontsModule {
253
+ constructor() {
254
+ /**
255
+ * Get the CSS variable related to the font size base defined by the theme.
256
+ * @returns Related CSS variable as a string.
257
+ */
258
+ this.getSize = () => `var(--cura-font-size)`;
259
+ /**
260
+ * Get CSS variable related to the font color defined by the theme.
261
+ * @returns Related CSS variable as a string.
262
+ */
263
+ this.getColor = () => `var(--cura-font-color)`;
264
+ }
265
+ /**
266
+ * Get the CSS variable related to the font family defined by the theme.
267
+ * @param type 'body' | 'heading' | 'display'
268
+ * @returns Related css variable as a string.
269
+ */
270
+ getFamily(type = "body") {
271
+ const curaFontFamilyCSSVar = `--cura-font-${type.toLowerCase()}`;
272
+ return getComputedStyle(document.body).getPropertyValue(curaFontFamilyCSSVar)
273
+ ? `var(${curaFontFamilyCSSVar})`
274
+ : 'var(--cura-font-body)';
275
+ }
276
+ /**
277
+ * Get the CSS variables related to font weights defined by the theme.
278
+ * @returns Object with CSS vars weights definitions for thin, light, regular, medium, bold and black fonts.
279
+ */
280
+ getWeights() {
281
+ const weights = {};
282
+ Object.keys(ThemeDefault.font.weights).forEach((key) => weights[key] = `var(--cura-font-weights-${key})`);
283
+ return weights;
284
+ }
285
+ }
286
+
287
+ class CuraThemeModule {
288
+ constructor() {
289
+ this.prefix = '--cura';
290
+ this.colors = new CuraThemeColorsModule();
291
+ this.fonts = new CuraThemeFontsModule();
292
+ /* Private */
293
+ /** Set css var based on object structure */
294
+ this.setCssVar = (prop, path) => {
295
+ const varName = this.groupPath(path, prop[0]);
296
+ this.body.style.setProperty(varName, prop[1]);
297
+ };
298
+ this.groupPath = (a, b) => `${a}-${b}`;
299
+ this.isObject = (val) => {
300
+ return val && typeof val === 'object' && !Array.isArray(val);
301
+ };
302
+ /** Deep merge objects */
303
+ this.mergeObject = (from, to) => {
304
+ const entries = Object.entries(from);
305
+ for (let e of entries) {
306
+ if (this.isObject(e[1])) {
307
+ this.mergeObject(e[1], to[e[0]]);
308
+ }
309
+ else {
310
+ to[e[0]] = e[1];
311
+ }
312
+ }
313
+ };
314
+ /** Set css vars from preset object */
315
+ this.buildCssVars = (path, obj) => {
316
+ const entries = Object.entries(obj);
317
+ for (let e of entries) {
318
+ if (this.isObject(e[1])) {
319
+ this.buildCssVars(this.groupPath(path, e[0]), e[1]);
320
+ }
321
+ else {
322
+ this.setCssVar(e, path);
323
+ }
324
+ }
325
+ };
326
+ this.body = window.document.documentElement.querySelector('body');
327
+ }
328
+ /**
329
+ * Load a theme.
330
+ * @param theme Theme tag.
331
+ */
332
+ load(theme = 'default') {
333
+ const preset = ThemePresets[theme] ? ThemePresets[theme] : ThemePresets.default;
334
+ this.buildCssVars(this.prefix, preset);
335
+ }
336
+ /**
337
+ * Define a custom theme
338
+ * @param customTheme Custom theme object definition
339
+ */
340
+ setCustom(customTheme) {
341
+ const customTag = customTheme.name;
342
+ if (customTag in ThemePresets) {
343
+ console.log('Error building custom theme. Theme %s already exists. Loading default theme.', customTag);
344
+ this.load('default');
345
+ }
346
+ else {
347
+ const preset = customTheme.fromPreset && customTheme.fromPreset in ThemePresets
348
+ ? ThemePresets[customTheme.fromPreset]
349
+ : ThemePresets.default;
350
+ const newTheme = Object.assign({}, JSON.parse(JSON.stringify(preset)));
351
+ this.mergeObject(customTheme.definitions, newTheme);
352
+ ThemePresets[customTag] = newTheme;
353
+ this.load(customTag);
354
+ }
355
+ }
356
+ }
357
+
358
+ class CuraAPI {
359
+ constructor(config) {
360
+ this.localAssetsPath = config && config.localAssetsPath ? config.localAssetsPath : `/assets`;
361
+ const themeModule = new CuraThemeModule();
362
+ this.theme = {
363
+ load: function (themeTag) { themeModule.load(themeTag); },
364
+ setCustom: function (customThemeDefinitions) { themeModule.setCustom(customThemeDefinitions); },
365
+ colors: {
366
+ getColor: function (colorWithDepth) { return themeModule.colors.getColor(colorWithDepth); },
367
+ },
368
+ fonts: {
369
+ getFamily: function (type) { return themeModule.fonts.getFamily(type); },
370
+ getWeights: function () { return themeModule.fonts.getWeights(); },
371
+ getSize: function () { return themeModule.fonts.getSize(); },
372
+ getColor: function () { return themeModule.fonts.getColor(); }
373
+ }
374
+ };
375
+ if (config && config.customTheme) {
376
+ this.theme.setCustom(config.customTheme);
377
+ }
378
+ else {
379
+ const theme = config && config.theme ? config.theme : 'default';
380
+ this.theme.load(theme);
381
+ }
382
+ }
383
+ }
384
+
385
+ function appGlobalScript () {
386
+ const config = window.CuraInit;
387
+ window.CuraAPI = config ? new CuraAPI(config) : new CuraAPI();
388
+ const api = window.CuraAPI;
389
+ window.dispatchEvent(new CustomEvent("CuraAPIReady", { detail: { api } }));
390
+ if (config && typeof config.onReady === 'function')
391
+ config.onReady(api);
392
+ }
393
+
394
+ const globalScripts = appGlobalScript;
395
+
396
+ export { globalScripts as g };