@rededor/cura 0.4.4 → 0.4.5
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/cura-button_10.cjs.entry.js +18 -9
- package/dist/cjs/cura-button_10.cjs.entry.js.map +1 -1
- package/dist/cjs/cura.cjs.js +2 -2
- package/dist/cjs/{index-29633529.js → index-0e874533.js} +3 -247
- package/dist/cjs/index-0e874533.js.map +1 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/collection/components/text/cura-paragraph/cura-paragraph.css +31 -20
- package/dist/collection/components/text/cura-paragraph/cura-paragraph.js +43 -9
- package/dist/collection/components/text/cura-paragraph/cura-paragraph.js.map +1 -1
- package/dist/components/cura-paragraph.js +20 -9
- package/dist/components/cura-paragraph.js.map +1 -1
- package/dist/cura/cura.esm.js +1 -1
- package/dist/cura/cura.esm.js.map +1 -1
- package/dist/cura/cura.js +1 -1
- package/dist/cura/{p-452d4f72.entry.js → p-2b6e4727.entry.js} +2 -2
- package/dist/cura/{p-452d4f72.entry.js.map → p-2b6e4727.entry.js.map} +1 -1
- package/dist/cura/{p-d76958f4.system.entry.js → p-8e62c529.system.entry.js} +2 -2
- package/dist/cura/{p-d76958f4.system.entry.js.map → p-8e62c529.system.entry.js.map} +1 -1
- package/dist/cura/p-a84ae34f.system.js +3 -0
- package/dist/cura/p-a84ae34f.system.js.map +1 -0
- package/dist/cura/{p-07674ea7.system.js → p-b1ae12e5.system.js} +2 -2
- package/dist/cura/{p-07674ea7.system.js.map → p-b1ae12e5.system.js.map} +1 -1
- package/dist/cura/p-cbc91ac5.js +3 -0
- package/dist/cura/p-cbc91ac5.js.map +1 -0
- package/dist/esm/cura-button_10.entry.js +18 -9
- package/dist/esm/cura-button_10.entry.js.map +1 -1
- package/dist/esm/cura.js +3 -3
- package/dist/esm/{index-e11775ce.js → index-92c824be.js} +3 -247
- package/dist/esm/index-92c824be.js.map +1 -0
- package/dist/esm/loader.js +3 -3
- package/dist/esm-es5/cura-button_10.entry.js +1 -1
- package/dist/esm-es5/cura-button_10.entry.js.map +1 -1
- package/dist/esm-es5/cura.js +1 -1
- package/dist/esm-es5/cura.js.map +1 -1
- package/dist/esm-es5/index-92c824be.js +3 -0
- package/dist/esm-es5/index-92c824be.js.map +1 -0
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/loader.js.map +1 -1
- package/dist/types/components/text/cura-paragraph/cura-paragraph.d.ts +7 -2
- package/dist/types/components.d.ts +10 -2
- package/package.json +2 -2
- package/dist/cjs/index-29633529.js.map +0 -1
- package/dist/cura/p-c30e14d5.system.js +0 -3
- package/dist/cura/p-c30e14d5.system.js.map +0 -1
- package/dist/cura/p-d5990392.js +0 -3
- package/dist/cura/p-d5990392.js.map +0 -1
- package/dist/esm/index-e11775ce.js.map +0 -1
- package/dist/esm-es5/index-e11775ce.js +0 -3
- package/dist/esm-es5/index-e11775ce.js.map +0 -1
|
@@ -28,64 +28,75 @@
|
|
|
28
28
|
font-size: var(--font-size);
|
|
29
29
|
font-weight: var(--font-weight-regular);
|
|
30
30
|
color: var(--color-body);
|
|
31
|
-
line-height:
|
|
32
|
-
letter-spacing:
|
|
31
|
+
line-height: var(--line-height);
|
|
32
|
+
/* letter-spacing: 0.02em; */
|
|
33
33
|
margin-block-start: var(--block-margin);
|
|
34
34
|
margin-block-end: var(--block-margin);
|
|
35
35
|
}
|
|
36
36
|
:host p.large {
|
|
37
37
|
font-size: 1.21em;
|
|
38
|
-
line-height:
|
|
39
|
-
|
|
38
|
+
line-height: calc(var(--line-height) + 10%);
|
|
39
|
+
/* line-height: 150%; */
|
|
40
|
+
/* letter-spacing: normal; */
|
|
40
41
|
}
|
|
41
42
|
:host p.small {
|
|
42
43
|
font-size: 0.85em;
|
|
43
|
-
line-height:
|
|
44
|
-
|
|
44
|
+
line-height: calc(var(--line-height) - 5%);
|
|
45
|
+
/* line-height: 135%; */
|
|
46
|
+
/* letter-spacing: 0.04em; */
|
|
45
47
|
}
|
|
46
48
|
:host p.caption {
|
|
47
49
|
font-size: 0.71em;
|
|
48
|
-
line-height:
|
|
49
|
-
|
|
50
|
+
line-height: calc(var(--line-height) - 5%);
|
|
51
|
+
/* line-height: 135%; */
|
|
52
|
+
/* letter-spacing: 0.06em; */
|
|
50
53
|
}
|
|
51
54
|
@media (min-width: 768px) and (max-width: 1365px) {
|
|
52
55
|
:host p {
|
|
53
56
|
font-size: 1.14em;
|
|
54
|
-
line-height:
|
|
57
|
+
line-height: calc(var(--line-height) + 5%);
|
|
58
|
+
/* line-height: 145%; */
|
|
55
59
|
}
|
|
56
60
|
:host p.large {
|
|
57
61
|
font-size: 1.35em;
|
|
58
|
-
line-height:
|
|
62
|
+
line-height: calc(var(--line-height) + 10%);
|
|
63
|
+
/* line-height: 150%; */
|
|
59
64
|
}
|
|
60
65
|
:host p.small {
|
|
61
66
|
font-size: 1em;
|
|
62
|
-
line-height:
|
|
67
|
+
line-height: calc(var(--line-height) - 5%);
|
|
68
|
+
/* line-height: 135%; */
|
|
63
69
|
}
|
|
64
70
|
:host p.caption {
|
|
65
71
|
font-size: 0.85em;
|
|
66
|
-
line-height:
|
|
67
|
-
|
|
72
|
+
line-height: calc(var(--line-height) - 5%);
|
|
73
|
+
/* line-height: 135%; */
|
|
74
|
+
/* letter-spacing: 0.06em; */
|
|
68
75
|
}
|
|
69
76
|
}
|
|
70
77
|
@media (min-width: 1366px) {
|
|
71
78
|
:host p {
|
|
72
79
|
font-size: 1.42em;
|
|
73
|
-
line-height:
|
|
74
|
-
|
|
80
|
+
line-height: calc(var(--line-height) + 10%);
|
|
81
|
+
/* line-height: 150%; */
|
|
82
|
+
/* letter-spacing: normal; */
|
|
75
83
|
}
|
|
76
84
|
:host p.large {
|
|
77
85
|
font-size: 1.71em;
|
|
78
|
-
line-height:
|
|
86
|
+
line-height: calc(var(--line-height) + 20%);
|
|
87
|
+
/* line-height: 160%; */
|
|
79
88
|
}
|
|
80
89
|
:host p.small {
|
|
81
90
|
font-size: 1.21em;
|
|
82
|
-
line-height:
|
|
83
|
-
|
|
91
|
+
line-height: calc(var(--line-height) + 5%);
|
|
92
|
+
/* line-height: 145%; */
|
|
93
|
+
/* letter-spacing: normal; */
|
|
84
94
|
}
|
|
85
95
|
:host p.caption {
|
|
86
96
|
font-size: 1em;
|
|
87
|
-
line-height:
|
|
88
|
-
|
|
97
|
+
line-height: calc(var(--line-height) + 5%);
|
|
98
|
+
/* line-height: 145%; */
|
|
99
|
+
/* letter-spacing: 0.02em; */
|
|
89
100
|
}
|
|
90
101
|
}
|
|
91
102
|
:host ::slotted(b), :host ::slotted(strong) {
|
|
@@ -4,6 +4,11 @@ export class CuraParagraph {
|
|
|
4
4
|
this.size = 'regular';
|
|
5
5
|
this.inverted = false;
|
|
6
6
|
this.spotColor = 'primary';
|
|
7
|
+
this.color = undefined;
|
|
8
|
+
this.styles = {};
|
|
9
|
+
}
|
|
10
|
+
handleChangeColor() {
|
|
11
|
+
this.setColors();
|
|
7
12
|
}
|
|
8
13
|
connectedCallback() {
|
|
9
14
|
this.weights = window.CuraAPI.theme.fonts.getWeights();
|
|
@@ -25,15 +30,16 @@ export class CuraParagraph {
|
|
|
25
30
|
};
|
|
26
31
|
this.setHostProperty('--font-size', window.CuraAPI.theme.fonts.getSize());
|
|
27
32
|
this.setHostProperty('--block-margin', '1.25em');
|
|
33
|
+
this.setHostProperty('--line-height', '140%');
|
|
28
34
|
}
|
|
29
35
|
setColors() {
|
|
30
|
-
const fontColor = this.
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
this.styles
|
|
35
|
-
|
|
36
|
-
|
|
36
|
+
const fontColor = this.color ? window.CuraAPI.theme.colors.getColor(this.color) :
|
|
37
|
+
this.inverted
|
|
38
|
+
? window.CuraAPI.theme.colors.getColor('neutral-white')
|
|
39
|
+
: window.CuraAPI.theme.fonts.getColor();
|
|
40
|
+
this.styles = Object.assign(Object.assign({}, this.styles), { '--color-body': fontColor || window.CuraAPI.theme.colors.getColor('neutral-darker'), '--color-link': this.inverted
|
|
41
|
+
? window.CuraAPI.theme.colors.getColor(`${this.spotColor}-lighter`)
|
|
42
|
+
: window.CuraAPI.theme.colors.getColor(`${this.spotColor}-dark`) });
|
|
37
43
|
}
|
|
38
44
|
setHostProperty(prop, value) {
|
|
39
45
|
this.host.style.setProperty(prop, value);
|
|
@@ -59,8 +65,8 @@ export class CuraParagraph {
|
|
|
59
65
|
"type": "string",
|
|
60
66
|
"mutable": false,
|
|
61
67
|
"complexType": {
|
|
62
|
-
"original": "
|
|
63
|
-
"resolved": "
|
|
68
|
+
"original": "'regular' | 'large' | 'small' | 'caption'",
|
|
69
|
+
"resolved": "\"caption\" | \"large\" | \"regular\" | \"small\"",
|
|
64
70
|
"references": {}
|
|
65
71
|
},
|
|
66
72
|
"required": false,
|
|
@@ -108,9 +114,37 @@ export class CuraParagraph {
|
|
|
108
114
|
"attribute": "spot-color",
|
|
109
115
|
"reflect": true,
|
|
110
116
|
"defaultValue": "'primary'"
|
|
117
|
+
},
|
|
118
|
+
"color": {
|
|
119
|
+
"type": "any",
|
|
120
|
+
"mutable": false,
|
|
121
|
+
"complexType": {
|
|
122
|
+
"original": "any",
|
|
123
|
+
"resolved": "any",
|
|
124
|
+
"references": {}
|
|
125
|
+
},
|
|
126
|
+
"required": false,
|
|
127
|
+
"optional": false,
|
|
128
|
+
"docs": {
|
|
129
|
+
"tags": [],
|
|
130
|
+
"text": "Color base from color scheme. Default: theme font color."
|
|
131
|
+
},
|
|
132
|
+
"attribute": "color",
|
|
133
|
+
"reflect": false
|
|
111
134
|
}
|
|
112
135
|
};
|
|
113
136
|
}
|
|
137
|
+
static get states() {
|
|
138
|
+
return {
|
|
139
|
+
"styles": {}
|
|
140
|
+
};
|
|
141
|
+
}
|
|
114
142
|
static get elementRef() { return "host"; }
|
|
143
|
+
static get watchers() {
|
|
144
|
+
return [{
|
|
145
|
+
"propName": "color",
|
|
146
|
+
"methodName": "handleChangeColor"
|
|
147
|
+
}];
|
|
148
|
+
}
|
|
115
149
|
}
|
|
116
150
|
//# sourceMappingURL=cura-paragraph.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cura-paragraph.js","sourceRoot":"","sources":["../../../../src/components/text/cura-paragraph/cura-paragraph.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"cura-paragraph.js","sourceRoot":"","sources":["../../../../src/components/text/cura-paragraph/cura-paragraph.tsx"],"names":[],"mappings":"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","sourcesContent":["import { Component, Host, Prop, h, Element, Watch, State } from '@stencil/core';\n\n@Component({\n tag: 'cura-paragraph',\n styleUrl: 'cura-paragraph.scss',\n shadow: true,\n})\nexport class CuraParagraph {\n\n /**\n * Set size of body text.\n * Values: regular (default) | large | small | caption.\n */\n @Prop({reflect: true}) size: 'regular' | 'large' | 'small' | 'caption' = 'regular';\n /**\n * Apply light color to text in dark background.\n * Values: boolean.\n */\n @Prop({reflect: true}) inverted = false;\n /**\n * Apply base system color to elements like <a> and <abbr>.\n * Values: String primary(default) | secondary | accent | neutral | success | error | warning | info.\n */\n @Prop({reflect: true}) spotColor = 'primary';\n /**\n * Color base from color scheme. Default: theme font color.\n */\n @Prop() color;\n @Watch('color')\n handleChangeColor() {\n this.setColors();\n }\n\n /**\n * Host element <cura-paragraph>\n */\n @Element() host: HTMLElement;\n\n /**\n * Internal Props\n */\n weights: any;\n @State() styles = {};\n\n connectedCallback() {\n this.weights = window.CuraAPI.theme.fonts.getWeights();\n this.setFontProperties();\n this.setColors();\n }\n\n setsizeClass() {\n const sizeclass = {};\n sizeclass[this.size.toLowerCase()] = true;\n return sizeclass;\n }\n\n setFontProperties() {\n this.styles = {\n '--font-family': window.CuraAPI.theme.fonts.getFamily('body'),\n '--font-size': window.CuraAPI.theme.fonts.getSize(),\n '--font-weight-regular': this.weights.regular,\n '--font-weight-medium': this.weights.medium,\n '--font-weight-bold': this.weights.bold\n }\n this.setHostProperty('--font-size', window.CuraAPI.theme.fonts.getSize());\n this.setHostProperty('--block-margin', '1.25em');\n this.setHostProperty('--line-height', '140%');\n }\n\n setColors() {\n const fontColor = this.color ? window.CuraAPI.theme.colors.getColor(this.color) :\n this.inverted\n ? window.CuraAPI.theme.colors.getColor('neutral-white')\n : window.CuraAPI.theme.fonts.getColor();\n this.styles = {\n ...this.styles,\n '--color-body': fontColor || window.CuraAPI.theme.colors.getColor('neutral-darker'),\n '--color-link': this.inverted\n ? window.CuraAPI.theme.colors.getColor(`${this.spotColor}-lighter`)\n : window.CuraAPI.theme.colors.getColor(`${this.spotColor}-dark`)\n };\n }\n\n setHostProperty(prop: string, value: string) {\n this.host.style.setProperty(prop, value);\n }\n\n render() {\n return (\n <Host>\n <p style={this.styles} class={this.setsizeClass()}>\n <slot></slot>\n </p>\n </Host>\n );\n }\n\n}\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
2
|
|
|
3
|
-
const curaParagraphCss = ":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:
|
|
3
|
+
const curaParagraphCss = ":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:var(--line-height);-webkit-margin-before:var(--block-margin);margin-block-start:var(--block-margin);-webkit-margin-after:var(--block-margin);margin-block-end:var(--block-margin)}:host p.large{font-size:1.21em;line-height:calc(var(--line-height) + 10%);}:host p.small{font-size:0.85em;line-height:calc(var(--line-height) - 5%);}:host p.caption{font-size:0.71em;line-height:calc(var(--line-height) - 5%);}@media (min-width: 768px) and (max-width: 1365px){:host p{font-size:1.14em;line-height:calc(var(--line-height) + 5%);}:host p.large{font-size:1.35em;line-height:calc(var(--line-height) + 10%);}:host p.small{font-size:1em;line-height:calc(var(--line-height) - 5%);}:host p.caption{font-size:0.85em;line-height:calc(var(--line-height) - 5%);}}@media (min-width: 1366px){:host p{font-size:1.42em;line-height:calc(var(--line-height) + 10%);}:host p.large{font-size:1.71em;line-height:calc(var(--line-height) + 20%);}:host p.small{font-size:1.21em;line-height:calc(var(--line-height) + 5%);}:host p.caption{font-size:1em;line-height:calc(var(--line-height) + 5%);}}: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}";
|
|
4
4
|
|
|
5
5
|
const CuraParagraph$1 = /*@__PURE__*/ proxyCustomElement(class CuraParagraph extends HTMLElement {
|
|
6
6
|
constructor() {
|
|
@@ -10,6 +10,11 @@ const CuraParagraph$1 = /*@__PURE__*/ proxyCustomElement(class CuraParagraph ext
|
|
|
10
10
|
this.size = 'regular';
|
|
11
11
|
this.inverted = false;
|
|
12
12
|
this.spotColor = 'primary';
|
|
13
|
+
this.color = undefined;
|
|
14
|
+
this.styles = {};
|
|
15
|
+
}
|
|
16
|
+
handleChangeColor() {
|
|
17
|
+
this.setColors();
|
|
13
18
|
}
|
|
14
19
|
connectedCallback() {
|
|
15
20
|
this.weights = window.CuraAPI.theme.fonts.getWeights();
|
|
@@ -31,15 +36,16 @@ const CuraParagraph$1 = /*@__PURE__*/ proxyCustomElement(class CuraParagraph ext
|
|
|
31
36
|
};
|
|
32
37
|
this.setHostProperty('--font-size', window.CuraAPI.theme.fonts.getSize());
|
|
33
38
|
this.setHostProperty('--block-margin', '1.25em');
|
|
39
|
+
this.setHostProperty('--line-height', '140%');
|
|
34
40
|
}
|
|
35
41
|
setColors() {
|
|
36
|
-
const fontColor = this.
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
this.styles
|
|
41
|
-
|
|
42
|
-
|
|
42
|
+
const fontColor = this.color ? window.CuraAPI.theme.colors.getColor(this.color) :
|
|
43
|
+
this.inverted
|
|
44
|
+
? window.CuraAPI.theme.colors.getColor('neutral-white')
|
|
45
|
+
: window.CuraAPI.theme.fonts.getColor();
|
|
46
|
+
this.styles = Object.assign(Object.assign({}, this.styles), { '--color-body': fontColor || window.CuraAPI.theme.colors.getColor('neutral-darker'), '--color-link': this.inverted
|
|
47
|
+
? window.CuraAPI.theme.colors.getColor(`${this.spotColor}-lighter`)
|
|
48
|
+
: window.CuraAPI.theme.colors.getColor(`${this.spotColor}-dark`) });
|
|
43
49
|
}
|
|
44
50
|
setHostProperty(prop, value) {
|
|
45
51
|
this.host.style.setProperty(prop, value);
|
|
@@ -48,11 +54,16 @@ const CuraParagraph$1 = /*@__PURE__*/ proxyCustomElement(class CuraParagraph ext
|
|
|
48
54
|
return (h(Host, null, h("p", { style: this.styles, class: this.setsizeClass() }, h("slot", null))));
|
|
49
55
|
}
|
|
50
56
|
get host() { return this; }
|
|
57
|
+
static get watchers() { return {
|
|
58
|
+
"color": ["handleChangeColor"]
|
|
59
|
+
}; }
|
|
51
60
|
static get style() { return curaParagraphCss; }
|
|
52
61
|
}, [1, "cura-paragraph", {
|
|
53
62
|
"size": [513],
|
|
54
63
|
"inverted": [516],
|
|
55
|
-
"spotColor": [513, "spot-color"]
|
|
64
|
+
"spotColor": [513, "spot-color"],
|
|
65
|
+
"color": [8],
|
|
66
|
+
"styles": [32]
|
|
56
67
|
}]);
|
|
57
68
|
function defineCustomElement$1() {
|
|
58
69
|
if (typeof customElements === "undefined") {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"cura-paragraph.js","mappings":";;AAAA,MAAM,gBAAgB,GAAG,
|
|
1
|
+
{"file":"cura-paragraph.js","mappings":";;AAAA,MAAM,gBAAgB,GAAG,4mDAA4mD;;MCOxnDA,eAAa;;;;;gBAMiD,SAAS;oBAKhD,KAAK;qBAKJ,SAAS;;kBAmB1B,EAAE;;EAbpB,iBAAiB;IACf,IAAI,CAAC,SAAS,EAAE,CAAC;GAClB;EAaD,iBAAiB;IACf,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,UAAU,EAAE,CAAC;IACvD,IAAI,CAAC,iBAAiB,EAAE,CAAC;IACzB,IAAI,CAAC,SAAS,EAAE,CAAC;GAClB;EAED,YAAY;IACV,MAAM,SAAS,GAAG,EAAE,CAAC;IACrB,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,GAAG,IAAI,CAAC;IAC1C,OAAO,SAAS,CAAC;GAClB;EAED,iBAAiB;IACf,IAAI,CAAC,MAAM,GAAG;MACZ,eAAe,EAAE,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC;MAC7D,aAAa,EAAE,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,OAAO,EAAE;MACnD,uBAAuB,EAAE,IAAI,CAAC,OAAO,CAAC,OAAO;MAC7C,sBAAsB,EAAE,IAAI,CAAC,OAAO,CAAC,MAAM;MAC3C,oBAAoB,EAAE,IAAI,CAAC,OAAO,CAAC,IAAI;KACxC,CAAA;IACD,IAAI,CAAC,eAAe,CAAC,aAAa,EAAE,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;IAC1E,IAAI,CAAC,eAAe,CAAC,gBAAgB,EAAE,QAAQ,CAAC,CAAC;IACjD,IAAI,CAAC,eAAe,CAAC,eAAe,EAAE,MAAM,CAAC,CAAC;GAC/C;EAED,SAAS;IACP,MAAM,SAAS,GAAG,IAAI,CAAC,KAAK,GAAG,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC;MAC7E,IAAI,CAAC,QAAQ;UACX,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,eAAe,CAAC;UACrD,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC;IAC1C,IAAI,CAAC,MAAM,mCACN,IAAI,CAAC,MAAM,KACd,cAAc,EAAE,SAAS,IAAI,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,gBAAgB,CAAC,EACnF,cAAc,EAAE,IAAI,CAAC,QAAQ;UACzB,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,GAAG,IAAI,CAAC,SAAS,UAAU,CAAC;UACjE,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,GAAG,IAAI,CAAC,SAAS,OAAO,CAAC,GACnE,CAAC;GACH;EAED,eAAe,CAAC,IAAY,EAAE,KAAa;IACzC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;GAC1C;EAED,MAAM;IACJ,QACE,EAAC,IAAI,QACH,SAAG,KAAK,EAAE,IAAI,CAAC,MAAM,EAAE,KAAK,EAAE,IAAI,CAAC,YAAY,EAAE,IAC/C,eAAa,CACX,CACC,EACP;GACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["CuraParagraph"],"sources":["./src/components/text/cura-paragraph/cura-paragraph.scss?tag=cura-paragraph&encapsulation=shadow","./src/components/text/cura-paragraph/cura-paragraph.tsx"],"sourcesContent":["@import '../../../scss/mixins/responsive.scss';\n\n:host {\n display: block;\n font-size: var(--font-size);\n\n p {\n font-family: var(--font-family);\n font-size: var(--font-size);\n font-weight: var(--font-weight-regular);\n color: var(--color-body);\n line-height: var(--line-height);\n /* letter-spacing: 0.02em; */\n margin-block-start: var(--block-margin);\n margin-block-end: var(--block-margin);\n\n &.large {\n font-size: 1.21em;\n line-height: calc(var(--line-height) + 10%);\n /* line-height: 150%; */\n /* letter-spacing: normal; */\n }\n\n &.small {\n font-size: 0.85em;\n line-height: calc(var(--line-height) - 5%);\n /* line-height: 135%; */\n /* letter-spacing: 0.04em; */\n }\n\n &.caption {\n font-size: 0.71em;\n line-height: calc(var(--line-height) - 5%);\n /* line-height: 135%; */\n /* letter-spacing: 0.06em; */\n }\n }\n\n @include medium-only() {\n p {\n font-size: 1.14em;\n line-height: calc(var(--line-height) + 5%);\n /* line-height: 145%; */\n\n &.large {\n font-size: 1.35em;\n line-height: calc(var(--line-height) + 10%);\n /* line-height: 150%; */\n }\n\n &.small {\n font-size: 1em;\n line-height: calc(var(--line-height) - 5%);\n /* line-height: 135%; */\n }\n\n &.caption {\n font-size: 0.85em;\n line-height: calc(var(--line-height) - 5%);\n /* line-height: 135%; */\n /* letter-spacing: 0.06em; */\n }\n }\n }\n\n @include large-up() {\n p {\n font-size: 1.42em;\n line-height: calc(var(--line-height) + 10%);\n /* line-height: 150%; */\n /* letter-spacing: normal; */\n\n &.large {\n font-size: 1.71em;\n line-height: calc(var(--line-height) + 20%);\n /* line-height: 160%; */\n }\n\n &.small {\n font-size: 1.21em;\n line-height: calc(var(--line-height) + 5%);\n /* line-height: 145%; */\n /* letter-spacing: normal; */\n }\n\n &.caption {\n font-size: 1em;\n line-height: calc(var(--line-height) + 5%);\n /* line-height: 145%; */\n /* letter-spacing: 0.02em; */\n }\n }\n }\n\n ::slotted(b), ::slotted(strong) {\n font-weight: var(--font-weight-bold);\n }\n\n ::slotted(a) {\n font-weight: var(--font-weight-medium);\n color: var(--color-link);\n text-underline-offset: 10%;\n }\n\n ::slotted(abbr) {\n color: var(--color-link);\n text-decoration: underline dashed 1px var(--color-link);\n text-underline-offset: 10%;\n cursor: default;\n }\n\n}\n\n","import { Component, Host, Prop, h, Element, Watch, State } from '@stencil/core';\n\n@Component({\n tag: 'cura-paragraph',\n styleUrl: 'cura-paragraph.scss',\n shadow: true,\n})\nexport class CuraParagraph {\n\n /**\n * Set size of body text.\n * Values: regular (default) | large | small | caption.\n */\n @Prop({reflect: true}) size: 'regular' | 'large' | 'small' | 'caption' = 'regular';\n /**\n * Apply light color to text in dark background.\n * Values: boolean.\n */\n @Prop({reflect: true}) inverted = false;\n /**\n * Apply base system color to elements like <a> and <abbr>.\n * Values: String primary(default) | secondary | accent | neutral | success | error | warning | info.\n */\n @Prop({reflect: true}) spotColor = 'primary';\n /**\n * Color base from color scheme. Default: theme font color.\n */\n @Prop() color;\n @Watch('color')\n handleChangeColor() {\n this.setColors();\n }\n\n /**\n * Host element <cura-paragraph>\n */\n @Element() host: HTMLElement;\n\n /**\n * Internal Props\n */\n weights: any;\n @State() styles = {};\n\n connectedCallback() {\n this.weights = window.CuraAPI.theme.fonts.getWeights();\n this.setFontProperties();\n this.setColors();\n }\n\n setsizeClass() {\n const sizeclass = {};\n sizeclass[this.size.toLowerCase()] = true;\n return sizeclass;\n }\n\n setFontProperties() {\n this.styles = {\n '--font-family': window.CuraAPI.theme.fonts.getFamily('body'),\n '--font-size': window.CuraAPI.theme.fonts.getSize(),\n '--font-weight-regular': this.weights.regular,\n '--font-weight-medium': this.weights.medium,\n '--font-weight-bold': this.weights.bold\n }\n this.setHostProperty('--font-size', window.CuraAPI.theme.fonts.getSize());\n this.setHostProperty('--block-margin', '1.25em');\n this.setHostProperty('--line-height', '140%');\n }\n\n setColors() {\n const fontColor = this.color ? window.CuraAPI.theme.colors.getColor(this.color) :\n this.inverted\n ? window.CuraAPI.theme.colors.getColor('neutral-white')\n : window.CuraAPI.theme.fonts.getColor();\n this.styles = {\n ...this.styles,\n '--color-body': fontColor || window.CuraAPI.theme.colors.getColor('neutral-darker'),\n '--color-link': this.inverted\n ? window.CuraAPI.theme.colors.getColor(`${this.spotColor}-lighter`)\n : window.CuraAPI.theme.colors.getColor(`${this.spotColor}-dark`)\n };\n }\n\n setHostProperty(prop: string, value: string) {\n this.host.style.setProperty(prop, value);\n }\n\n render() {\n return (\n <Host>\n <p style={this.styles} class={this.setsizeClass()}>\n <slot></slot>\n </p>\n </Host>\n );\n }\n\n}\n"],"version":3}
|
package/dist/cura/cura.esm.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{p as o,w as i,a as n,b as t}from"./p-
|
|
1
|
+
import{p as o,w as i,a as n,b as t}from"./p-cbc91ac5.js";export{s as setNonce}from"./p-cbc91ac5.js";import{g as e}from"./p-deafb1b5.js";const c=()=>{{o.o=i.__cssshim}const t=import.meta.url;const e={};if(t!==""){e.resourcesUrl=new URL(".",t).href}return n(e)};c().then((o=>{e();return t([["p-2b6e4727",[[1,"cura-button",{size:[513],disabled:[516],isLoading:[516,"is-loading"],iconName:[513,"icon-name"],iconset:[513],iconPosition:[513,"icon-position"],iconOnly:[516,"icon-only"],href:[513],target:[513],color:[1],fontColor:[513,"font-color"],textAlign:[513,"text-align"],styles:[32]}],[1,"cura-button-outline",{size:[513],disabled:[516],isLoading:[516,"is-loading"],iconName:[513,"icon-name"],iconset:[513],iconPosition:[513,"icon-position"],iconOnly:[516,"icon-only"],href:[513],target:[513],color:[1],fontColor:[513,"font-color"],textAlign:[513,"text-align"],styles:[32]}],[1,"cura-button-transparent",{size:[513],disabled:[516],isLoading:[516,"is-loading"],iconName:[513,"icon-name"],iconset:[513],iconPosition:[513,"icon-position"],iconOnly:[516,"icon-only"],href:[513],target:[513],color:[1],fontColor:[513,"font-color"],textAlign:[513,"text-align"],styles:[32]}],[1,"cura-icons-view",{selected:[32]}],[1,"cura-display",{level:[514],size:[513],inverted:[516],spotColor:[513,"spot-color"]}],[1,"cura-heading",{level:[514],size:[513],weight:[513],inverted:[516],spotColor:[513,"spot-color"]}],[1,"cura-page-template",{contentwidth:[513]}],[1,"cura-paragraph",{size:[513],inverted:[516],spotColor:[513,"spot-color"],color:[8],styles:[32]}],[1,"cura-loader-circle",{size:[513],color:[513]}],[1,"cura-icon",{name:[513],color:[1],size:[8],iconset:[513],disabled:[4]}]]]],o)}));
|
|
2
2
|
//# sourceMappingURL=cura.esm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["patchBrowser","plt","$cssShim$","win","__cssshim","importMeta","url","opts","resourcesUrl","URL","href","promiseResolve","then","options","globalScripts","bootstrapLazy","size","disabled","isLoading","iconName","iconset","iconPosition","iconOnly","target","color","fontColor","textAlign","styles","selected","level","inverted","spotColor","weight","contentwidth","name"],"sources":["./node_modules/@stencil/core/internal/client/patch-browser.js","@lazy-browser-entrypoint?app-data=conditional"],"sourcesContent":["/*\n Stencil Client Patch Browser v3.3.0 | MIT Licensed | https://stenciljs.com\n */\nimport { BUILD, NAMESPACE } from '@stencil/core/internal/app-data';\nimport { consoleDevInfo, plt, win, doc, promiseResolve, H } from '@stencil/core';\n/**\n * Helper method for querying a `meta` tag that contains a nonce value\n * out of a DOM's head.\n *\n * @param doc The DOM containing the `head` to query against\n * @returns The content of the meta tag representing the nonce value, or `undefined` if no tag\n * exists or the tag has no content.\n */\nfunction queryNonceMetaTagContent(doc) {\n var _a, _b, _c;\n return (_c = (_b = (_a = doc.head) === null || _a === void 0 ? void 0 : _a.querySelector('meta[name=\"csp-nonce\"]')) === null || _b === void 0 ? void 0 : _b.getAttribute('content')) !== null && _c !== void 0 ? _c : undefined;\n}\n// TODO(STENCIL-661): Remove code related to the dynamic import shim\nconst getDynamicImportFunction = (namespace) => `__sc_import_${namespace.replace(/\\s|-/g, '_')}`;\nconst patchBrowser = () => {\n // NOTE!! This fn cannot use async/await!\n if (BUILD.isDev && !BUILD.isTesting) {\n consoleDevInfo('Running in development mode.');\n }\n // TODO(STENCIL-659): Remove code implementing the CSS variable shim\n if (BUILD.cssVarShim) {\n // shim css vars\n // TODO(STENCIL-659): Remove code implementing the CSS variable shim\n plt.$cssShim$ = win.__cssshim;\n }\n if (BUILD.cloneNodeFix) {\n // opted-in to polyfill cloneNode() for slot polyfilled components\n patchCloneNodeFix(H.prototype);\n }\n if (BUILD.profile && !performance.mark) {\n // not all browsers support performance.mark/measure (Safari 10)\n // because the mark/measure APIs are designed to write entries to a buffer in the browser that does not exist,\n // simply stub the implementations out.\n // TODO(STENCIL-323): Remove this patch when support for older browsers is removed (breaking)\n // @ts-ignore\n performance.mark = performance.measure = () => {\n /*noop*/\n };\n performance.getEntriesByName = () => [];\n }\n // @ts-ignore\n const scriptElm = \n // TODO(STENCIL-661): Remove code related to the dynamic import shim\n // TODO(STENCIL-663): Remove code related to deprecated `safari10` field.\n BUILD.scriptDataOpts || BUILD.safari10 || BUILD.dynamicImportShim\n ? Array.from(doc.querySelectorAll('script')).find((s) => new RegExp(`\\/${NAMESPACE}(\\\\.esm)?\\\\.js($|\\\\?|#)`).test(s.src) ||\n s.getAttribute('data-stencil-namespace') === NAMESPACE)\n : null;\n const importMeta = import.meta.url;\n const opts = BUILD.scriptDataOpts ? (scriptElm || {})['data-opts'] || {} : {};\n // TODO(STENCIL-663): Remove code related to deprecated `safari10` field.\n if (BUILD.safari10 && 'onbeforeload' in scriptElm && !history.scrollRestoration /* IS_ESM_BUILD */) {\n // Safari < v11 support: This IF is true if it's Safari below v11.\n // This fn cannot use async/await since Safari didn't support it until v11,\n // however, Safari 10 did support modules. Safari 10 also didn't support \"nomodule\",\n // so both the ESM file and nomodule file would get downloaded. Only Safari\n // has 'onbeforeload' in the script, and \"history.scrollRestoration\" was added\n // to Safari in v11. Return a noop then() so the async/await ESM code doesn't continue.\n // IS_ESM_BUILD is replaced at build time so this check doesn't happen in systemjs builds.\n return {\n then() {\n /* promise noop */\n },\n };\n }\n // TODO(STENCIL-663): Remove code related to deprecated `safari10` field.\n if (!BUILD.safari10 && importMeta !== '') {\n opts.resourcesUrl = new URL('.', importMeta).href;\n // TODO(STENCIL-661): Remove code related to the dynamic import shim\n // TODO(STENCIL-663): Remove code related to deprecated `safari10` field.\n }\n else if (BUILD.dynamicImportShim || BUILD.safari10) {\n opts.resourcesUrl = new URL('.', new URL(scriptElm.getAttribute('data-resources-url') || scriptElm.src, win.location.href)).href;\n // TODO(STENCIL-661): Remove code related to the dynamic import shim\n if (BUILD.dynamicImportShim) {\n patchDynamicImport(opts.resourcesUrl, scriptElm);\n }\n // TODO(STENCIL-661): Remove code related to the dynamic import shim\n if (BUILD.dynamicImportShim && !win.customElements) {\n // module support, but no custom elements support (Old Edge)\n // @ts-ignore\n return import(/* webpackChunkName: \"polyfills-dom\" */ './dom.js').then(() => opts);\n }\n }\n return promiseResolve(opts);\n};\n// TODO(STENCIL-661): Remove code related to the dynamic import shim\nconst patchDynamicImport = (base, orgScriptElm) => {\n const importFunctionName = getDynamicImportFunction(NAMESPACE);\n try {\n // test if this browser supports dynamic imports\n // There is a caching issue in V8, that breaks using import() in Function\n // By generating a random string, we can workaround it\n // Check https://bugs.chromium.org/p/chromium/issues/detail?id=990810 for more info\n win[importFunctionName] = new Function('w', `return import(w);//${Math.random()}`);\n }\n catch (e) {\n // this shim is specifically for browsers that do support \"esm\" imports\n // however, they do NOT support \"dynamic\" imports\n // basically this code is for old Edge, v18 and below\n const moduleMap = new Map();\n win[importFunctionName] = (src) => {\n var _a;\n const url = new URL(src, base).href;\n let mod = moduleMap.get(url);\n if (!mod) {\n const script = doc.createElement('script');\n script.type = 'module';\n script.crossOrigin = orgScriptElm.crossOrigin;\n script.src = URL.createObjectURL(new Blob([`import * as m from '${url}'; window.${importFunctionName}.m = m;`], {\n type: 'application/javascript',\n }));\n // Apply CSP nonce to the script tag if it exists\n const nonce = (_a = plt.$nonce$) !== null && _a !== void 0 ? _a : queryNonceMetaTagContent(doc);\n if (nonce != null) {\n script.setAttribute('nonce', nonce);\n }\n mod = new Promise((resolve) => {\n script.onload = () => {\n resolve(win[importFunctionName].m);\n script.remove();\n };\n });\n moduleMap.set(url, mod);\n doc.head.appendChild(script);\n }\n return mod;\n };\n }\n};\nconst patchCloneNodeFix = (HTMLElementPrototype) => {\n const nativeCloneNodeFn = HTMLElementPrototype.cloneNode;\n HTMLElementPrototype.cloneNode = function (deep) {\n if (this.nodeName === 'TEMPLATE') {\n return nativeCloneNodeFn.call(this, deep);\n }\n const clonedNode = nativeCloneNodeFn.call(this, false);\n const srcChildNodes = this.childNodes;\n if (deep) {\n for (let i = 0; i < srcChildNodes.length; i++) {\n // Node.ATTRIBUTE_NODE === 2, and checking because IE11\n if (srcChildNodes[i].nodeType !== 2) {\n clonedNode.appendChild(srcChildNodes[i].cloneNode(true));\n }\n }\n }\n return clonedNode;\n };\n};\nexport { patchBrowser };\n","export { setNonce } from '@stencil/core';\nimport { bootstrapLazy } from '@stencil/core';\nimport { patchBrowser } from '@stencil/core/internal/client/patch-browser';\nimport { globalScripts } from '@stencil/core/internal/app-globals';\npatchBrowser().then(options => {\n globalScripts();\n return bootstrapLazy([/*!__STENCIL_LAZY_DATA__*/], options);\n});\n"],"mappings":"wIAmBA,MAAMA,EAAe,KAMK,CAGlBC,EAAIC,EAAYC,EAAIC,SAC5B,CAwBI,MAAMC,cAAyBC,IAC/B,MAAMC,EAAqE,GAiB3E,GAAuBF,IAAe,GAAI,CACtCE,EAAKC,aAAe,IAAIC,IAAI,IAAKJ,GAAYK,IAGrD,CAcI,OAAOC,EAAeJ,EAAK,ECrF/BP,IAAeY,MAAKC,IAClBC,IACA,OAAOC,EAAc,iCAA8B,CAAAC,KAAS,MAAAC,SAAA,MAAAC,UAAA,mBAAAC,SAAA,kBAAAC,QAAA,MAAAC,aAAA,sBAAAC,SAAA,kBAAAZ,KAAA,MAAAa,OAAA,MAAAC,MAAA,IAAAC,UAAA,mBAAAC,UAAA,mBAAAC,OAAA,iCAAAX,KAAA,MAAAC,SAAA,MAAAC,UAAA,mBAAAC,SAAA,kBAAAC,QAAA,MAAAC,aAAA,sBAAAC,SAAA,kBAAAZ,KAAA,MAAAa,OAAA,MAAAC,MAAA,IAAAC,UAAA,mBAAAC,UAAA,mBAAAC,OAAA,qCAAAX,KAAA,MAAAC,SAAA,MAAAC,UAAA,mBAAAC,SAAA,kBAAAC,QAAA,MAAAC,aAAA,sBAAAC,SAAA,kBAAAZ,KAAA,MAAAa,OAAA,MAAAC,MAAA,IAAAC,UAAA,mBAAAC,UAAA,mBAAAC,OAAA,6BAAAC,SAAA,0BAAAC,MAAA,MAAAb,KAAA,MAAAc,SAAA,MAAAC,UAAA,wCAAAF,MAAA,MAAAb,KAAA,MAAAgB,OAAA,MAAAF,SAAA,MAAAC,UAAA,8CAAAE,aAAA,6BAAAjB,KAAA,MAAAc,SAAA,MAAAC,UAAA,
|
|
1
|
+
{"version":3,"names":["patchBrowser","plt","$cssShim$","win","__cssshim","importMeta","url","opts","resourcesUrl","URL","href","promiseResolve","then","options","globalScripts","bootstrapLazy","size","disabled","isLoading","iconName","iconset","iconPosition","iconOnly","target","color","fontColor","textAlign","styles","selected","level","inverted","spotColor","weight","contentwidth","name"],"sources":["./node_modules/@stencil/core/internal/client/patch-browser.js","@lazy-browser-entrypoint?app-data=conditional"],"sourcesContent":["/*\n Stencil Client Patch Browser v3.3.0 | MIT Licensed | https://stenciljs.com\n */\nimport { BUILD, NAMESPACE } from '@stencil/core/internal/app-data';\nimport { consoleDevInfo, plt, win, doc, promiseResolve, H } from '@stencil/core';\n/**\n * Helper method for querying a `meta` tag that contains a nonce value\n * out of a DOM's head.\n *\n * @param doc The DOM containing the `head` to query against\n * @returns The content of the meta tag representing the nonce value, or `undefined` if no tag\n * exists or the tag has no content.\n */\nfunction queryNonceMetaTagContent(doc) {\n var _a, _b, _c;\n return (_c = (_b = (_a = doc.head) === null || _a === void 0 ? void 0 : _a.querySelector('meta[name=\"csp-nonce\"]')) === null || _b === void 0 ? void 0 : _b.getAttribute('content')) !== null && _c !== void 0 ? _c : undefined;\n}\n// TODO(STENCIL-661): Remove code related to the dynamic import shim\nconst getDynamicImportFunction = (namespace) => `__sc_import_${namespace.replace(/\\s|-/g, '_')}`;\nconst patchBrowser = () => {\n // NOTE!! This fn cannot use async/await!\n if (BUILD.isDev && !BUILD.isTesting) {\n consoleDevInfo('Running in development mode.');\n }\n // TODO(STENCIL-659): Remove code implementing the CSS variable shim\n if (BUILD.cssVarShim) {\n // shim css vars\n // TODO(STENCIL-659): Remove code implementing the CSS variable shim\n plt.$cssShim$ = win.__cssshim;\n }\n if (BUILD.cloneNodeFix) {\n // opted-in to polyfill cloneNode() for slot polyfilled components\n patchCloneNodeFix(H.prototype);\n }\n if (BUILD.profile && !performance.mark) {\n // not all browsers support performance.mark/measure (Safari 10)\n // because the mark/measure APIs are designed to write entries to a buffer in the browser that does not exist,\n // simply stub the implementations out.\n // TODO(STENCIL-323): Remove this patch when support for older browsers is removed (breaking)\n // @ts-ignore\n performance.mark = performance.measure = () => {\n /*noop*/\n };\n performance.getEntriesByName = () => [];\n }\n // @ts-ignore\n const scriptElm = \n // TODO(STENCIL-661): Remove code related to the dynamic import shim\n // TODO(STENCIL-663): Remove code related to deprecated `safari10` field.\n BUILD.scriptDataOpts || BUILD.safari10 || BUILD.dynamicImportShim\n ? Array.from(doc.querySelectorAll('script')).find((s) => new RegExp(`\\/${NAMESPACE}(\\\\.esm)?\\\\.js($|\\\\?|#)`).test(s.src) ||\n s.getAttribute('data-stencil-namespace') === NAMESPACE)\n : null;\n const importMeta = import.meta.url;\n const opts = BUILD.scriptDataOpts ? (scriptElm || {})['data-opts'] || {} : {};\n // TODO(STENCIL-663): Remove code related to deprecated `safari10` field.\n if (BUILD.safari10 && 'onbeforeload' in scriptElm && !history.scrollRestoration /* IS_ESM_BUILD */) {\n // Safari < v11 support: This IF is true if it's Safari below v11.\n // This fn cannot use async/await since Safari didn't support it until v11,\n // however, Safari 10 did support modules. Safari 10 also didn't support \"nomodule\",\n // so both the ESM file and nomodule file would get downloaded. Only Safari\n // has 'onbeforeload' in the script, and \"history.scrollRestoration\" was added\n // to Safari in v11. Return a noop then() so the async/await ESM code doesn't continue.\n // IS_ESM_BUILD is replaced at build time so this check doesn't happen in systemjs builds.\n return {\n then() {\n /* promise noop */\n },\n };\n }\n // TODO(STENCIL-663): Remove code related to deprecated `safari10` field.\n if (!BUILD.safari10 && importMeta !== '') {\n opts.resourcesUrl = new URL('.', importMeta).href;\n // TODO(STENCIL-661): Remove code related to the dynamic import shim\n // TODO(STENCIL-663): Remove code related to deprecated `safari10` field.\n }\n else if (BUILD.dynamicImportShim || BUILD.safari10) {\n opts.resourcesUrl = new URL('.', new URL(scriptElm.getAttribute('data-resources-url') || scriptElm.src, win.location.href)).href;\n // TODO(STENCIL-661): Remove code related to the dynamic import shim\n if (BUILD.dynamicImportShim) {\n patchDynamicImport(opts.resourcesUrl, scriptElm);\n }\n // TODO(STENCIL-661): Remove code related to the dynamic import shim\n if (BUILD.dynamicImportShim && !win.customElements) {\n // module support, but no custom elements support (Old Edge)\n // @ts-ignore\n return import(/* webpackChunkName: \"polyfills-dom\" */ './dom.js').then(() => opts);\n }\n }\n return promiseResolve(opts);\n};\n// TODO(STENCIL-661): Remove code related to the dynamic import shim\nconst patchDynamicImport = (base, orgScriptElm) => {\n const importFunctionName = getDynamicImportFunction(NAMESPACE);\n try {\n // test if this browser supports dynamic imports\n // There is a caching issue in V8, that breaks using import() in Function\n // By generating a random string, we can workaround it\n // Check https://bugs.chromium.org/p/chromium/issues/detail?id=990810 for more info\n win[importFunctionName] = new Function('w', `return import(w);//${Math.random()}`);\n }\n catch (e) {\n // this shim is specifically for browsers that do support \"esm\" imports\n // however, they do NOT support \"dynamic\" imports\n // basically this code is for old Edge, v18 and below\n const moduleMap = new Map();\n win[importFunctionName] = (src) => {\n var _a;\n const url = new URL(src, base).href;\n let mod = moduleMap.get(url);\n if (!mod) {\n const script = doc.createElement('script');\n script.type = 'module';\n script.crossOrigin = orgScriptElm.crossOrigin;\n script.src = URL.createObjectURL(new Blob([`import * as m from '${url}'; window.${importFunctionName}.m = m;`], {\n type: 'application/javascript',\n }));\n // Apply CSP nonce to the script tag if it exists\n const nonce = (_a = plt.$nonce$) !== null && _a !== void 0 ? _a : queryNonceMetaTagContent(doc);\n if (nonce != null) {\n script.setAttribute('nonce', nonce);\n }\n mod = new Promise((resolve) => {\n script.onload = () => {\n resolve(win[importFunctionName].m);\n script.remove();\n };\n });\n moduleMap.set(url, mod);\n doc.head.appendChild(script);\n }\n return mod;\n };\n }\n};\nconst patchCloneNodeFix = (HTMLElementPrototype) => {\n const nativeCloneNodeFn = HTMLElementPrototype.cloneNode;\n HTMLElementPrototype.cloneNode = function (deep) {\n if (this.nodeName === 'TEMPLATE') {\n return nativeCloneNodeFn.call(this, deep);\n }\n const clonedNode = nativeCloneNodeFn.call(this, false);\n const srcChildNodes = this.childNodes;\n if (deep) {\n for (let i = 0; i < srcChildNodes.length; i++) {\n // Node.ATTRIBUTE_NODE === 2, and checking because IE11\n if (srcChildNodes[i].nodeType !== 2) {\n clonedNode.appendChild(srcChildNodes[i].cloneNode(true));\n }\n }\n }\n return clonedNode;\n };\n};\nexport { patchBrowser };\n","export { setNonce } from '@stencil/core';\nimport { bootstrapLazy } from '@stencil/core';\nimport { patchBrowser } from '@stencil/core/internal/client/patch-browser';\nimport { globalScripts } from '@stencil/core/internal/app-globals';\npatchBrowser().then(options => {\n globalScripts();\n return bootstrapLazy([/*!__STENCIL_LAZY_DATA__*/], options);\n});\n"],"mappings":"wIAmBA,MAAMA,EAAe,KAMK,CAGlBC,EAAIC,EAAYC,EAAIC,SAC5B,CAwBI,MAAMC,cAAyBC,IAC/B,MAAMC,EAAqE,GAiB3E,GAAuBF,IAAe,GAAI,CACtCE,EAAKC,aAAe,IAAIC,IAAI,IAAKJ,GAAYK,IAGrD,CAcI,OAAOC,EAAeJ,EAAK,ECrF/BP,IAAeY,MAAKC,IAClBC,IACA,OAAOC,EAAc,iCAA8B,CAAAC,KAAS,MAAAC,SAAA,MAAAC,UAAA,mBAAAC,SAAA,kBAAAC,QAAA,MAAAC,aAAA,sBAAAC,SAAA,kBAAAZ,KAAA,MAAAa,OAAA,MAAAC,MAAA,IAAAC,UAAA,mBAAAC,UAAA,mBAAAC,OAAA,iCAAAX,KAAA,MAAAC,SAAA,MAAAC,UAAA,mBAAAC,SAAA,kBAAAC,QAAA,MAAAC,aAAA,sBAAAC,SAAA,kBAAAZ,KAAA,MAAAa,OAAA,MAAAC,MAAA,IAAAC,UAAA,mBAAAC,UAAA,mBAAAC,OAAA,qCAAAX,KAAA,MAAAC,SAAA,MAAAC,UAAA,mBAAAC,SAAA,kBAAAC,QAAA,MAAAC,aAAA,sBAAAC,SAAA,kBAAAZ,KAAA,MAAAa,OAAA,MAAAC,MAAA,IAAAC,UAAA,mBAAAC,UAAA,mBAAAC,OAAA,6BAAAC,SAAA,0BAAAC,MAAA,MAAAb,KAAA,MAAAc,SAAA,MAAAC,UAAA,wCAAAF,MAAA,MAAAb,KAAA,MAAAgB,OAAA,MAAAF,SAAA,MAAAC,UAAA,8CAAAE,aAAA,6BAAAjB,KAAA,MAAAc,SAAA,MAAAC,UAAA,mBAAAP,MAAA,IAAAG,OAAA,gCAAAX,KAAA,MAAAQ,MAAA,wBAAAU,KAAA,MAAAV,MAAA,IAAAR,KAAA,IAAAI,QAAA,MAAAH,SAAA,SAAAJ,EAAA"}
|
package/dist/cura/cura.js
CHANGED
|
@@ -117,7 +117,7 @@ var __assign=this&&this.__assign||function(){return __assign=Object.assign||func
|
|
|
117
117
|
var resourcesUrl = scriptElm ? scriptElm.getAttribute('data-resources-url') || scriptElm.src : '';
|
|
118
118
|
var start = function() {
|
|
119
119
|
// if src is not present then origin is "null", and new URL() throws TypeError: Failed to construct 'URL': Invalid base URL
|
|
120
|
-
var url = new URL('./p-
|
|
120
|
+
var url = new URL('./p-b1ae12e5.system.js', new URL(resourcesUrl, window.location.origin !== 'null' ? window.location.origin : undefined));
|
|
121
121
|
System.import(url.href);
|
|
122
122
|
};
|
|
123
123
|
|