@rededor/cura 0.2.0 → 0.3.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.
- package/dist/cjs/app-globals-5f5b9fbf.js +398 -0
- package/dist/cjs/cura-display_3.cjs.entry.js +187 -0
- package/dist/cjs/cura-icon.cjs.entry.js +59 -0
- package/dist/cjs/{cura-icon_2.cjs.entry.js → cura-icons-view.cjs.entry.js} +2 -56
- package/dist/cjs/cura.cjs.js +3 -3
- package/dist/cjs/{index-9092c64d.js → index-8686299e.js} +29 -0
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/collection/api/cura-api.js +10 -1
- package/dist/collection/api/modules/cura-theme-colors-module.js +69 -0
- package/dist/collection/api/modules/cura-theme-fonts-module.js +35 -0
- package/dist/collection/api/modules/cura-theme-module.js +4 -0
- package/dist/collection/api/theme-presets/static.js +103 -0
- package/dist/collection/api/theme-presets/theme-default.js +28 -22
- package/dist/collection/api/theme-presets/theme-maternity.js +10 -12
- package/dist/collection/collection-manifest.json +3 -1
- package/dist/collection/components/cura-icon/cura-icon.css +1 -42
- package/dist/collection/components/cura-icon/cura-icon.js +15 -12
- package/dist/collection/components/cura-icons-view/cura-icons-view.js +1 -1
- package/dist/collection/components/text/cura-display/cura-display.css +61 -0
- package/dist/collection/components/text/cura-display/cura-display.js +110 -0
- package/dist/collection/components/text/cura-heading/cura-heading.css +69 -0
- package/dist/collection/components/text/cura-heading/cura-heading.js +136 -0
- package/dist/collection/components/text/cura-paragraph/cura-paragraph.css +81 -0
- package/dist/collection/components/text/cura-paragraph/cura-paragraph.js +76 -0
- package/dist/components/{dummy-component.d.ts → cura-display.d.ts} +4 -4
- package/dist/components/cura-display.js +86 -0
- package/dist/components/cura-heading.d.ts +11 -0
- package/dist/components/cura-heading.js +95 -0
- package/dist/components/cura-icon2.js +12 -13
- package/dist/components/cura-icons-view.js +1 -1
- package/dist/components/cura-paragraph.d.ts +11 -0
- package/dist/components/cura-paragraph.js +69 -0
- package/dist/components/index.d.ts +3 -1
- package/dist/components/index.js +261 -36
- package/dist/cura/cura.esm.js +1 -1
- package/dist/cura/cura.js +1 -1
- package/dist/cura/p-22290742.entry.js +1 -0
- package/dist/cura/p-265c1706.js +1 -0
- package/dist/cura/p-3d8bbf37.system.js +1 -0
- package/dist/cura/p-5ae0d10c.system.entry.js +1 -0
- package/dist/cura/p-80dc1c9f.entry.js +1 -0
- package/dist/cura/p-9312a846.system.entry.js +1 -0
- package/dist/cura/p-a50716bc.js +2 -0
- package/dist/cura/p-a8dcaaed.system.js +1 -0
- package/dist/cura/p-d29b9e16.entry.js +1 -0
- package/dist/cura/p-e447016d.system.js +2 -0
- package/dist/cura/p-e8fadcfa.system.entry.js +1 -0
- package/dist/esm/app-globals-d7dd3a4d.js +396 -0
- package/dist/esm/cura-display_3.entry.js +181 -0
- package/dist/esm/cura-icon.entry.js +55 -0
- package/dist/esm/{cura-icon_2.entry.js → cura-icons-view.entry.js} +3 -56
- package/dist/esm/cura.js +3 -3
- package/dist/esm/{index-cec9b650.js → index-c3d31886.js} +29 -0
- package/dist/esm/loader.js +3 -3
- package/dist/esm-es5/app-globals-d7dd3a4d.js +1 -0
- package/dist/esm-es5/cura-display_3.entry.js +1 -0
- package/dist/esm-es5/cura-icon.entry.js +1 -0
- package/dist/esm-es5/cura-icons-view.entry.js +1 -0
- package/dist/esm-es5/cura.js +1 -1
- package/dist/esm-es5/index-c3d31886.js +2 -0
- package/dist/esm-es5/loader.js +1 -1
- package/dist/types/api/cura-api.type.d.ts +9 -0
- package/dist/types/api/modules/cura-theme-colors-module.d.ts +48 -0
- package/dist/types/api/modules/cura-theme-fonts-module.d.ts +24 -0
- package/dist/types/api/modules/cura-theme-module.d.ts +4 -0
- package/dist/types/api/theme-presets/static.d.ts +78 -0
- package/dist/types/api/theme-presets/theme-default.d.ts +28 -22
- package/dist/types/api/theme-presets/theme-maternity.d.ts +23 -19
- package/dist/types/api/theme-presets/theme-presets.d.ts +51 -41
- package/dist/types/components/cura-icon/cura-icon.d.ts +1 -1
- package/dist/types/components/text/cura-display/cura-display.d.ts +28 -0
- package/dist/types/components/text/cura-heading/cura-heading.d.ts +33 -0
- package/dist/types/components/text/cura-paragraph/cura-paragraph.d.ts +22 -0
- package/dist/types/components.d.ts +83 -9
- package/package.json +2 -2
- package/dist/cjs/app-globals-af978331.js +0 -175
- package/dist/cjs/dummy-component.cjs.entry.js +0 -19
- package/dist/collection/components/dummy-component/dummy-component.css +0 -3
- package/dist/collection/components/dummy-component/dummy-component.js +0 -18
- package/dist/components/dummy-component.js +0 -33
- package/dist/cura/p-3132f4b7.system.js +0 -2
- package/dist/cura/p-70abb532.system.js +0 -1
- package/dist/cura/p-81ae13d7.entry.js +0 -1
- package/dist/cura/p-a0cd4b75.system.js +0 -1
- package/dist/cura/p-abcda1d1.js +0 -2
- package/dist/cura/p-ac79f9d1.entry.js +0 -1
- package/dist/cura/p-b4c69836.system.entry.js +0 -1
- package/dist/cura/p-d2dcd470.js +0 -1
- package/dist/cura/p-e1e4b2ea.system.entry.js +0 -1
- package/dist/esm/app-globals-962e5cc3.js +0 -173
- package/dist/esm/dummy-component.entry.js +0 -15
- package/dist/esm-es5/app-globals-962e5cc3.js +0 -1
- package/dist/esm-es5/cura-icon_2.entry.js +0 -1
- package/dist/esm-es5/dummy-component.entry.js +0 -1
- package/dist/esm-es5/index-cec9b650.js +0 -2
- package/dist/types/components/dummy-component/dummy-component.d.ts +0 -3
|
@@ -0,0 +1 @@
|
|
|
1
|
+
System.register([],(function(t){"use strict";return{execute:function(){var e={color:{primary:{100:"#71C5E8",300:"#449CD5",500:"#005EB8",700:"#004890",900:"#002855"},secondary:{100:"#F5ECE3",300:"#DDC0A2",500:"#CCA074",700:"#886B4D",900:"#292017"},accent:{100:"#F9E8D5",300:"#E4A04F",500:"#DF8D2C",700:"#955E1D",900:"#2D1C09"}},spacing:{base:4},font:{size:"14px",color:"#4A4A4A",body:"'Roboto', Arial, Helvetica, sans-serif",heading:"'Roboto', Arial, Helvetica, sans-serif",display:"'Roboto', Arial, Helvetica, sans-serif",weights:{thin:100,light:300,regular:400,medium:500,bold:700,black:900}}};var r=Object.assign(Object.assign({},e),{color:{primary:{100:"#FCEFF6",300:"#FFBFE5",500:"#CD4D9A",700:"#99126C",900:"#00133B"},secondary:{100:"#EDF3FF",300:"#BDD2FF",500:"#189AB4",700:"#001C58",900:"#430E31"}}});var o={default:e,maternidade:r};var i={color:{success:{lighter:"#DFF6E9",light:"#94E1B5",base:"#5FD290",dark:"#3F8C60",darker:"#132A1D",depth100:"#DFF6E9",depth300:"#94E1B5",depth500:"#5FD290",depth700:"#3F8C60",depth900:"#132A1D"},info:{lighter:"#CFE2FF",light:"#95BFFF",base:"#6EA8FF",dark:"#517BBB",darker:"#253855",depth100:"#CFE2FF",depth300:"#95BFFF",depth500:"#6EA8FF",depth700:"#517BBB",depth900:"#253855"},error:{lighter:"#FBDDDD",light:"#F28F8F",base:"#EB5757",dark:"#9D3A3A",darker:"#2F1111",depth100:"#FBDDDD",depth300:"#F28F8F",depth500:"#EB5757",depth700:"#9D3A3A",depth900:"#2F1111"},warning:{lighter:"#FCFAC4",light:"#F8F489",base:"#F5EF4E",dark:"#A39F34",darker:"#313010",depth100:"#FCFAC4",depth300:"#F8F489",depth500:"#F5EF4E",depth700:"#A39F34",depth900:"#313010"},neutral:{0:"#FFFFFF",100:"#F6F6F6",200:"#E9E9E9",300:"#E2E2E2",400:"#D4D4D4",500:"#B7B7B7",600:"#929292",700:"#6E6E6E",800:"#4A4A4A",900:"#262626"}},icons:{sizes:["128","72","64","48","40","32","24","20","16"],strokes:["5.25","3.5","3.25","2.75","2.5","2.25","2","1.75","1.5"],"default-size":"24"},breakpoints:{small:"576px",medium:"768px",large:"992px",xlarge:"1200px"}};var a=function(){function t(){this.NeutralDepthAlias={purewhite:"0",white:"100",pale:"200",lighter:"300",light:"400",base:"500",medium:"600",dark:"700",darker:"800",black:"900"};this.ColorDepthAlias={lighter:"100",light:"300",base:"500",dark:"700",darker:"900"}}t.prototype.getColor=function(t){if(t===void 0){t="primary-base"}var e=this.splitColorDepth(t),r=e.color,o=e.depth;var i=this.getStatic(r,o);if(i)return i;return this.getDynamic(r,o)};t.prototype.getStatic=function(t,e){var r,o;return((r=i.color[t])===null||r===void 0?void 0:r[e])||((o=i.color[t])===null||o===void 0?void 0:o[this.NeutralDepthAlias[e]])||null};t.prototype.getDynamic=function(t,e){var r=this.ColorDepthAlias[e]?"--cura-color-".concat(t,"-").concat(this.ColorDepthAlias[e]):"--cura-color-".concat(t,"-").concat(e);return getComputedStyle(document.body).getPropertyValue(r)?"var(".concat(r,")"):"var(--cura-color-primary-500)"};t.prototype.splitColorDepth=function(t){var e=t.toLowerCase().split(/-(.*)/),r=e[0],o=e[1];return{color:r!==null&&r!==void 0?r:"primary",depth:o!==null&&o!==void 0?o:"base"}};return t}();var n=function(){function t(){this.getSize=function(){return"var(--cura-font-size)"};this.getColor=function(){return"var(--cura-font-color)"}}t.prototype.getFamily=function(t){if(t===void 0){t="body"}var e="--cura-font-".concat(t.toLowerCase());return getComputedStyle(document.body).getPropertyValue(e)?"var(".concat(e,")"):"var(--cura-font-body)"};t.prototype.getWeights=function(){var t={};Object.keys(e.font.weights).forEach((function(e){return t[e]="var(--cura-font-weights-".concat(e,")")}));return t};return t}();var s=function(){function t(){var t=this;this.prefix="--cura";this.colors=new a;this.fonts=new n;this.setCssVar=function(e,r){var o=t.groupPath(r,e[0]);t.body.style.setProperty(o,e[1])};this.groupPath=function(t,e){return"".concat(t,"-").concat(e)};this.isObject=function(t){return t&&typeof t==="object"&&!Array.isArray(t)};this.mergeObject=function(e,r){var o=Object.entries(e);for(var i=0,a=o;i<a.length;i++){var n=a[i];if(t.isObject(n[1])){t.mergeObject(n[1],r[n[0]])}else{r[n[0]]=n[1]}}};this.buildCssVars=function(e,r){var o=Object.entries(r);for(var i=0,a=o;i<a.length;i++){var n=a[i];if(t.isObject(n[1])){t.buildCssVars(t.groupPath(e,n[0]),n[1])}else{t.setCssVar(n,e)}}};this.body=window.document.documentElement.querySelector("body")}t.prototype.load=function(t){if(t===void 0){t="default"}var e=o[t]?o[t]:o.default;this.buildCssVars(this.prefix,e)};t.prototype.setCustom=function(t){var e=t.name;if(e in o){console.log("Error building custom theme. Theme %s already exists. Loading default theme.",e);this.load("default")}else{var r=t.fromPreset&&t.fromPreset in o?o[t.fromPreset]:o.default;var i=Object.assign({},JSON.parse(JSON.stringify(r)));this.mergeObject(t.definitions,i);o[e]=i;this.load(e)}};return t}();var c=function(){function t(t){this.localAssetsPath=t&&t.localAssetsPath?t.localAssetsPath:"/assets";var e=new s;this.theme={load:function(t){e.load(t)},setCustom:function(t){e.setCustom(t)},colors:{getColor:function(t){return e.colors.getColor(t)}},fonts:{getFamily:function(t){return e.fonts.getFamily(t)},getWeights:function(){return e.fonts.getWeights()},getSize:function(){return e.fonts.getSize()},getColor:function(){return e.fonts.getColor()}}};if(t&&t.customTheme){this.theme.setCustom(t.customTheme)}else{var r=t&&t.theme?t.theme:"default";this.theme.load(r)}}return t}();function l(){var t=window.CuraInit;window.CuraAPI=t?new c(t):new c;var e=window.CuraAPI;window.dispatchEvent(new CustomEvent("CuraAPIReady",{detail:{api:e}}));if(t&&typeof t.onReady==="function")t.onReady(e)}var u=t("g",l)}}}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
System.register(["./p-e447016d.system.js"],(function(e){"use strict";var i,n,a;return{setters:[function(e){i=e.r;n=e.h;a=e.H}],execute:function(){var l=["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","fileBmp","fileJpg","filePdf","filePng","fileUpload","fileXls","filter","fullscreen","gallery","geotag","hate","healthPlan","height","height2","home","horizontalList","imageUp","info2","infoCircle","key","language","language2","languageEN","languagePT","like","link","linkExternal","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","unLink","unSecure","upload","verticalList","viewFalse","viewTrue","weight","wifi","zoomIn","zoomOut"];var s=":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 r=e("cura_icons_view",function(){function e(e){var n=this;i(this,e);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(e){n.selected=e}}e.prototype.render=function(){var e=this;return n(a,null,n("div",{class:"iconDetail"},n("h4",null,this.selected),n("div",{class:"iconSizes"},this.sizes.map((function(i){return n("div",{class:"size"},n("cura-icon",{name:e.selected,size:i}),n("span",null,i))}))),n("div",{class:"iconSizes invert"},this.sizes.map((function(i){return n("div",{class:"size"},n("cura-icon",{name:e.selected,size:i,color:"neutral-white"}),n("span",null,i))}))),n("div",{class:"iconSizes"},this.colors.map((function(i){return n("div",{class:"size"},n("cura-icon",{name:e.selected,color:i}),n("span",null,i))})),n("div",{class:"size"},n("cura-icon",{name:this.selected,disabled:true}),n("span",null,"Disabled")))),n("div",{class:"icons"},l.map((function(i){return n("div",{class:"icon",onClick:function(){return e.setSelected(i)}},n("cura-icon",{name:i}),n("span",null,i))}))))};return e}());r.style=s}}}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as i,h as e,H as a}from"./p-a50716bc.js";const l=["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","fileBmp","fileJpg","filePdf","filePng","fileUpload","fileXls","filter","fullscreen","gallery","geotag","hate","healthPlan","height","height2","home","horizontalList","imageUp","info2","infoCircle","key","language","language2","languageEN","languagePT","like","link","linkExternal","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","unLink","unSecure","upload","verticalList","viewFalse","viewTrue","weight","wifi","zoomIn","zoomOut"],s=class{constructor(e){i(this,e),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=i=>{this.selected=i}}render(){return e(a,null,e("div",{class:"iconDetail"},e("h4",null,this.selected),e("div",{class:"iconSizes"},this.sizes.map((i=>e("div",{class:"size"},e("cura-icon",{name:this.selected,size:i}),e("span",null,i))))),e("div",{class:"iconSizes invert"},this.sizes.map((i=>e("div",{class:"size"},e("cura-icon",{name:this.selected,size:i,color:"neutral-white"}),e("span",null,i))))),e("div",{class:"iconSizes"},this.colors.map((i=>e("div",{class:"size"},e("cura-icon",{name:this.selected,color:i}),e("span",null,i)))),e("div",{class:"size"},e("cura-icon",{name:this.selected,disabled:!0}),e("span",null,"Disabled")))),e("div",{class:"icons"},l.map((i=>e("div",{class:"icon",onClick:()=>this.setSelected(i)},e("cura-icon",{name:i}),e("span",null,i))))))}};s.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}";export{s as cura_icons_view}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
System.register(["./p-e447016d.system.js"],(function(t){"use strict";var e,s,o,h;return{setters:[function(t){e=t.r;s=t.h;o=t.H;h=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 i=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 h(this)},enumerable:false,configurable:true});return t}());i.style=l;var r=":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 n=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 h(this)},enumerable:false,configurable:true});return t}());n.style=r;var a=":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 g=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 h(this)},enumerable:false,configurable:true});return t}());g.style=a}}}));
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
let t,e,n=!1,l=!1;const s="http://www.w3.org/1999/xlink",o={},r=t=>"object"==(t=typeof t)||"function"===t,c=(t,e,...n)=>{let l=null,s=!1,o=!1;const c=[],u=e=>{for(let n=0;n<e.length;n++)l=e[n],Array.isArray(l)?u(l):null!=l&&"boolean"!=typeof l&&((s="function"!=typeof t&&!r(l))&&(l+=""),s&&o?c[c.length-1].t+=l:c.push(s?i(null,l):l),o=s)};if(u(n),e){const t=e.className||e.class;t&&(e.class="object"!=typeof t?t:Object.keys(t).filter((e=>t[e])).join(" "))}const a=i(t,null);return a.l=e,c.length>0&&(a.o=c),a},i=(t,e)=>({i:0,u:t,t:e,h:null,o:null,l:null}),u={},a=t=>H(t).$,f=new WeakMap,h=t=>"sc-"+t.p,y=(t,e,n,l,o,c)=>{if(n!==l){let i=U(t,e),u=e.toLowerCase();if("class"===e){const e=t.classList,s=p(n),o=p(l);e.remove(...s.filter((t=>t&&!o.includes(t)))),e.add(...o.filter((t=>t&&!s.includes(t))))}else if("style"===e){for(const e in n)l&&null!=l[e]||(e.includes("-")?t.style.removeProperty(e):t.style[e]="");for(const e in l)n&&l[e]===n[e]||(e.includes("-")?t.style.setProperty(e,l[e]):t.style[e]=l[e])}else if(i||"o"!==e[0]||"n"!==e[1]){const a=r(l);if((i||a&&null!==l)&&!o)try{if(t.tagName.includes("-"))t[e]=l;else{const s=null==l?"":l;"list"===e?i=!1:null!=n&&t[e]==s||(t[e]=s)}}catch(t){}let f=!1;u!==(u=u.replace(/^xlink\:?/,""))&&(e=u,f=!0),null==l||!1===l?!1===l&&""!==t.getAttribute(e)||(f?t.removeAttributeNS(s,e):t.removeAttribute(e)):(!i||4&c||o)&&!a&&(l=!0===l?"":l,f?t.setAttributeNS(s,e,l):t.setAttribute(e,l))}else e="-"===e[2]?e.slice(3):U(z,u)?u.slice(2):u[2]+e.slice(3),n&&D.rel(t,e,n,!1),l&&D.ael(t,e,l,!1)}},$=/\s/,p=t=>t?t.split($):[],w=(t,e,n,l)=>{const s=11===e.h.nodeType&&e.h.host?e.h.host:e.h,r=t&&t.l||o,c=e.l||o;for(l in r)l in c||y(s,l,r[l],void 0,n,e.i);for(l in c)y(s,l,r[l],c[l],n,e.i)},d=(e,l,s)=>{const o=l.o[s];let r,c,i=0;if(null!==o.t)r=o.h=B.createTextNode(o.t);else{if(n||(n="svg"===o.u),r=o.h=B.createElementNS(n?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",o.u),n&&"foreignObject"===o.u&&(n=!1),w(null,o,n),null!=t&&r["s-si"]!==t&&r.classList.add(r["s-si"]=t),o.o)for(i=0;i<o.o.length;++i)c=d(e,o,i),c&&r.appendChild(c);"svg"===o.u?n=!1:"foreignObject"===r.tagName&&(n=!0)}return r},m=(t,n,l,s,o,r)=>{let c,i=t;for(i.shadowRoot&&i.tagName===e&&(i=i.shadowRoot);o<=r;++o)s[o]&&(c=d(null,l,o),c&&(s[o].h=c,i.insertBefore(c,n)))},b=(t,e,n,l)=>{for(;e<=n;++e)(l=t[e])&&l.h.remove()},g=(t,e)=>t.u===e.u,v=(t,e)=>{const l=e.h=t.h,s=t.o,o=e.o,r=e.u,c=e.t;null===c?(n="svg"===r||"foreignObject"!==r&&n,"slot"===r||w(t,e,n),null!==s&&null!==o?((t,e,n,l)=>{let s,o=0,r=0,c=e.length-1,i=e[0],u=e[c],a=l.length-1,f=l[0],h=l[a];for(;o<=c&&r<=a;)null==i?i=e[++o]:null==u?u=e[--c]:null==f?f=l[++r]:null==h?h=l[--a]:g(i,f)?(v(i,f),i=e[++o],f=l[++r]):g(u,h)?(v(u,h),u=e[--c],h=l[--a]):g(i,h)?(v(i,h),t.insertBefore(i.h,u.h.nextSibling),i=e[++o],h=l[--a]):g(u,f)?(v(u,f),t.insertBefore(u.h,i.h),u=e[--c],f=l[++r]):(s=d(e&&e[r],n,r),f=l[++r],s&&i.h.parentNode.insertBefore(s,i.h));o>c?m(t,null==l[a+1]?null:l[a+1].h,n,l,r,a):r>a&&b(e,o,c)})(l,s,e,o):null!==o?(null!==t.t&&(l.textContent=""),m(l,null,e,o,0,o.length-1)):null!==s&&b(s,0,s.length-1),n&&"svg"===r&&(n=!1)):t.t!==c&&(l.data=c)},S=(t,e)=>{e&&!t.m&&e["s-p"]&&e["s-p"].push(new Promise((e=>t.m=e)))},j=(t,e)=>{if(t.i|=16,!(4&t.i))return S(t,t.g),tt((()=>k(t,e)));t.i|=512},k=(t,e)=>{const n=t.v;return P(void 0,(()=>O(t,n,e)))},O=async(t,e,n)=>{const l=t.$,s=l["s-rc"];n&&(t=>{const e=t.S,n=t.$,l=e.i,s=((t,e)=>{let n=h(e);const l=_.get(n);if(t=11===t.nodeType?t:B,l)if("string"==typeof l){let e,s=f.get(t=t.head||t);s||f.set(t,s=new Set),s.has(n)||(e=B.createElement("style"),e.innerHTML=l,t.insertBefore(e,t.querySelector("link")),s&&s.add(n))}else t.adoptedStyleSheets.includes(l)||(t.adoptedStyleSheets=[...t.adoptedStyleSheets,l]);return n})(n.shadowRoot?n.shadowRoot:n.getRootNode(),e);10&l&&(n["s-sc"]=s,n.classList.add(s+"-h"))})(t);M(t,e),s&&(s.map((t=>t())),l["s-rc"]=void 0);{const e=l["s-p"],n=()=>C(t);0===e.length?n():(Promise.all(e).then(n),t.i|=4,e.length=0)}},M=(n,l)=>{try{l=l.render(),n.i&=-17,n.i|=2,((n,l)=>{const s=n.$,o=n.S,r=n.j||i(null,null),a=(t=>t&&t.u===u)(l)?l:c(null,null,l);e=s.tagName,o.k&&(a.l=a.l||{},o.k.map((([t,e])=>a.l[e]=s[t]))),a.u=null,a.i|=4,n.j=a,a.h=r.h=s.shadowRoot||s,t=s["s-sc"],v(r,a)})(n,l)}catch(t){W(t,n.$)}return null},C=t=>{const e=t.$,n=t.g;64&t.i||(t.i|=64,E(e),t.O(e),n||x()),t.m&&(t.m(),t.m=void 0),512&t.i&&Z((()=>j(t,!1))),t.i&=-517},x=()=>{E(B.documentElement),Z((()=>(t=>{const e=D.ce("appload",{detail:{namespace:"cura"}});return t.dispatchEvent(e),e})(z)))},P=(t,e)=>t&&t.then?t.then(e):e(),E=t=>t.classList.add("hydrated"),N=(t,e,n)=>{if(e.M){t.watchers&&(e.C=t.watchers);const l=Object.entries(e.M),s=t.prototype;if(l.map((([t,[l]])=>{(31&l||2&n&&32&l)&&Object.defineProperty(s,t,{get(){return((t,e)=>H(this).P.get(e))(0,t)},set(n){((t,e,n,l)=>{const s=H(t),o=s.$,c=s.P.get(e),i=s.i,u=s.v;if(n=((t,e)=>null==t||r(t)?t:4&e?"false"!==t&&(""===t||!!t):2&e?parseFloat(t):1&e?t+"":t)(n,l.M[e][0]),(!(8&i)||void 0===c)&&n!==c&&(!Number.isNaN(c)||!Number.isNaN(n))&&(s.P.set(e,n),u)){if(l.C&&128&i){const t=l.C[e];t&&t.map((t=>{try{u[t](n,c,e)}catch(t){W(t,o)}}))}2==(18&i)&&j(s,!1)}})(this,t,n,e)},configurable:!0,enumerable:!0})})),1&n){const n=new Map;s.attributeChangedCallback=function(t,e,l){D.jmp((()=>{const e=n.get(t);if(this.hasOwnProperty(e))l=this[e],delete this[e];else if(s.hasOwnProperty(e)&&"number"==typeof this[e]&&this[e]==l)return;this[e]=(null!==l||"boolean"!=typeof this[e])&&l}))},t.observedAttributes=l.filter((([t,e])=>15&e[0])).map((([t,l])=>{const s=l[1]||t;return n.set(s,t),512&l[0]&&e.k.push([t,s]),s}))}}return t},T=t=>{((t,e)=>{if(t&&t[e])try{t[e](void 0)}catch(t){W(t)}})(t,"connectedCallback")},A=(t,e={})=>{const n=[],l=e.exclude||[],s=z.customElements,o=B.head,r=o.querySelector("meta[charset]"),c=B.createElement("style"),i=[];let u,a=!0;Object.assign(D,e),D.N=new URL(e.resourcesUrl||"./",B.baseURI).href,t.map((t=>{t[1].map((e=>{const o={i:e[0],p:e[1],M:e[2],T:e[3]};o.M=e[2],o.k=[],o.C={};const r=o.p,c=class extends HTMLElement{constructor(t){super(t),R(t=this,o),1&o.i&&t.attachShadow({mode:"open"})}connectedCallback(){u&&(clearTimeout(u),u=null),a?i.push(this):D.jmp((()=>(t=>{if(0==(1&D.i)){const e=H(t),n=e.S,l=()=>{};if(1&e.i)T(e.v);else{e.i|=1;{let n=t;for(;n=n.parentNode||n.host;)if(n["s-p"]){S(e,e.g=n);break}}n.M&&Object.entries(n.M).map((([e,[n]])=>{if(31&n&&t.hasOwnProperty(e)){const n=t[e];delete t[e],t[e]=n}})),(async(t,e,n,l,s)=>{if(0==(32&e.i)){{if(e.i|=32,(s=V(n)).then){const t=()=>{};s=await s,t()}s.isProxied||(n.C=s.watchers,N(s,n,2),s.isProxied=!0);const t=()=>{};e.i|=8;try{new s(e)}catch(t){W(t)}e.i&=-9,e.i|=128,t(),T(e.v)}if(s.style){let t=s.style;const e=h(n);if(!_.has(e)){const l=()=>{};((t,e,n)=>{let l=_.get(t);I&&n?(l=l||new CSSStyleSheet,"string"==typeof l?l=e:l.replaceSync(e)):l=e,_.set(t,l)})(e,t,!!(1&n.i)),l()}}}const o=e.g,r=()=>j(e,!0);o&&o["s-rc"]?o["s-rc"].push(r):r()})(0,e,n)}l()}})(this)))}disconnectedCallback(){D.jmp((()=>{}))}componentOnReady(){return H(this).A}};o.F=t[0],l.includes(r)||s.get(r)||(n.push(r),s.define(r,N(c,o,1)))}))})),c.innerHTML=n+"{visibility:hidden}.hydrated{visibility:inherit}",c.setAttribute("data-styles",""),o.insertBefore(c,r?r.nextSibling:o.firstChild),a=!1,i.length?i.map((t=>t.connectedCallback())):D.jmp((()=>u=setTimeout(x,30)))},F=new WeakMap,H=t=>F.get(t),L=(t,e)=>F.set(e.v=t,e),R=(t,e)=>{const n={i:0,$:t,S:e,P:new Map};return n.A=new Promise((t=>n.O=t)),t["s-p"]=[],t["s-rc"]=[],F.set(t,n)},U=(t,e)=>e in t,W=(t,e)=>(0,console.error)(t,e),q=new Map,V=t=>{const e=t.p.replace(/-/g,"_"),n=t.F,l=q.get(n);return l?l[e]:import(`./${n}.entry.js`).then((t=>(q.set(n,t),t[e])),W)
|
|
2
|
+
/*!__STENCIL_STATIC_IMPORT_SWITCH__*/},_=new Map,z="undefined"!=typeof window?window:{},B=z.document||{head:{}},D={i:0,N:"",jmp:t=>t(),raf:t=>requestAnimationFrame(t),ael:(t,e,n,l)=>t.addEventListener(e,n,l),rel:(t,e,n,l)=>t.removeEventListener(e,n,l),ce:(t,e)=>new CustomEvent(t,e)},G=t=>Promise.resolve(t),I=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch(t){}return!1})(),J=[],K=[],Q=(t,e)=>n=>{t.push(n),l||(l=!0,e&&4&D.i?Z(Y):D.raf(Y))},X=t=>{for(let e=0;e<t.length;e++)try{t[e](performance.now())}catch(t){W(t)}t.length=0},Y=()=>{X(J),X(K),(l=J.length>0)&&D.raf(Y)},Z=t=>G().then(t),tt=Q(K,!0);export{u as H,A as b,a as g,c as h,G as p,L as r}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
System.register(["./p-e447016d.system.js","./p-3d8bbf37.system.js"],(function(e,s){"use strict";var r,t,n;return{setters:[function(e){r=e.p;t=e.b},function(e){n=e.g}],execute:function(){var e=function(){var e=s.meta.url;var t={};if(e!==""){t.resourcesUrl=new URL(".",e).href}return r(t)};e().then((function(e){n();return t([["p-e8fadcfa.system",[[1,"cura-icon",{name:[513],color:[1],size:[8],iconset:[513],disabled:[4]}]]],["p-5ae0d10c.system",[[1,"cura-icons-view",{selected:[32]}]]],["p-9312a846.system",[[1,"cura-display",{level:[514],size:[513]}],[1,"cura-heading",{level:[514],size:[513],weight:[513]}],[1,"cura-paragraph",{size:[513]}]]]],e)}))}}}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,h as s,H as h,g as o}from"./p-a50716bc.js";const e=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(h,null,this.getHeadingTag())}get host(){return o(this)}};e.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(h,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 i=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(h,null,s("p",{style:this.styles,class:this.setsizeClass()},s("slot",null)))}get host(){return o(this)}};i.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{e as cura_display,l as cura_heading,i as cura_paragraph}
|
|
@@ -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(e){"use strict";var t,s,i,o;return{setters:[function(e){t=e.r;s=e.h;i=e.H;o=e.g}],execute:function(){var r=":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 n=e("cura_icon",function(){function e(e){t(this,e);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}}}e.prototype.sizeHandler=function(e){var t=this;var s=function(e){return"".concat(t.sizes[e].stroke*(t.sizes.default.size/t.sizes[e].size),"px")};this.setHostProperty("--size",this.sizes["".concat(e)]?"".concat(this.sizes[e].size,"px"):"".concat(this.sizes.default.size,"px"));this.setHostProperty("--stroke",this.sizes["".concat(e)]?s(e):s("default"))};e.prototype.colorHandler=function(){this.setHostProperty("--color",window.CuraAPI.theme.colors.getColor(this.disabled?"neutral-light":this.color))};e.prototype.connectedCallback=function(){this.assetsPath=window.CuraAPI.localAssetsPath;this.sizeHandler(this.size);this.colorHandler()};e.prototype.setHostProperty=function(e,t){this.host.style.setProperty(e,t)};e.prototype.render=function(){return s(i,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(e.prototype,"host",{get:function(){return o(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{size:["sizeHandler"],color:["colorHandler"],disabled:["colorHandler"]}},enumerable:false,configurable:true});return e}());n.style=r}}}));
|
|
@@ -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 };
|