@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
|
@@ -1,175 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Cura Default Theme
|
|
5
|
-
*/
|
|
6
|
-
const ThemeDefault = {
|
|
7
|
-
/* Colors */
|
|
8
|
-
color: {
|
|
9
|
-
primary: {
|
|
10
|
-
depth100: '#CCD9E7',
|
|
11
|
-
depth300: '#5580AE',
|
|
12
|
-
base: '#004186',
|
|
13
|
-
depth700: '#002B59',
|
|
14
|
-
depth900: '#00133B'
|
|
15
|
-
},
|
|
16
|
-
secondary: {
|
|
17
|
-
depth100: '#EEE8CE',
|
|
18
|
-
depth300: '#C6B45C',
|
|
19
|
-
base: '#AA8E0B',
|
|
20
|
-
depth700: '#715F07',
|
|
21
|
-
depth900: '#221C02'
|
|
22
|
-
},
|
|
23
|
-
accent: {
|
|
24
|
-
depth100: '#F9E8D5',
|
|
25
|
-
depth300: '#E4A04F',
|
|
26
|
-
base: '#DF8D2C',
|
|
27
|
-
depth700: '#955E1D',
|
|
28
|
-
depth900: '#2D1C09'
|
|
29
|
-
}
|
|
30
|
-
},
|
|
31
|
-
/* Spacing */
|
|
32
|
-
spacing: {
|
|
33
|
-
base: '8px',
|
|
34
|
-
},
|
|
35
|
-
/* Fonts */
|
|
36
|
-
font: {
|
|
37
|
-
family: {
|
|
38
|
-
title: 'serif',
|
|
39
|
-
body: '"Roboto", Helvetica, Arial, sans-serif'
|
|
40
|
-
},
|
|
41
|
-
size: {
|
|
42
|
-
base: '16px',
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
};
|
|
46
|
-
|
|
47
|
-
/**
|
|
48
|
-
* Maternity Theme
|
|
49
|
-
*/
|
|
50
|
-
const ThemeMaternity = Object.assign(Object.assign({}, ThemeDefault), {
|
|
51
|
-
/* Custom */
|
|
52
|
-
/* Colors */
|
|
53
|
-
color: {
|
|
54
|
-
primary: {
|
|
55
|
-
base: '#CD4D9A',
|
|
56
|
-
depth100: '#FCEFF6',
|
|
57
|
-
depth300: '#FFBFE5',
|
|
58
|
-
depth500: '#FF7FCB',
|
|
59
|
-
depth700: '#99126C',
|
|
60
|
-
depth900: '#00133B'
|
|
61
|
-
},
|
|
62
|
-
secondary: {
|
|
63
|
-
base: '#189AB4',
|
|
64
|
-
depth100: '#EDF3FF',
|
|
65
|
-
depth300: '#BDD2FF',
|
|
66
|
-
depth500: '#496BB6',
|
|
67
|
-
depth700: '#001C58',
|
|
68
|
-
depth900: '#430E31'
|
|
69
|
-
}
|
|
70
|
-
} });
|
|
71
|
-
|
|
72
|
-
const ThemePresets = {
|
|
73
|
-
'default': ThemeDefault,
|
|
74
|
-
'maternidade': ThemeMaternity
|
|
75
|
-
};
|
|
76
|
-
|
|
77
|
-
class CuraThemeModule {
|
|
78
|
-
constructor() {
|
|
79
|
-
this.prefix = '--cura';
|
|
80
|
-
/* Private */
|
|
81
|
-
/** Set css var based on object structure */
|
|
82
|
-
this.setCssVar = (prop, path) => {
|
|
83
|
-
const varName = this.groupPath(path, prop[0]);
|
|
84
|
-
this.body.style.setProperty(varName, prop[1]);
|
|
85
|
-
};
|
|
86
|
-
this.groupPath = (a, b) => `${a}-${b}`;
|
|
87
|
-
this.isObject = (val) => {
|
|
88
|
-
return val && typeof val === 'object' && !Array.isArray(val);
|
|
89
|
-
};
|
|
90
|
-
/** Deep merge objects */
|
|
91
|
-
this.mergeObject = (from, to) => {
|
|
92
|
-
const entries = Object.entries(from);
|
|
93
|
-
for (let e of entries) {
|
|
94
|
-
if (this.isObject(e[1])) {
|
|
95
|
-
this.mergeObject(e[1], to[e[0]]);
|
|
96
|
-
}
|
|
97
|
-
else {
|
|
98
|
-
to[e[0]] = e[1];
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
};
|
|
102
|
-
/** Set css vars from preset object */
|
|
103
|
-
this.buildCssVars = (path, obj) => {
|
|
104
|
-
const entries = Object.entries(obj);
|
|
105
|
-
for (let e of entries) {
|
|
106
|
-
if (this.isObject(e[1])) {
|
|
107
|
-
this.buildCssVars(this.groupPath(path, e[0]), e[1]);
|
|
108
|
-
}
|
|
109
|
-
else {
|
|
110
|
-
this.setCssVar(e, path);
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
};
|
|
114
|
-
this.body = window.document.documentElement.querySelector('body');
|
|
115
|
-
}
|
|
116
|
-
/**
|
|
117
|
-
* Load a theme.
|
|
118
|
-
* @param theme Theme tag.
|
|
119
|
-
*/
|
|
120
|
-
load(theme = 'default') {
|
|
121
|
-
const preset = ThemePresets[theme] ? ThemePresets[theme] : ThemePresets.default;
|
|
122
|
-
this.buildCssVars(this.prefix, preset);
|
|
123
|
-
}
|
|
124
|
-
/**
|
|
125
|
-
* Define a custom theme
|
|
126
|
-
* @param customTheme Custom theme object definition
|
|
127
|
-
*/
|
|
128
|
-
setCustom(customTheme) {
|
|
129
|
-
const customTag = customTheme.name;
|
|
130
|
-
if (customTag in ThemePresets) {
|
|
131
|
-
console.log('Error building custom theme. Theme %s already exists. Loading default theme.', customTag);
|
|
132
|
-
this.load('default');
|
|
133
|
-
}
|
|
134
|
-
else {
|
|
135
|
-
const preset = customTheme.fromPreset && customTheme.fromPreset in ThemePresets
|
|
136
|
-
? ThemePresets[customTheme.fromPreset]
|
|
137
|
-
: ThemePresets.default;
|
|
138
|
-
const newTheme = Object.assign({}, JSON.parse(JSON.stringify(preset)));
|
|
139
|
-
this.mergeObject(customTheme.definitions, newTheme);
|
|
140
|
-
ThemePresets[customTag] = newTheme;
|
|
141
|
-
this.load(customTag);
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
class CuraAPI {
|
|
147
|
-
constructor(config) {
|
|
148
|
-
this.localAssetsPath = config && config.localAssetsPath ? config.localAssetsPath : `/assets`;
|
|
149
|
-
const themeModule = new CuraThemeModule();
|
|
150
|
-
this.theme = {
|
|
151
|
-
load: function (themeTag) { themeModule.load(themeTag); },
|
|
152
|
-
setCustom: function (customThemeDefinitions) { themeModule.setCustom(customThemeDefinitions); }
|
|
153
|
-
};
|
|
154
|
-
if (config && config.customTheme) {
|
|
155
|
-
this.theme.setCustom(config.customTheme);
|
|
156
|
-
}
|
|
157
|
-
else {
|
|
158
|
-
const theme = config && config.theme ? config.theme : 'default';
|
|
159
|
-
this.theme.load(theme);
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
function appGlobalScript () {
|
|
165
|
-
const config = window.CuraInit;
|
|
166
|
-
window.CuraAPI = config ? new CuraAPI(config) : new CuraAPI();
|
|
167
|
-
const api = window.CuraAPI;
|
|
168
|
-
window.dispatchEvent(new CustomEvent("CuraAPIReady", { detail: { api } }));
|
|
169
|
-
if (config && typeof config.onReady === 'function')
|
|
170
|
-
config.onReady(api);
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
const globalScripts = appGlobalScript;
|
|
174
|
-
|
|
175
|
-
exports.globalScripts = globalScripts;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
const index = require('./index-9092c64d.js');
|
|
6
|
-
|
|
7
|
-
const dummyComponentCss = ":host{display:block}";
|
|
8
|
-
|
|
9
|
-
const DummyComponent = class {
|
|
10
|
-
constructor(hostRef) {
|
|
11
|
-
index.registerInstance(this, hostRef);
|
|
12
|
-
}
|
|
13
|
-
render() {
|
|
14
|
-
return (index.h(index.Host, null, index.h("h1", null, index.h("slot", null))));
|
|
15
|
-
}
|
|
16
|
-
};
|
|
17
|
-
DummyComponent.style = dummyComponentCss;
|
|
18
|
-
|
|
19
|
-
exports.dummy_component = DummyComponent;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { Host, h } from '@stencil/core';
|
|
2
|
-
export class DummyComponent {
|
|
3
|
-
render() {
|
|
4
|
-
return (h(Host, null, h("h1", null, h("slot", null))));
|
|
5
|
-
}
|
|
6
|
-
static get is() { return "dummy-component"; }
|
|
7
|
-
static get encapsulation() { return "shadow"; }
|
|
8
|
-
static get originalStyleUrls() {
|
|
9
|
-
return {
|
|
10
|
-
"$": ["dummy-component.scss"]
|
|
11
|
-
};
|
|
12
|
-
}
|
|
13
|
-
static get styleUrls() {
|
|
14
|
-
return {
|
|
15
|
-
"$": ["dummy-component.css"]
|
|
16
|
-
};
|
|
17
|
-
}
|
|
18
|
-
}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
|
-
|
|
3
|
-
const dummyComponentCss = ":host{display:block}";
|
|
4
|
-
|
|
5
|
-
const DummyComponent$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
6
|
-
constructor() {
|
|
7
|
-
super();
|
|
8
|
-
this.__registerHost();
|
|
9
|
-
this.__attachShadow();
|
|
10
|
-
}
|
|
11
|
-
render() {
|
|
12
|
-
return (h(Host, null, h("h1", null, h("slot", null))));
|
|
13
|
-
}
|
|
14
|
-
static get style() { return dummyComponentCss; }
|
|
15
|
-
}, [1, "dummy-component"]);
|
|
16
|
-
function defineCustomElement$1() {
|
|
17
|
-
if (typeof customElements === "undefined") {
|
|
18
|
-
return;
|
|
19
|
-
}
|
|
20
|
-
const components = ["dummy-component"];
|
|
21
|
-
components.forEach(tagName => { switch (tagName) {
|
|
22
|
-
case "dummy-component":
|
|
23
|
-
if (!customElements.get(tagName)) {
|
|
24
|
-
customElements.define(tagName, DummyComponent$1);
|
|
25
|
-
}
|
|
26
|
-
break;
|
|
27
|
-
} });
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
const DummyComponent = DummyComponent$1;
|
|
31
|
-
const defineCustomElement = defineCustomElement$1;
|
|
32
|
-
|
|
33
|
-
export { DummyComponent, defineCustomElement };
|
|
@@ -1,2 +0,0 @@
|
|
|
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{s(n.next(e))}catch(e){i(e)}}function o(e){try{s(n["throw"](e))}catch(e){i(e)}}function s(e){e.done?r(e.value):a(e.value).then(l,o)}s((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:o(0),throw:o(1),return:o(2)},typeof Symbol==="function"&&(l[Symbol.iterator]=function(){return this}),l;function o(e){return function(t){return s([e,t])}}function s(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 o=false;var s=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 o=[];var s=function(t){for(var r=0;r<t.length;r++){a=t[r];if(Array.isArray(a)){s(a)}else if(a!=null&&typeof a!=="boolean"){if(i=typeof e!=="function"&&!d(a)){a=String(a)}if(i&&l){o[o.length-1].$text$+=a}else{o.push(i?g(null,a):a)}l=i}}};s(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(o.length>0){u.$children$=o}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&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 o=void 0;if(!l){N.set(e,l=new Set)}if(!l.has(a)){{{o=he.createElement("style");o.innerHTML=i}e.insertBefore(o,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=s("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=se(e,t);var o=t.toLowerCase();if(t==="class"){var s=e.classList;var f=A(r);var u=A(n);s.remove.apply(s,f.filter((function(e){return e&&!u.includes(e)})));s.add.apply(s,u.filter((function(e){return e&&!f.includes(e)})))}else if(!l&&t[0]==="o"&&t[1]==="n"){if(t[2]==="-"){t=t.slice(3)}else if(se(ve,o)){t=o.slice(2)}else{t=o[2]+t.slice(3)}if(r){pe.rel(e,t,r,false)}if(n){pe.ael(e,t,n,false)}}else{var $=d(n);if((l||$&&n!==null)&&!a){try{if(!e.tagName.includes("-")){var v=n==null?"":n;if(t==="list"){l=false}else if(r==null||e[t]!=v){e[t]=v}}else{e[t]=n}}catch(e){}}var h=false;{if(o!==(o=o.replace(/^xlink\:?/,""))){t=o;h=true}}if(n==null||n===false){if(n!==false||e.getAttribute(t)===""){if(h){e.removeAttributeNS(c,t)}else{e.removeAttribute(t)}}}else if((!l||i&4||a)&&!$){n=n===true?"":n;if(h){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 o=0;var s;var f;if(i.$text$!==null){s=i.$elm$=he.createTextNode(i.$text$)}else{if(!l){l=i.$tag$==="svg"}s=i.$elm$=he.createElementNS(l?v:h,i.$tag$);if(l&&i.$tag$==="foreignObject"){l=false}{M(null,i,l)}if(p(a)&&s["s-si"]!==a){s.classList.add(s["s-si"]=a)}if(i.$children$){for(o=0;o<i.$children$.length;++o){f=O(e,i,o);if(f){s.appendChild(f)}}}{if(i.$tag$==="svg"){l=false}else if(s.tagName==="foreignObject"){l=true}}}return s};var P=function(e,t,r,n,a,l){var o=e;var s;if(o.shadowRoot&&o.tagName===i){o=o.shadowRoot}for(;a<=l;++a){if(n[a]){s=O(null,r,a);if(s){n[a].$elm$=s;o.insertBefore(s,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 o=t[0];var s=t[l];var f=n.length-1;var u=n[0];var c=n[f];var $;while(a<=l&&i<=f){if(o==null){o=t[++a]}else if(s==null){s=t[--l]}else if(u==null){u=n[++i]}else if(c==null){c=n[--f]}else if(I(o,u)){B(o,u);o=t[++a];u=n[++i]}else if(I(s,c)){B(s,c);s=t[--l];c=n[--f]}else if(I(o,c)){B(o,c);e.insertBefore(o.$elm$,s.$elm$.nextSibling);o=t[++a];c=n[--f]}else if(I(s,u)){B(s,u);e.insertBefore(s.$elm$,o.$elm$);s=t[--l];u=n[++i]}else{{$=O(t&&t[i],r,i);u=n[++i]}if($){{o.$elm$.parentNode.insertBefore($,o.$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 o=t.$text$;if(o===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$!==o){r.data=o}};var z=function(e,t){var r=e.$hostElement$;var n=e.$cmpMeta$;var l=e.$vnode$||g(null,null);var o=w(t)?t:m(null,null,t);i=r.tagName;if(n.$attrsToReflect$){o.$attrs$=o.$attrs$||{};n.$attrsToReflect$.map((function(e){var t=e[0],n=e[1];return o.$attrs$[n]=r[t]}))}o.$tag$=null;o.$flags$|=4;e.$vnode$=o;o.$elm$=l.$elm$=r.shadowRoot||r;{a=r["s-sc"]}B(l,o)};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=s("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,o,f;return __generator(this,(function(u){r=e.$hostElement$;a=s("update",e.$cmpMeta$.$tagName$);i=r["s-rc"];if(n){j(e)}l=s("render",e.$cmpMeta$.$tagName$);{W(e,t)}if(i){i.map((function(e){return e()}));r["s-rc"]=undefined}l();a();{o=r["s-p"];f=function(){return F(e)};if(o.length===0){f()}else{Promise.all(o).then(f);e.$flags$|=4;o.length=0}}return[2]}))}))};var W=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 F=function(e){var t=e.$cmpMeta$.$tagName$;var r=e.$hostElement$;var n=s("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 o=a.$flags$;var s=a.$lazyInstance$;r=b(r,n.$members$[t][0]);var f=Number.isNaN(l)&&Number.isNaN(r);var u=r!==l&&!f;if((!(o&8)||l===undefined)&&u){a.$instanceValues$.set(t,r);if(s){if(n.$watchers$&&o&128){var c=n.$watchers$[t];if(c){c.map((function(e){try{s[e](r,l,t)}catch(e){fe(e,i)}}))}}if((o&(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,o,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=s("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)){o=s("registerStyles",n.$tagName$);R(l,a,!!(n.$flags$&1));o()}}$.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=s("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=s();var n=[];var a=t.exclude||[];var i=ve.customElements;var l=he.head;var o=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 o=function(e){__extends(t,e);function t(t){var n=e.call(this,t)||this;t=n;oe(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(o,r,1))}}))}));{f.innerHTML=n+u;f.setAttribute("data-styles","");l.insertBefore(f,o?o.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 oe=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 se=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(!o){o=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(o=ge.length>0){pe.raf(_e)}}};var Se=function(e){return de().then(e)};var Ne=we(ye,true)}}}));
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
System.register(["./p-3132f4b7.system.js","./p-a0cd4b75.system.js"],(function(e,t){"use strict";var n,s,r;return{setters:[function(e){n=e.p;s=e.b},function(e){r=e.g}],execute:function(){var e=function(){var e=t.meta.url;var s={};if(e!==""){s.resourcesUrl=new URL(".",e).href}return n(s)};e().then((function(e){r();return s([["p-b4c69836.system",[[1,"dummy-component"]]],["p-e1e4b2ea.system",[[1,"cura-icons-view",{selected:[32]}],[1,"cura-icon",{name:[513],color:[513],size:[8],iconset:[513],disabled:[516]}]]]],e)}))}}}));
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as i,h as s,H as e,g as o}from"./p-abcda1d1.js";const r=class{constructor(s){i(this,s),this.name="",this.color="neutral",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(i){this.setHostProperty("--size",this.sizes[`${i}`]?`${this.sizes[i].size}px`:`${this.sizes.default.size}px`),this.setHostProperty("--stroke",(i=>this.sizes[i].stroke*(this.sizes.default.size/this.sizes[i].size)+"px")(this.sizes[`${i}`]?i:"default"))}connectedCallback(){this.assetsPath=window.CuraAPI.localAssetsPath,this.sizeHandler(this.size)}getClasses(){const i={};return i[`icon-${this.color}`]=!0,this.disabled&&(i["icon-disabled"]=!0),i}setHostProperty(i,s){this.host.style.setProperty(i,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",class:this.getClasses()},s("use",{xlinkHref:`${this.assetsPath}/icons/iconset-${this.iconset}.svg#${this.name}`})))}get host(){return o(this)}static get watchers(){return{size:["sizeHandler"]}}};r.style=":host{--stroke-color:#B7B7B7}:host svg.icon-neutral{--stroke-color:#B7B7B7}:host svg.icon-primary{--stroke-color:var(--cura-color-primary-base, #004186)}:host svg.icon-secondary{--stroke-color:var(--cura-color-secondary-base, #AA8E0B)}:host svg.icon-accent{--stroke-color:var(--cura-color-accent-base, #DF8D2C)}:host svg.icon-success{--stroke-color:#5FD290}:host svg.icon-info{--stroke-color:#6EA8FF}:host svg.icon-error{--stroke-color:#EB5757}:host svg.icon-warning{--stroke-color:#FFCF3C}:host svg.icon-white{--stroke-color:#F6F6F6}:host svg.icon-black{--stroke-color:#262626}:host svg.icon-disabled{--stroke-color:#D4D4D4}:host{width:var(--size);height:var(--size)}:host svg{display:inline-block;stroke:var(--stroke-color);width:var(--size);height:var(--size);stroke-width:var(--stroke);fill:none}";const t=["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"],a=class{constructor(s){i(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=i=>{this.selected=i}}render(){return s(e,null,s("div",{class:"iconDetail"},s("h4",null,this.selected),s("div",{class:"iconSizes"},this.sizes.map((i=>s("div",{class:"size"},s("cura-icon",{name:this.selected,size:i}),s("span",null,i))))),s("div",{class:"iconSizes invert"},this.sizes.map((i=>s("div",{class:"size"},s("cura-icon",{name:this.selected,size:i,color:"white"}),s("span",null,i))))),s("div",{class:"iconSizes"},this.colors.map((i=>s("div",{class:"size"},s("cura-icon",{name:this.selected,color:i}),s("span",null,i)))),s("div",{class:"size"},s("cura-icon",{name:this.selected,disabled:!0}),s("span",null,"Disabled")))),s("div",{class:"icons"},t.map((i=>s("div",{class:"icon",onClick:()=>this.setSelected(i)},s("cura-icon",{name:i}),s("span",null,i))))))}};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}";export{r as cura_icon,a as cura_icons_view}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
System.register([],(function(e){"use strict";return{execute:function(){var t={color:{primary:{depth100:"#CCD9E7",depth300:"#5580AE",base:"#004186",depth700:"#002B59",depth900:"#00133B"},secondary:{depth100:"#EEE8CE",depth300:"#C6B45C",base:"#AA8E0B",depth700:"#715F07",depth900:"#221C02"},accent:{depth100:"#F9E8D5",depth300:"#E4A04F",base:"#DF8D2C",depth700:"#955E1D",depth900:"#2D1C09"}},spacing:{base:"8px"},font:{family:{title:"serif",body:'"Roboto", Helvetica, Arial, sans-serif'},size:{base:"16px"}}};var s=Object.assign(Object.assign({},t),{color:{primary:{base:"#CD4D9A",depth100:"#FCEFF6",depth300:"#FFBFE5",depth500:"#FF7FCB",depth700:"#99126C",depth900:"#00133B"},secondary:{base:"#189AB4",depth100:"#EDF3FF",depth300:"#BDD2FF",depth500:"#496BB6",depth700:"#001C58",depth900:"#430E31"}}});var a={default:t,maternidade:s};var r=function(){function e(){var e=this;this.prefix="--cura";this.setCssVar=function(t,s){var a=e.groupPath(s,t[0]);e.body.style.setProperty(a,t[1])};this.groupPath=function(e,t){return"".concat(e,"-").concat(t)};this.isObject=function(e){return e&&typeof e==="object"&&!Array.isArray(e)};this.mergeObject=function(t,s){var a=Object.entries(t);for(var r=0,i=a;r<i.length;r++){var o=i[r];if(e.isObject(o[1])){e.mergeObject(o[1],s[o[0]])}else{s[o[0]]=o[1]}}};this.buildCssVars=function(t,s){var a=Object.entries(s);for(var r=0,i=a;r<i.length;r++){var o=i[r];if(e.isObject(o[1])){e.buildCssVars(e.groupPath(t,o[0]),o[1])}else{e.setCssVar(o,t)}}};this.body=window.document.documentElement.querySelector("body")}e.prototype.load=function(e){if(e===void 0){e="default"}var t=a[e]?a[e]:a.default;this.buildCssVars(this.prefix,t)};e.prototype.setCustom=function(e){var t=e.name;if(t in a){console.log("Error building custom theme. Theme %s already exists. Loading default theme.",t);this.load("default")}else{var s=e.fromPreset&&e.fromPreset in a?a[e.fromPreset]:a.default;var r=Object.assign({},JSON.parse(JSON.stringify(s)));this.mergeObject(e.definitions,r);a[t]=r;this.load(t)}};return e}();var i=function(){function e(e){this.localAssetsPath=e&&e.localAssetsPath?e.localAssetsPath:"/assets";var t=new r;this.theme={load:function(e){t.load(e)},setCustom:function(e){t.setCustom(e)}};if(e&&e.customTheme){this.theme.setCustom(e.customTheme)}else{var s=e&&e.theme?e.theme:"default";this.theme.load(s)}}return e}();function o(){var e=window.CuraInit;window.CuraAPI=e?new i(e):new i;var t=window.CuraAPI;window.dispatchEvent(new CustomEvent("CuraAPIReady",{detail:{api:t}}));if(e&&typeof e.onReady==="function")e.onReady(t)}var n=e("g",o)}}}));
|
package/dist/cura/p-abcda1d1.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
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=>L(t).$,f=new WeakMap,h=t=>"sc-"+t.p,$=(t,e,n,l,o,c)=>{if(n!==l){let i=W(t,e),u=e.toLowerCase();if("class"===e){const e=t.classList,s=y(n),o=y(l);e.remove(...s.filter((t=>t&&!o.includes(t)))),e.add(...o.filter((t=>t&&!s.includes(t))))}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):W(z,u)?u.slice(2):u[2]+e.slice(3),n&&D.rel(t,e,n,!1),l&&D.ael(t,e,l,!1)}},w=/\s/,y=t=>t?t.split(w):[],p=(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||$(s,l,r[l],void 0,n,e.i);for(l in c)$(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),p(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||p(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){q(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)=>L(this).P.get(e))(0,t)},set(n){((t,e,n,l)=>{const s=L(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):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){q(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){q(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),U(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=L(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){q(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 L(this).A}};o.H=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)))},H=new WeakMap,L=t=>H.get(t),R=(t,e)=>H.set(e.v=t,e),U=(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"]=[],H.set(t,n)},W=(t,e)=>e in t,q=(t,e)=>(0,console.error)(t,e),F=new Map,V=t=>{const e=t.p.replace(/-/g,"_"),n=t.H,l=F.get(n);return l?l[e]:import(`./${n}.entry.js`).then((t=>(F.set(n,t),t[e])),q)
|
|
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){q(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,R as r}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as s,h as o,H as l}from"./p-abcda1d1.js";const r=class{constructor(o){s(this,o)}render(){return o(l,null,o("h1",null,o("slot",null)))}};r.style=":host{display:block}";export{r as dummy_component}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
System.register(["./p-3132f4b7.system.js"],(function(t){"use strict";var n,e,r;return{setters:[function(t){n=t.r;e=t.h;r=t.H}],execute:function(){var u=":host{display:block}";var s=t("dummy_component",function(){function t(t){n(this,t)}t.prototype.render=function(){return e(r,null,e("h1",null,e("slot",null)))};return t}());s.style=u}}}));
|
package/dist/cura/p-d2dcd470.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const t={color:{primary:{depth100:"#CCD9E7",depth300:"#5580AE",base:"#004186",depth700:"#002B59",depth900:"#00133B"},secondary:{depth100:"#EEE8CE",depth300:"#C6B45C",base:"#AA8E0B",depth700:"#715F07",depth900:"#221C02"},accent:{depth100:"#F9E8D5",depth300:"#E4A04F",base:"#DF8D2C",depth700:"#955E1D",depth900:"#2D1C09"}},spacing:{base:"8px"},font:{family:{title:"serif",body:'"Roboto", Helvetica, Arial, sans-serif'},size:{base:"16px"}}},e={default:t,maternidade:Object.assign(Object.assign({},t),{color:{primary:{base:"#CD4D9A",depth100:"#FCEFF6",depth300:"#FFBFE5",depth500:"#FF7FCB",depth700:"#99126C",depth900:"#00133B"},secondary:{base:"#189AB4",depth100:"#EDF3FF",depth300:"#BDD2FF",depth500:"#496BB6",depth700:"#001C58",depth900:"#430E31"}}})};class s{constructor(){this.prefix="--cura",this.setCssVar=(t,e)=>{const s=this.groupPath(e,t[0]);this.body.style.setProperty(s,t[1])},this.groupPath=(t,e)=>`${t}-${e}`,this.isObject=t=>t&&"object"==typeof t&&!Array.isArray(t),this.mergeObject=(t,e)=>{const s=Object.entries(t);for(let t of s)this.isObject(t[1])?this.mergeObject(t[1],e[t[0]]):e[t[0]]=t[1]},this.buildCssVars=(t,e)=>{const s=Object.entries(e);for(let e of s)this.isObject(e[1])?this.buildCssVars(this.groupPath(t,e[0]),e[1]):this.setCssVar(e,t)},this.body=window.document.documentElement.querySelector("body")}load(t="default"){this.buildCssVars(this.prefix,e[t]?e[t]:e.default)}setCustom(t){const s=t.name;if(s in e)console.log("Error building custom theme. Theme %s already exists. Loading default theme.",s),this.load("default");else{const i=Object.assign({},JSON.parse(JSON.stringify(t.fromPreset&&t.fromPreset in e?e[t.fromPreset]:e.default)));this.mergeObject(t.definitions,i),e[s]=i,this.load(s)}}}class i{constructor(t){this.localAssetsPath=t&&t.localAssetsPath?t.localAssetsPath:"/assets";const e=new s;this.theme={load:function(t){e.load(t)},setCustom:function(t){e.setCustom(t)}},t&&t.customTheme?this.theme.setCustom(t.customTheme):this.theme.load(t&&t.theme?t.theme:"default")}}const o=function(){const t=window.CuraInit;window.CuraAPI=t?new i(t):new i;const e=window.CuraAPI;window.dispatchEvent(new CustomEvent("CuraAPIReady",{detail:{api:e}})),t&&"function"==typeof t.onReady&&t.onReady(e)};export{o as g}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
System.register(["./p-3132f4b7.system.js"],(function(e){"use strict";var s,i,t,o;return{setters:[function(e){s=e.r;i=e.h;t=e.H;o=e.g}],execute:function(){var r=":host{--stroke-color:#B7B7B7}:host svg.icon-neutral{--stroke-color:#B7B7B7}:host svg.icon-primary{--stroke-color:var(--cura-color-primary-base, #004186)}:host svg.icon-secondary{--stroke-color:var(--cura-color-secondary-base, #AA8E0B)}:host svg.icon-accent{--stroke-color:var(--cura-color-accent-base, #DF8D2C)}:host svg.icon-success{--stroke-color:#5FD290}:host svg.icon-info{--stroke-color:#6EA8FF}:host svg.icon-error{--stroke-color:#EB5757}:host svg.icon-warning{--stroke-color:#FFCF3C}:host svg.icon-white{--stroke-color:#F6F6F6}:host svg.icon-black{--stroke-color:#262626}:host svg.icon-disabled{--stroke-color:#D4D4D4}:host{width:var(--size);height:var(--size)}:host svg{display:inline-block;stroke:var(--stroke-color);width:var(--size);height:var(--size);stroke-width:var(--stroke);fill:none}";var n=e("cura_icon",function(){function e(e){s(this,e);this.name="";this.color="neutral";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 s=this;var i=function(e){return"".concat(s.sizes[e].stroke*(s.sizes.default.size/s.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)]?i(e):i("default"))};e.prototype.connectedCallback=function(){this.assetsPath=window.CuraAPI.localAssetsPath;this.sizeHandler(this.size)};e.prototype.getClasses=function(){var e={};e["icon-".concat(this.color)]=true;if(this.disabled)e["icon-disabled"]=true;return e};e.prototype.setHostProperty=function(e,s){this.host.style.setProperty(e,s)};e.prototype.render=function(){return i(t,null,i("svg",{version:"1.1",viewBox:"0 0 24 24",preserveAspectRatio:"xMidYMid meet",xmlns:"http://www.w3.org/2000/svg",class:this.getClasses()},i("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"]}},enumerable:false,configurable:true});return e}());n.style=r;var a=["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 c=":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 l=e("cura_icons_view",function(){function e(e){var i=this;s(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){i.selected=e}}e.prototype.render=function(){var e=this;return i(t,null,i("div",{class:"iconDetail"},i("h4",null,this.selected),i("div",{class:"iconSizes"},this.sizes.map((function(s){return i("div",{class:"size"},i("cura-icon",{name:e.selected,size:s}),i("span",null,s))}))),i("div",{class:"iconSizes invert"},this.sizes.map((function(s){return i("div",{class:"size"},i("cura-icon",{name:e.selected,size:s,color:"white"}),i("span",null,s))}))),i("div",{class:"iconSizes"},this.colors.map((function(s){return i("div",{class:"size"},i("cura-icon",{name:e.selected,color:s}),i("span",null,s))})),i("div",{class:"size"},i("cura-icon",{name:this.selected,disabled:true}),i("span",null,"Disabled")))),i("div",{class:"icons"},a.map((function(s){return i("div",{class:"icon",onClick:function(){return e.setSelected(s)}},i("cura-icon",{name:s}),i("span",null,s))}))))};return e}());l.style=c}}}));
|
|
@@ -1,173 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Cura Default Theme
|
|
3
|
-
*/
|
|
4
|
-
const ThemeDefault = {
|
|
5
|
-
/* Colors */
|
|
6
|
-
color: {
|
|
7
|
-
primary: {
|
|
8
|
-
depth100: '#CCD9E7',
|
|
9
|
-
depth300: '#5580AE',
|
|
10
|
-
base: '#004186',
|
|
11
|
-
depth700: '#002B59',
|
|
12
|
-
depth900: '#00133B'
|
|
13
|
-
},
|
|
14
|
-
secondary: {
|
|
15
|
-
depth100: '#EEE8CE',
|
|
16
|
-
depth300: '#C6B45C',
|
|
17
|
-
base: '#AA8E0B',
|
|
18
|
-
depth700: '#715F07',
|
|
19
|
-
depth900: '#221C02'
|
|
20
|
-
},
|
|
21
|
-
accent: {
|
|
22
|
-
depth100: '#F9E8D5',
|
|
23
|
-
depth300: '#E4A04F',
|
|
24
|
-
base: '#DF8D2C',
|
|
25
|
-
depth700: '#955E1D',
|
|
26
|
-
depth900: '#2D1C09'
|
|
27
|
-
}
|
|
28
|
-
},
|
|
29
|
-
/* Spacing */
|
|
30
|
-
spacing: {
|
|
31
|
-
base: '8px',
|
|
32
|
-
},
|
|
33
|
-
/* Fonts */
|
|
34
|
-
font: {
|
|
35
|
-
family: {
|
|
36
|
-
title: 'serif',
|
|
37
|
-
body: '"Roboto", Helvetica, Arial, sans-serif'
|
|
38
|
-
},
|
|
39
|
-
size: {
|
|
40
|
-
base: '16px',
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
};
|
|
44
|
-
|
|
45
|
-
/**
|
|
46
|
-
* Maternity Theme
|
|
47
|
-
*/
|
|
48
|
-
const ThemeMaternity = Object.assign(Object.assign({}, ThemeDefault), {
|
|
49
|
-
/* Custom */
|
|
50
|
-
/* Colors */
|
|
51
|
-
color: {
|
|
52
|
-
primary: {
|
|
53
|
-
base: '#CD4D9A',
|
|
54
|
-
depth100: '#FCEFF6',
|
|
55
|
-
depth300: '#FFBFE5',
|
|
56
|
-
depth500: '#FF7FCB',
|
|
57
|
-
depth700: '#99126C',
|
|
58
|
-
depth900: '#00133B'
|
|
59
|
-
},
|
|
60
|
-
secondary: {
|
|
61
|
-
base: '#189AB4',
|
|
62
|
-
depth100: '#EDF3FF',
|
|
63
|
-
depth300: '#BDD2FF',
|
|
64
|
-
depth500: '#496BB6',
|
|
65
|
-
depth700: '#001C58',
|
|
66
|
-
depth900: '#430E31'
|
|
67
|
-
}
|
|
68
|
-
} });
|
|
69
|
-
|
|
70
|
-
const ThemePresets = {
|
|
71
|
-
'default': ThemeDefault,
|
|
72
|
-
'maternidade': ThemeMaternity
|
|
73
|
-
};
|
|
74
|
-
|
|
75
|
-
class CuraThemeModule {
|
|
76
|
-
constructor() {
|
|
77
|
-
this.prefix = '--cura';
|
|
78
|
-
/* Private */
|
|
79
|
-
/** Set css var based on object structure */
|
|
80
|
-
this.setCssVar = (prop, path) => {
|
|
81
|
-
const varName = this.groupPath(path, prop[0]);
|
|
82
|
-
this.body.style.setProperty(varName, prop[1]);
|
|
83
|
-
};
|
|
84
|
-
this.groupPath = (a, b) => `${a}-${b}`;
|
|
85
|
-
this.isObject = (val) => {
|
|
86
|
-
return val && typeof val === 'object' && !Array.isArray(val);
|
|
87
|
-
};
|
|
88
|
-
/** Deep merge objects */
|
|
89
|
-
this.mergeObject = (from, to) => {
|
|
90
|
-
const entries = Object.entries(from);
|
|
91
|
-
for (let e of entries) {
|
|
92
|
-
if (this.isObject(e[1])) {
|
|
93
|
-
this.mergeObject(e[1], to[e[0]]);
|
|
94
|
-
}
|
|
95
|
-
else {
|
|
96
|
-
to[e[0]] = e[1];
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
};
|
|
100
|
-
/** Set css vars from preset object */
|
|
101
|
-
this.buildCssVars = (path, obj) => {
|
|
102
|
-
const entries = Object.entries(obj);
|
|
103
|
-
for (let e of entries) {
|
|
104
|
-
if (this.isObject(e[1])) {
|
|
105
|
-
this.buildCssVars(this.groupPath(path, e[0]), e[1]);
|
|
106
|
-
}
|
|
107
|
-
else {
|
|
108
|
-
this.setCssVar(e, path);
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
};
|
|
112
|
-
this.body = window.document.documentElement.querySelector('body');
|
|
113
|
-
}
|
|
114
|
-
/**
|
|
115
|
-
* Load a theme.
|
|
116
|
-
* @param theme Theme tag.
|
|
117
|
-
*/
|
|
118
|
-
load(theme = 'default') {
|
|
119
|
-
const preset = ThemePresets[theme] ? ThemePresets[theme] : ThemePresets.default;
|
|
120
|
-
this.buildCssVars(this.prefix, preset);
|
|
121
|
-
}
|
|
122
|
-
/**
|
|
123
|
-
* Define a custom theme
|
|
124
|
-
* @param customTheme Custom theme object definition
|
|
125
|
-
*/
|
|
126
|
-
setCustom(customTheme) {
|
|
127
|
-
const customTag = customTheme.name;
|
|
128
|
-
if (customTag in ThemePresets) {
|
|
129
|
-
console.log('Error building custom theme. Theme %s already exists. Loading default theme.', customTag);
|
|
130
|
-
this.load('default');
|
|
131
|
-
}
|
|
132
|
-
else {
|
|
133
|
-
const preset = customTheme.fromPreset && customTheme.fromPreset in ThemePresets
|
|
134
|
-
? ThemePresets[customTheme.fromPreset]
|
|
135
|
-
: ThemePresets.default;
|
|
136
|
-
const newTheme = Object.assign({}, JSON.parse(JSON.stringify(preset)));
|
|
137
|
-
this.mergeObject(customTheme.definitions, newTheme);
|
|
138
|
-
ThemePresets[customTag] = newTheme;
|
|
139
|
-
this.load(customTag);
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
class CuraAPI {
|
|
145
|
-
constructor(config) {
|
|
146
|
-
this.localAssetsPath = config && config.localAssetsPath ? config.localAssetsPath : `/assets`;
|
|
147
|
-
const themeModule = new CuraThemeModule();
|
|
148
|
-
this.theme = {
|
|
149
|
-
load: function (themeTag) { themeModule.load(themeTag); },
|
|
150
|
-
setCustom: function (customThemeDefinitions) { themeModule.setCustom(customThemeDefinitions); }
|
|
151
|
-
};
|
|
152
|
-
if (config && config.customTheme) {
|
|
153
|
-
this.theme.setCustom(config.customTheme);
|
|
154
|
-
}
|
|
155
|
-
else {
|
|
156
|
-
const theme = config && config.theme ? config.theme : 'default';
|
|
157
|
-
this.theme.load(theme);
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
function appGlobalScript () {
|
|
163
|
-
const config = window.CuraInit;
|
|
164
|
-
window.CuraAPI = config ? new CuraAPI(config) : new CuraAPI();
|
|
165
|
-
const api = window.CuraAPI;
|
|
166
|
-
window.dispatchEvent(new CustomEvent("CuraAPIReady", { detail: { api } }));
|
|
167
|
-
if (config && typeof config.onReady === 'function')
|
|
168
|
-
config.onReady(api);
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
const globalScripts = appGlobalScript;
|
|
172
|
-
|
|
173
|
-
export { globalScripts as g };
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { r as registerInstance, h, H as Host } from './index-cec9b650.js';
|
|
2
|
-
|
|
3
|
-
const dummyComponentCss = ":host{display:block}";
|
|
4
|
-
|
|
5
|
-
const DummyComponent = class {
|
|
6
|
-
constructor(hostRef) {
|
|
7
|
-
registerInstance(this, hostRef);
|
|
8
|
-
}
|
|
9
|
-
render() {
|
|
10
|
-
return (h(Host, null, h("h1", null, h("slot", null))));
|
|
11
|
-
}
|
|
12
|
-
};
|
|
13
|
-
DummyComponent.style = dummyComponentCss;
|
|
14
|
-
|
|
15
|
-
export { DummyComponent as dummy_component };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var ThemeDefault={color:{primary:{depth100:"#CCD9E7",depth300:"#5580AE",base:"#004186",depth700:"#002B59",depth900:"#00133B"},secondary:{depth100:"#EEE8CE",depth300:"#C6B45C",base:"#AA8E0B",depth700:"#715F07",depth900:"#221C02"},accent:{depth100:"#F9E8D5",depth300:"#E4A04F",base:"#DF8D2C",depth700:"#955E1D",depth900:"#2D1C09"}},spacing:{base:"8px"},font:{family:{title:"serif",body:'"Roboto", Helvetica, Arial, sans-serif'},size:{base:"16px"}}};var ThemeMaternity=Object.assign(Object.assign({},ThemeDefault),{color:{primary:{base:"#CD4D9A",depth100:"#FCEFF6",depth300:"#FFBFE5",depth500:"#FF7FCB",depth700:"#99126C",depth900:"#00133B"},secondary:{base:"#189AB4",depth100:"#EDF3FF",depth300:"#BDD2FF",depth500:"#496BB6",depth700:"#001C58",depth900:"#430E31"}}});var ThemePresets={default:ThemeDefault,maternidade:ThemeMaternity};var CuraThemeModule=function(){function e(){var e=this;this.prefix="--cura";this.setCssVar=function(t,s){var a=e.groupPath(s,t[0]);e.body.style.setProperty(a,t[1])};this.groupPath=function(e,t){return"".concat(e,"-").concat(t)};this.isObject=function(e){return e&&typeof e==="object"&&!Array.isArray(e)};this.mergeObject=function(t,s){var a=Object.entries(t);for(var r=0,i=a;r<i.length;r++){var o=i[r];if(e.isObject(o[1])){e.mergeObject(o[1],s[o[0]])}else{s[o[0]]=o[1]}}};this.buildCssVars=function(t,s){var a=Object.entries(s);for(var r=0,i=a;r<i.length;r++){var o=i[r];if(e.isObject(o[1])){e.buildCssVars(e.groupPath(t,o[0]),o[1])}else{e.setCssVar(o,t)}}};this.body=window.document.documentElement.querySelector("body")}e.prototype.load=function(e){if(e===void 0){e="default"}var t=ThemePresets[e]?ThemePresets[e]:ThemePresets.default;this.buildCssVars(this.prefix,t)};e.prototype.setCustom=function(e){var t=e.name;if(t in ThemePresets){console.log("Error building custom theme. Theme %s already exists. Loading default theme.",t);this.load("default")}else{var s=e.fromPreset&&e.fromPreset in ThemePresets?ThemePresets[e.fromPreset]:ThemePresets.default;var a=Object.assign({},JSON.parse(JSON.stringify(s)));this.mergeObject(e.definitions,a);ThemePresets[t]=a;this.load(t)}};return e}();var CuraAPI=function(){function e(e){this.localAssetsPath=e&&e.localAssetsPath?e.localAssetsPath:"/assets";var t=new CuraThemeModule;this.theme={load:function(e){t.load(e)},setCustom:function(e){t.setCustom(e)}};if(e&&e.customTheme){this.theme.setCustom(e.customTheme)}else{var s=e&&e.theme?e.theme:"default";this.theme.load(s)}}return e}();function appGlobalScript(){var e=window.CuraInit;window.CuraAPI=e?new CuraAPI(e):new CuraAPI;var t=window.CuraAPI;window.dispatchEvent(new CustomEvent("CuraAPIReady",{detail:{api:t}}));if(e&&typeof e.onReady==="function")e.onReady(t)}var globalScripts=appGlobalScript;export{globalScripts as g};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as registerInstance,h,H as Host,g as getElement}from"./index-cec9b650.js";var curaIconCss=":host{--stroke-color:#B7B7B7}:host svg.icon-neutral{--stroke-color:#B7B7B7}:host svg.icon-primary{--stroke-color:var(--cura-color-primary-base, #004186)}:host svg.icon-secondary{--stroke-color:var(--cura-color-secondary-base, #AA8E0B)}:host svg.icon-accent{--stroke-color:var(--cura-color-accent-base, #DF8D2C)}:host svg.icon-success{--stroke-color:#5FD290}:host svg.icon-info{--stroke-color:#6EA8FF}:host svg.icon-error{--stroke-color:#EB5757}:host svg.icon-warning{--stroke-color:#FFCF3C}:host svg.icon-white{--stroke-color:#F6F6F6}:host svg.icon-black{--stroke-color:#262626}:host svg.icon-disabled{--stroke-color:#D4D4D4}:host{width:var(--size);height:var(--size)}:host svg{display:inline-block;stroke:var(--stroke-color);width:var(--size);height:var(--size);stroke-width:var(--stroke);fill:none}";var CuraIcon=function(){function e(e){registerInstance(this,e);this.name="";this.color="neutral";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 s=this;var i=function(e){return"".concat(s.sizes[e].stroke*(s.sizes.default.size/s.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)]?i(e):i("default"))};e.prototype.connectedCallback=function(){this.assetsPath=window.CuraAPI.localAssetsPath;this.sizeHandler(this.size)};e.prototype.getClasses=function(){var e={};e["icon-".concat(this.color)]=true;if(this.disabled)e["icon-disabled"]=true;return e};e.prototype.setHostProperty=function(e,s){this.host.style.setProperty(e,s)};e.prototype.render=function(){return h(Host,null,h("svg",{version:"1.1",viewBox:"0 0 24 24",preserveAspectRatio:"xMidYMid meet",xmlns:"http://www.w3.org/2000/svg",class:this.getClasses()},h("use",{xlinkHref:"".concat(this.assetsPath,"/icons/iconset-").concat(this.iconset,".svg#").concat(this.name)})))};Object.defineProperty(e.prototype,"host",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{size:["sizeHandler"]}},enumerable:false,configurable:true});return e}();CuraIcon.style=curaIconCss;var iconsetdefaulticons=["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 curaIconsViewCss=":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 CuraIconsView=function(){function e(e){var s=this;registerInstance(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){s.selected=e}}e.prototype.render=function(){var e=this;return h(Host,null,h("div",{class:"iconDetail"},h("h4",null,this.selected),h("div",{class:"iconSizes"},this.sizes.map((function(s){return h("div",{class:"size"},h("cura-icon",{name:e.selected,size:s}),h("span",null,s))}))),h("div",{class:"iconSizes invert"},this.sizes.map((function(s){return h("div",{class:"size"},h("cura-icon",{name:e.selected,size:s,color:"white"}),h("span",null,s))}))),h("div",{class:"iconSizes"},this.colors.map((function(s){return h("div",{class:"size"},h("cura-icon",{name:e.selected,color:s}),h("span",null,s))})),h("div",{class:"size"},h("cura-icon",{name:this.selected,disabled:true}),h("span",null,"Disabled")))),h("div",{class:"icons"},iconsetdefaulticons.map((function(s){return h("div",{class:"icon",onClick:function(){return e.setSelected(s)}},h("cura-icon",{name:s}),h("span",null,s))}))))};return e}();CuraIconsView.style=curaIconsViewCss;export{CuraIcon as cura_icon,CuraIconsView as cura_icons_view};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as registerInstance,h,H as Host}from"./index-cec9b650.js";var dummyComponentCss=":host{display:block}";var DummyComponent=function(){function n(n){registerInstance(this,n)}n.prototype.render=function(){return h(Host,null,h("h1",null,h("slot",null)))};return n}();DummyComponent.style=dummyComponentCss;export{DummyComponent as dummy_component};
|