@rededor/cura 0.3.1 → 0.3.2
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 → app-globals-0f70160b.js} +57 -15
- package/dist/cjs/cura-display_4.cjs.entry.js +257 -0
- package/dist/cjs/cura-icon.cjs.entry.js +59 -0
- package/dist/cjs/cura-icons-view.cjs.entry.js +27 -0
- package/dist/cjs/cura.cjs.js +2 -2
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/collection/api/cura-api.js +4 -1
- package/dist/collection/api/modules/cura-theme-module.js +2 -0
- package/dist/collection/api/modules/cura-theme-spacing-module.js +12 -0
- package/dist/collection/api/theme-presets/static.js +0 -13
- package/dist/collection/api/theme-presets/theme-oncology.js +38 -0
- package/dist/collection/api/theme-presets/theme-presets.js +3 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/cura-icons-view/cura-icons-view.css +1 -15
- package/dist/collection/components/cura-page-template/cura-page-template.css +123 -0
- package/dist/collection/components/cura-page-template/cura-page-template.js +54 -0
- package/dist/collection/components/text/cura-display/cura-display.css +25 -2
- package/dist/collection/components/text/cura-display/cura-display.js +56 -5
- package/dist/collection/components/text/cura-heading/cura-heading.css +25 -2
- package/dist/collection/components/text/cura-heading/cura-heading.js +53 -2
- package/dist/collection/components/text/cura-paragraph/cura-paragraph.css +25 -2
- package/dist/collection/components/text/cura-paragraph/cura-paragraph.js +54 -3
- package/dist/components/cura-display.js +24 -7
- package/dist/components/cura-heading.js +21 -4
- package/dist/components/cura-icons-view.js +1 -1
- package/dist/components/cura-page-template.d.ts +11 -0
- package/dist/components/cura-page-template.js +47 -0
- package/dist/components/cura-paragraph.js +22 -5
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +58 -15
- 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-32769783.system.js +1 -0
- package/dist/cura/p-5b5cf2e4.system.entry.js +1 -0
- package/dist/cura/p-84b2ad25.entry.js +1 -0
- package/dist/cura/p-8b416bc6.system.js +1 -0
- package/dist/cura/p-aca36c98.js +1 -0
- package/dist/cura/p-e3facf6a.system.entry.js +1 -0
- package/dist/cura/p-e8fadcfa.system.entry.js +1 -0
- package/dist/cura/p-fbcea891.entry.js +1 -0
- package/dist/esm/{app-globals-d7dd3a4d.js → app-globals-cb45bff3.js} +57 -15
- package/dist/esm/cura-display_4.entry.js +250 -0
- package/dist/esm/cura-icon.entry.js +55 -0
- package/dist/esm/cura-icons-view.entry.js +23 -0
- package/dist/esm/cura.js +2 -2
- package/dist/esm/loader.js +2 -2
- package/dist/esm-es5/app-globals-cb45bff3.js +1 -0
- package/dist/esm-es5/cura-display_4.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/loader.js +1 -1
- package/dist/types/api/cura-api.type.d.ts +4 -1
- package/dist/types/api/modules/cura-theme-module.d.ts +2 -0
- package/dist/types/api/modules/cura-theme-spacing-module.d.ts +6 -0
- package/dist/types/api/theme-presets/static.d.ts +0 -11
- package/dist/types/api/theme-presets/theme-oncology.d.ts +50 -0
- package/dist/types/api/theme-presets/theme-presets.d.ts +50 -0
- package/dist/types/components/cura-page-template/cura-page-template.d.ts +8 -0
- package/dist/types/components/text/cura-display/cura-display.d.ts +13 -3
- package/dist/types/components/text/cura-heading/cura-heading.d.ts +10 -0
- package/dist/types/components/text/cura-paragraph/cura-paragraph.d.ts +10 -0
- package/dist/types/components.d.ts +63 -0
- package/package.json +2 -2
- package/dist/cjs/cura-display_5.cjs.entry.js +0 -261
- package/dist/cura/p-265c1706.js +0 -1
- package/dist/cura/p-3d8bbf37.system.js +0 -1
- package/dist/cura/p-a8dcaaed.system.js +0 -1
- package/dist/cura/p-fc50b109.system.entry.js +0 -1
- package/dist/cura/p-fc80cb18.entry.js +0 -1
- package/dist/esm/cura-display_5.entry.js +0 -253
- package/dist/esm-es5/app-globals-d7dd3a4d.js +0 -1
- package/dist/esm-es5/cura-display_5.entry.js +0 -1
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
/* Breakpoints variables */
|
|
2
|
+
/**
|
|
3
|
+
* Responsive media for mobile (small) only.
|
|
4
|
+
* Use: @include mobile-only() { ... }
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Responsive media for medium only.
|
|
8
|
+
* Use: @include medium-only() { ... }
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* Responsive media for large only.
|
|
12
|
+
* Use: @include large-only() { ... }
|
|
13
|
+
*/
|
|
14
|
+
/**
|
|
15
|
+
* Responsive media for large and up.
|
|
16
|
+
* Use: @include large-up() { ... }
|
|
17
|
+
*/
|
|
18
|
+
/**
|
|
19
|
+
* Responsive media for xlarge only.
|
|
20
|
+
* Use: @include xlarge-only() { ... }
|
|
21
|
+
*/
|
|
22
|
+
:host {
|
|
23
|
+
display: block;
|
|
24
|
+
}
|
|
25
|
+
:host .grid-template {
|
|
26
|
+
display: grid;
|
|
27
|
+
grid-template-rows: auto;
|
|
28
|
+
grid-template-columns: auto;
|
|
29
|
+
grid-template-areas: "sub-header" "header" "pre-content" "content-container" "post-body" "footer" "sub-footer";
|
|
30
|
+
}
|
|
31
|
+
:host .grid-template #sub-header {
|
|
32
|
+
grid-area: sub-header;
|
|
33
|
+
}
|
|
34
|
+
:host .grid-template #header {
|
|
35
|
+
grid-area: header;
|
|
36
|
+
}
|
|
37
|
+
:host .grid-template #pre-content {
|
|
38
|
+
grid-area: pre-content;
|
|
39
|
+
}
|
|
40
|
+
:host .grid-template #content-container {
|
|
41
|
+
grid-area: content-container;
|
|
42
|
+
}
|
|
43
|
+
:host .grid-template #post-body {
|
|
44
|
+
grid-area: post-body;
|
|
45
|
+
}
|
|
46
|
+
:host .grid-template #footer {
|
|
47
|
+
grid-area: footer;
|
|
48
|
+
}
|
|
49
|
+
:host .grid-template #sub-footer {
|
|
50
|
+
grid-area: sub-footer;
|
|
51
|
+
}
|
|
52
|
+
@media (max-width: 360px) {
|
|
53
|
+
:host .grid-template {
|
|
54
|
+
padding: 0px;
|
|
55
|
+
}
|
|
56
|
+
:host .grid-template #pre-content,
|
|
57
|
+
:host .grid-template #content-container,
|
|
58
|
+
:host .grid-template #post-body,
|
|
59
|
+
:host .grid-template #footer {
|
|
60
|
+
margin-top: calc(var(--spacing) * 4px);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
@media (min-width: 768px) and (max-width: 1365px) {
|
|
64
|
+
:host .grid-template {
|
|
65
|
+
padding: 0px;
|
|
66
|
+
}
|
|
67
|
+
:host .grid-template #pre-content,
|
|
68
|
+
:host .grid-template #content-container,
|
|
69
|
+
:host .grid-template #post-body,
|
|
70
|
+
:host .grid-template #footer {
|
|
71
|
+
margin-top: calc(var(--spacing) * 5px);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
@media (min-width: 1366px) and (max-width: 1919px) {
|
|
75
|
+
:host .grid-template {
|
|
76
|
+
padding: 0px;
|
|
77
|
+
}
|
|
78
|
+
:host .grid-template #content-container #sidebar-left ::slotted(div[slot=sidebar-left]) {
|
|
79
|
+
margin-right: calc(var(--spacing) * 5px);
|
|
80
|
+
}
|
|
81
|
+
:host .grid-template #content-container #sidebar-right ::slotted(div[slot=sidebar-right]) {
|
|
82
|
+
margin-left: calc(var(--spacing) * 5px);
|
|
83
|
+
}
|
|
84
|
+
:host .grid-template #pre-content,
|
|
85
|
+
:host .grid-template #content-container,
|
|
86
|
+
:host .grid-template #post-body,
|
|
87
|
+
:host .grid-template #footer {
|
|
88
|
+
margin-top: calc(var(--spacing) * 5px);
|
|
89
|
+
}
|
|
90
|
+
:host .grid-template #content-container {
|
|
91
|
+
display: flex;
|
|
92
|
+
}
|
|
93
|
+
:host .grid-template #content-container #sidebar-left, :host .grid-template #content-container #sidebar-right {
|
|
94
|
+
max-width: 20%;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
@media (min-width: 1920px) {
|
|
98
|
+
:host .grid-template {
|
|
99
|
+
padding: 0px;
|
|
100
|
+
}
|
|
101
|
+
:host .grid-template #content-container #sidebar-left ::slotted(div[slot=sidebar-left]) {
|
|
102
|
+
margin-right: calc(var(--spacing) * 7px);
|
|
103
|
+
}
|
|
104
|
+
:host .grid-template #content-container #sidebar-right ::slotted(div[slot=sidebar-right]) {
|
|
105
|
+
margin-left: calc(var(--spacing) * 7px);
|
|
106
|
+
}
|
|
107
|
+
:host .grid-template #pre-content,
|
|
108
|
+
:host .grid-template #content-container,
|
|
109
|
+
:host .grid-template #post-body,
|
|
110
|
+
:host .grid-template #footer {
|
|
111
|
+
margin-top: calc(var(--spacing) * 7px);
|
|
112
|
+
}
|
|
113
|
+
:host .grid-template #content-container {
|
|
114
|
+
display: flex;
|
|
115
|
+
}
|
|
116
|
+
:host .grid-template #content-container #sidebar-left, :host .grid-template #content-container #sidebar-right {
|
|
117
|
+
max-width: 20%;
|
|
118
|
+
}
|
|
119
|
+
:host .grid-template #content-container.centered {
|
|
120
|
+
max-width: 1920px;
|
|
121
|
+
justify-self: center;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { Host, h } from '@stencil/core';
|
|
2
|
+
export class CuraPageTemplate {
|
|
3
|
+
constructor() {
|
|
4
|
+
this.contentwidth = 'default';
|
|
5
|
+
}
|
|
6
|
+
connectedCallback() {
|
|
7
|
+
this.styles = {
|
|
8
|
+
'--spacing': window.CuraAPI.theme.spacing.getSpacing(),
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
getClasses() {
|
|
12
|
+
const classes = {};
|
|
13
|
+
classes[this.contentwidth.toLowerCase()] = true;
|
|
14
|
+
return classes;
|
|
15
|
+
}
|
|
16
|
+
render() {
|
|
17
|
+
return (h(Host, null, h("div", { style: this.styles, class: "grid-template" }, h("div", { id: "sub-header" }, h("slot", { name: 'sub-header' })), h("div", { id: "header" }, h("slot", { name: 'header' })), h("div", { id: "pre-content" }, h("slot", { name: 'pre-content' })), h("div", { id: "content-container", class: this.getClasses() }, h("div", { id: "sidebar-left" }, h("slot", { name: 'sidebar-left' })), h("div", { id: "content" }, h("slot", { name: "content" }), h("slot", null)), h("div", { id: "sidebar-right" }, h("slot", { name: 'sidebar-right' }))), h("div", { id: "post-body" }, h("slot", { name: 'post-body' })), h("div", { id: "footer" }, h("slot", { name: 'footer' })), h("div", { id: "sub-footer" }, h("slot", { name: 'sub-footer' })))));
|
|
18
|
+
}
|
|
19
|
+
static get is() { return "cura-page-template"; }
|
|
20
|
+
static get encapsulation() { return "shadow"; }
|
|
21
|
+
static get originalStyleUrls() {
|
|
22
|
+
return {
|
|
23
|
+
"$": ["cura-page-template.scss"]
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
static get styleUrls() {
|
|
27
|
+
return {
|
|
28
|
+
"$": ["cura-page-template.css"]
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
static get properties() {
|
|
32
|
+
return {
|
|
33
|
+
"contentwidth": {
|
|
34
|
+
"type": "string",
|
|
35
|
+
"mutable": false,
|
|
36
|
+
"complexType": {
|
|
37
|
+
"original": "'default' | 'centered'",
|
|
38
|
+
"resolved": "\"centered\" | \"default\"",
|
|
39
|
+
"references": {}
|
|
40
|
+
},
|
|
41
|
+
"required": false,
|
|
42
|
+
"optional": false,
|
|
43
|
+
"docs": {
|
|
44
|
+
"tags": [],
|
|
45
|
+
"text": ""
|
|
46
|
+
},
|
|
47
|
+
"attribute": "contentwidth",
|
|
48
|
+
"reflect": true,
|
|
49
|
+
"defaultValue": "'default'"
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
static get elementRef() { return "host"; }
|
|
54
|
+
}
|
|
@@ -1,3 +1,24 @@
|
|
|
1
|
+
/* Breakpoints variables */
|
|
2
|
+
/**
|
|
3
|
+
* Responsive media for mobile (small) only.
|
|
4
|
+
* Use: @include mobile-only() { ... }
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Responsive media for medium only.
|
|
8
|
+
* Use: @include medium-only() { ... }
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* Responsive media for large only.
|
|
12
|
+
* Use: @include large-only() { ... }
|
|
13
|
+
*/
|
|
14
|
+
/**
|
|
15
|
+
* Responsive media for large and up.
|
|
16
|
+
* Use: @include large-up() { ... }
|
|
17
|
+
*/
|
|
18
|
+
/**
|
|
19
|
+
* Responsive media for xlarge only.
|
|
20
|
+
* Use: @include xlarge-only() { ... }
|
|
21
|
+
*/
|
|
1
22
|
:host {
|
|
2
23
|
display: block;
|
|
3
24
|
font-size: var(--font-size);
|
|
@@ -10,6 +31,8 @@
|
|
|
10
31
|
color: var(--color-body);
|
|
11
32
|
line-height: 120%;
|
|
12
33
|
letter-spacing: -4%;
|
|
34
|
+
margin-block-start: var(--block-margin);
|
|
35
|
+
margin-block-end: var(--block-margin);
|
|
13
36
|
}
|
|
14
37
|
:host h1.large, :host h2.large, :host h3.large, :host h4.large, :host h5.large, :host h6.large {
|
|
15
38
|
font-size: 6.21em;
|
|
@@ -18,7 +41,7 @@
|
|
|
18
41
|
font-size: 3em;
|
|
19
42
|
font-weight: var(--font-weight-bold);
|
|
20
43
|
}
|
|
21
|
-
@media
|
|
44
|
+
@media (min-width: 768px) and (max-width: 1365px) {
|
|
22
45
|
:host h1, :host h2, :host h3, :host h4, :host h5, :host h6 {
|
|
23
46
|
font-size: 4.92em;
|
|
24
47
|
}
|
|
@@ -29,7 +52,7 @@
|
|
|
29
52
|
font-size: 3.428em;
|
|
30
53
|
}
|
|
31
54
|
}
|
|
32
|
-
@media
|
|
55
|
+
@media (min-width: 1366px) {
|
|
33
56
|
:host h1, :host h2, :host h3, :host h4, :host h5, :host h6 {
|
|
34
57
|
font-size: 6.14em;
|
|
35
58
|
line-height: 125%;
|
|
@@ -7,10 +7,20 @@ export class CuraDisplay {
|
|
|
7
7
|
*/
|
|
8
8
|
this.level = 1;
|
|
9
9
|
/**
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
* Heading style size.
|
|
11
|
+
* Values: small | regular(default) | large.
|
|
12
|
+
*/
|
|
13
13
|
this.size = 'regular';
|
|
14
|
+
/**
|
|
15
|
+
* Apply light color to text in dark background.
|
|
16
|
+
* Values: boolean.
|
|
17
|
+
*/
|
|
18
|
+
this.inverted = false;
|
|
19
|
+
/**
|
|
20
|
+
* Apply base system color to elements like <a> and <abbr>.
|
|
21
|
+
* Values: String primary(default) | secondary | accent | neutral | success | error | warning | info.
|
|
22
|
+
*/
|
|
23
|
+
this.spotColor = 'primary';
|
|
14
24
|
}
|
|
15
25
|
connectedCallback() {
|
|
16
26
|
this.weights = window.CuraAPI.theme.fonts.getWeights();
|
|
@@ -30,11 +40,16 @@ export class CuraDisplay {
|
|
|
30
40
|
'--font-weight-black': this.weights.black
|
|
31
41
|
};
|
|
32
42
|
this.setHostProperty('--font-size', window.CuraAPI.theme.fonts.getSize());
|
|
43
|
+
this.setHostProperty('--block-margin', '0.5em');
|
|
33
44
|
}
|
|
34
45
|
setColors() {
|
|
35
|
-
const fontColor =
|
|
46
|
+
const fontColor = this.inverted
|
|
47
|
+
? window.CuraAPI.theme.colors.getColor('neutral-100')
|
|
48
|
+
: window.CuraAPI.theme.fonts.getColor();
|
|
36
49
|
this.styles['--color-body'] = fontColor || window.CuraAPI.theme.colors.getColor('neutral-darker');
|
|
37
|
-
this.styles['--color-link'] =
|
|
50
|
+
this.styles['--color-link'] = this.inverted
|
|
51
|
+
? window.CuraAPI.theme.colors.getColor(`${this.spotColor}-100`)
|
|
52
|
+
: window.CuraAPI.theme.colors.getColor(`${this.spotColor}-700`);
|
|
38
53
|
}
|
|
39
54
|
setHostProperty(prop, value) {
|
|
40
55
|
this.host.style.setProperty(prop, value);
|
|
@@ -103,6 +118,42 @@ export class CuraDisplay {
|
|
|
103
118
|
"attribute": "size",
|
|
104
119
|
"reflect": true,
|
|
105
120
|
"defaultValue": "'regular'"
|
|
121
|
+
},
|
|
122
|
+
"inverted": {
|
|
123
|
+
"type": "boolean",
|
|
124
|
+
"mutable": false,
|
|
125
|
+
"complexType": {
|
|
126
|
+
"original": "boolean",
|
|
127
|
+
"resolved": "boolean",
|
|
128
|
+
"references": {}
|
|
129
|
+
},
|
|
130
|
+
"required": false,
|
|
131
|
+
"optional": false,
|
|
132
|
+
"docs": {
|
|
133
|
+
"tags": [],
|
|
134
|
+
"text": "Apply light color to text in dark background.\nValues: boolean."
|
|
135
|
+
},
|
|
136
|
+
"attribute": "inverted",
|
|
137
|
+
"reflect": true,
|
|
138
|
+
"defaultValue": "false"
|
|
139
|
+
},
|
|
140
|
+
"spotColor": {
|
|
141
|
+
"type": "string",
|
|
142
|
+
"mutable": false,
|
|
143
|
+
"complexType": {
|
|
144
|
+
"original": "string",
|
|
145
|
+
"resolved": "string",
|
|
146
|
+
"references": {}
|
|
147
|
+
},
|
|
148
|
+
"required": false,
|
|
149
|
+
"optional": false,
|
|
150
|
+
"docs": {
|
|
151
|
+
"tags": [],
|
|
152
|
+
"text": "Apply base system color to elements like <a> and <abbr>.\nValues: String primary(default) | secondary | accent | neutral | success | error | warning | info."
|
|
153
|
+
},
|
|
154
|
+
"attribute": "spot-color",
|
|
155
|
+
"reflect": true,
|
|
156
|
+
"defaultValue": "'primary'"
|
|
106
157
|
}
|
|
107
158
|
};
|
|
108
159
|
}
|
|
@@ -1,3 +1,24 @@
|
|
|
1
|
+
/* Breakpoints variables */
|
|
2
|
+
/**
|
|
3
|
+
* Responsive media for mobile (small) only.
|
|
4
|
+
* Use: @include mobile-only() { ... }
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Responsive media for medium only.
|
|
8
|
+
* Use: @include medium-only() { ... }
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* Responsive media for large only.
|
|
12
|
+
* Use: @include large-only() { ... }
|
|
13
|
+
*/
|
|
14
|
+
/**
|
|
15
|
+
* Responsive media for large and up.
|
|
16
|
+
* Use: @include large-up() { ... }
|
|
17
|
+
*/
|
|
18
|
+
/**
|
|
19
|
+
* Responsive media for xlarge only.
|
|
20
|
+
* Use: @include xlarge-only() { ... }
|
|
21
|
+
*/
|
|
1
22
|
:host {
|
|
2
23
|
display: block;
|
|
3
24
|
font-size: var(--font-size);
|
|
@@ -9,6 +30,8 @@
|
|
|
9
30
|
color: var(--color-body);
|
|
10
31
|
line-height: 130%;
|
|
11
32
|
letter-spacing: 0%;
|
|
33
|
+
margin-block-start: var(--block-margin);
|
|
34
|
+
margin-block-end: var(--block-margin);
|
|
12
35
|
}
|
|
13
36
|
:host h1.bold-weight, :host h2.bold-weight, :host h3.bold-weight, :host h4.bold-weight, :host h5.bold-weight, :host h6.bold-weight {
|
|
14
37
|
font-weight: var(--font-weight-medium);
|
|
@@ -25,7 +48,7 @@
|
|
|
25
48
|
:host h1.small.bold-weight, :host h2.small.bold-weight, :host h3.small.bold-weight, :host h4.small.bold-weight, :host h5.small.bold-weight, :host h6.small.bold-weight {
|
|
26
49
|
font-weight: var(--font-weight-bold);
|
|
27
50
|
}
|
|
28
|
-
@media
|
|
51
|
+
@media (min-width: 768px) and (max-width: 1365px) {
|
|
29
52
|
:host h1, :host h2, :host h3, :host h4, :host h5, :host h6 {
|
|
30
53
|
font-size: 2em;
|
|
31
54
|
}
|
|
@@ -36,7 +59,7 @@
|
|
|
36
59
|
font-size: 1.357em;
|
|
37
60
|
}
|
|
38
61
|
}
|
|
39
|
-
@media
|
|
62
|
+
@media (min-width: 1366px) {
|
|
40
63
|
:host h1, :host h2, :host h3, :host h4, :host h5, :host h6 {
|
|
41
64
|
font-size: 2.5em;
|
|
42
65
|
line-height: 135%;
|
|
@@ -16,6 +16,16 @@ export class CuraHeading {
|
|
|
16
16
|
* Values: regular(default) | bold.
|
|
17
17
|
*/
|
|
18
18
|
this.weight = 'regular';
|
|
19
|
+
/**
|
|
20
|
+
* Apply light color to text in dark background.
|
|
21
|
+
* Values: boolean.
|
|
22
|
+
*/
|
|
23
|
+
this.inverted = false;
|
|
24
|
+
/**
|
|
25
|
+
* Apply base system color to elements like <a> and <abbr>.
|
|
26
|
+
* Values: String primary(default) | secondary | accent | neutral | success | error | warning | info.
|
|
27
|
+
*/
|
|
28
|
+
this.spotColor = 'primary';
|
|
19
29
|
}
|
|
20
30
|
connectedCallback() {
|
|
21
31
|
this.weights = window.CuraAPI.theme.fonts.getWeights();
|
|
@@ -38,11 +48,16 @@ export class CuraHeading {
|
|
|
38
48
|
'--font-weight-black': this.weights.black
|
|
39
49
|
};
|
|
40
50
|
this.setHostProperty('--font-size', window.CuraAPI.theme.fonts.getSize());
|
|
51
|
+
this.setHostProperty('--block-margin', '0.5em');
|
|
41
52
|
}
|
|
42
53
|
setColors() {
|
|
43
|
-
const fontColor =
|
|
54
|
+
const fontColor = this.inverted
|
|
55
|
+
? window.CuraAPI.theme.colors.getColor('neutral-100')
|
|
56
|
+
: window.CuraAPI.theme.fonts.getColor();
|
|
44
57
|
this.styles['--color-body'] = fontColor || window.CuraAPI.theme.colors.getColor('neutral-darker');
|
|
45
|
-
this.styles['--color-link'] =
|
|
58
|
+
this.styles['--color-link'] = this.inverted
|
|
59
|
+
? window.CuraAPI.theme.colors.getColor(`${this.spotColor}-100`)
|
|
60
|
+
: window.CuraAPI.theme.colors.getColor(`${this.spotColor}-700`);
|
|
46
61
|
}
|
|
47
62
|
setHostProperty(prop, value) {
|
|
48
63
|
this.host.style.setProperty(prop, value);
|
|
@@ -129,6 +144,42 @@ export class CuraHeading {
|
|
|
129
144
|
"attribute": "weight",
|
|
130
145
|
"reflect": true,
|
|
131
146
|
"defaultValue": "'regular'"
|
|
147
|
+
},
|
|
148
|
+
"inverted": {
|
|
149
|
+
"type": "boolean",
|
|
150
|
+
"mutable": false,
|
|
151
|
+
"complexType": {
|
|
152
|
+
"original": "boolean",
|
|
153
|
+
"resolved": "boolean",
|
|
154
|
+
"references": {}
|
|
155
|
+
},
|
|
156
|
+
"required": false,
|
|
157
|
+
"optional": false,
|
|
158
|
+
"docs": {
|
|
159
|
+
"tags": [],
|
|
160
|
+
"text": "Apply light color to text in dark background.\nValues: boolean."
|
|
161
|
+
},
|
|
162
|
+
"attribute": "inverted",
|
|
163
|
+
"reflect": true,
|
|
164
|
+
"defaultValue": "false"
|
|
165
|
+
},
|
|
166
|
+
"spotColor": {
|
|
167
|
+
"type": "string",
|
|
168
|
+
"mutable": false,
|
|
169
|
+
"complexType": {
|
|
170
|
+
"original": "string",
|
|
171
|
+
"resolved": "string",
|
|
172
|
+
"references": {}
|
|
173
|
+
},
|
|
174
|
+
"required": false,
|
|
175
|
+
"optional": false,
|
|
176
|
+
"docs": {
|
|
177
|
+
"tags": [],
|
|
178
|
+
"text": "Apply base system color to elements like <a> and <abbr>.\nValues: String primary(default) | secondary | accent | neutral | success | error | warning | info."
|
|
179
|
+
},
|
|
180
|
+
"attribute": "spot-color",
|
|
181
|
+
"reflect": true,
|
|
182
|
+
"defaultValue": "'primary'"
|
|
132
183
|
}
|
|
133
184
|
};
|
|
134
185
|
}
|
|
@@ -1,3 +1,24 @@
|
|
|
1
|
+
/* Breakpoints variables */
|
|
2
|
+
/**
|
|
3
|
+
* Responsive media for mobile (small) only.
|
|
4
|
+
* Use: @include mobile-only() { ... }
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Responsive media for medium only.
|
|
8
|
+
* Use: @include medium-only() { ... }
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* Responsive media for large only.
|
|
12
|
+
* Use: @include large-only() { ... }
|
|
13
|
+
*/
|
|
14
|
+
/**
|
|
15
|
+
* Responsive media for large and up.
|
|
16
|
+
* Use: @include large-up() { ... }
|
|
17
|
+
*/
|
|
18
|
+
/**
|
|
19
|
+
* Responsive media for xlarge only.
|
|
20
|
+
* Use: @include xlarge-only() { ... }
|
|
21
|
+
*/
|
|
1
22
|
:host {
|
|
2
23
|
display: block;
|
|
3
24
|
font-size: var(--font-size);
|
|
@@ -9,6 +30,8 @@
|
|
|
9
30
|
color: var(--color-body);
|
|
10
31
|
line-height: 140%;
|
|
11
32
|
letter-spacing: 2%;
|
|
33
|
+
margin-block-start: var(--block-margin);
|
|
34
|
+
margin-block-end: var(--block-margin);
|
|
12
35
|
}
|
|
13
36
|
:host p.large {
|
|
14
37
|
font-size: 1.21em;
|
|
@@ -25,7 +48,7 @@
|
|
|
25
48
|
line-height: 135%;
|
|
26
49
|
letter-spacing: 6%;
|
|
27
50
|
}
|
|
28
|
-
@media
|
|
51
|
+
@media (min-width: 768px) and (max-width: 1365px) {
|
|
29
52
|
:host p {
|
|
30
53
|
font-size: 1.14em;
|
|
31
54
|
line-height: 145%;
|
|
@@ -44,7 +67,7 @@
|
|
|
44
67
|
letter-spacing: 6%;
|
|
45
68
|
}
|
|
46
69
|
}
|
|
47
|
-
@media
|
|
70
|
+
@media (min-width: 1366px) {
|
|
48
71
|
:host p {
|
|
49
72
|
font-size: 1.42em;
|
|
50
73
|
line-height: 150%;
|
|
@@ -6,6 +6,16 @@ export class CuraParagraph {
|
|
|
6
6
|
* Values: regular (default) | large | small | caption.
|
|
7
7
|
*/
|
|
8
8
|
this.size = 'regular';
|
|
9
|
+
/**
|
|
10
|
+
* Apply light color to text in dark background.
|
|
11
|
+
* Values: boolean.
|
|
12
|
+
*/
|
|
13
|
+
this.inverted = false;
|
|
14
|
+
/**
|
|
15
|
+
* Apply base system color to elements like <a> and <abbr>.
|
|
16
|
+
* Values: String primary(default) | secondary | accent | neutral | success | error | warning | info.
|
|
17
|
+
*/
|
|
18
|
+
this.spotColor = 'primary';
|
|
9
19
|
}
|
|
10
20
|
connectedCallback() {
|
|
11
21
|
this.weights = window.CuraAPI.theme.fonts.getWeights();
|
|
@@ -26,11 +36,16 @@ export class CuraParagraph {
|
|
|
26
36
|
'--font-weight-bold': this.weights.bold
|
|
27
37
|
};
|
|
28
38
|
this.setHostProperty('--font-size', window.CuraAPI.theme.fonts.getSize());
|
|
39
|
+
this.setHostProperty('--block-margin', '1.25em');
|
|
29
40
|
}
|
|
30
41
|
setColors() {
|
|
31
|
-
const fontColor =
|
|
32
|
-
|
|
33
|
-
|
|
42
|
+
const fontColor = this.inverted
|
|
43
|
+
? window.CuraAPI.theme.colors.getColor('neutral-100')
|
|
44
|
+
: window.CuraAPI.theme.fonts.getColor();
|
|
45
|
+
this.styles['--color-body'] = fontColor || window.CuraAPI.theme.colors.getColor('neutral-darker');
|
|
46
|
+
this.styles['--color-link'] = this.inverted
|
|
47
|
+
? window.CuraAPI.theme.colors.getColor(`${this.spotColor}-100`)
|
|
48
|
+
: window.CuraAPI.theme.colors.getColor(`${this.spotColor}-700`);
|
|
34
49
|
}
|
|
35
50
|
setHostProperty(prop, value) {
|
|
36
51
|
this.host.style.setProperty(prop, value);
|
|
@@ -69,6 +84,42 @@ export class CuraParagraph {
|
|
|
69
84
|
"attribute": "size",
|
|
70
85
|
"reflect": true,
|
|
71
86
|
"defaultValue": "'regular'"
|
|
87
|
+
},
|
|
88
|
+
"inverted": {
|
|
89
|
+
"type": "boolean",
|
|
90
|
+
"mutable": false,
|
|
91
|
+
"complexType": {
|
|
92
|
+
"original": "boolean",
|
|
93
|
+
"resolved": "boolean",
|
|
94
|
+
"references": {}
|
|
95
|
+
},
|
|
96
|
+
"required": false,
|
|
97
|
+
"optional": false,
|
|
98
|
+
"docs": {
|
|
99
|
+
"tags": [],
|
|
100
|
+
"text": "Apply light color to text in dark background.\nValues: boolean."
|
|
101
|
+
},
|
|
102
|
+
"attribute": "inverted",
|
|
103
|
+
"reflect": true,
|
|
104
|
+
"defaultValue": "false"
|
|
105
|
+
},
|
|
106
|
+
"spotColor": {
|
|
107
|
+
"type": "string",
|
|
108
|
+
"mutable": false,
|
|
109
|
+
"complexType": {
|
|
110
|
+
"original": "string",
|
|
111
|
+
"resolved": "string",
|
|
112
|
+
"references": {}
|
|
113
|
+
},
|
|
114
|
+
"required": false,
|
|
115
|
+
"optional": false,
|
|
116
|
+
"docs": {
|
|
117
|
+
"tags": [],
|
|
118
|
+
"text": "Apply base system color to elements like <a> and <abbr>.\nValues: String primary(default) | secondary | accent | neutral | success | error | warning | info."
|
|
119
|
+
},
|
|
120
|
+
"attribute": "spot-color",
|
|
121
|
+
"reflect": true,
|
|
122
|
+
"defaultValue": "'primary'"
|
|
72
123
|
}
|
|
73
124
|
};
|
|
74
125
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
2
|
|
|
3
|
-
const curaDisplayCss = ":host{display:block;font-size:var(--font-size);text-transform:uppercase}:host h1,:host h2,:host h3,:host h4,:host h5,:host h6{font-family:var(--font-family);font-size:4.285em;font-weight:var(--font-weight-black);color:var(--color-body);line-height:120%;letter-spacing:-4
|
|
3
|
+
const curaDisplayCss = ":host{display:block;font-size:var(--font-size);text-transform:uppercase}:host h1,:host h2,:host h3,:host h4,:host h5,:host h6{font-family:var(--font-family);font-size:4.285em;font-weight:var(--font-weight-black);color:var(--color-body);line-height:120%;letter-spacing:-4%;-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 h1.large,:host h2.large,:host h3.large,:host h4.large,:host h5.large,:host h6.large{font-size:6.21em}:host h1.small,:host h2.small,:host h3.small,:host h4.small,:host h5.small,:host h6.small{font-size:3em;font-weight:var(--font-weight-bold)}@media (min-width: 768px) and (max-width: 1365px){:host h1,:host h2,:host h3,:host h4,:host h5,:host h6{font-size:4.92em}:host h1.large,:host h2.large,:host h3.large,:host h4.large,:host h5.large,:host h6.large{font-size:7.07em}:host h1.small,:host h2.small,:host h3.small,:host h4.small,:host h5.small,:host h6.small{font-size:3.428em}}@media (min-width: 1366px){:host h1,:host h2,:host h3,:host h4,:host h5,:host h6{font-size:6.14em;line-height:125%}:host h1.large,:host h2.large,:host h3.large,:host h4.large,:host h5.large,:host h6.large{font-size:8.857em;letter-spacing:-6%}:host h1.small,:host h2.small,:host h3.small,:host h4.small,:host h5.small,:host h6.small{font-size:4.285em;letter-spacing:-2%}}:host ::slotted(b),:host ::slotted(strong){font-weight:var(--font-weight-bold)}:host ::slotted(a){font-weight:var(--font-weight-bold);color:var(--color-link);text-decoration:none;text-underline-offset:10%;cursor:pointer}:host ::slotted(abbr){color:var(--color-link);-webkit-text-decoration:underline dashed 1px var(--color-link);text-decoration:underline dashed 1px var(--color-link);text-underline-offset:10%;cursor:default}";
|
|
4
4
|
|
|
5
5
|
const CuraDisplay$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
6
6
|
constructor() {
|
|
@@ -13,10 +13,20 @@ const CuraDisplay$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
13
13
|
*/
|
|
14
14
|
this.level = 1;
|
|
15
15
|
/**
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
* Heading style size.
|
|
17
|
+
* Values: small | regular(default) | large.
|
|
18
|
+
*/
|
|
19
19
|
this.size = 'regular';
|
|
20
|
+
/**
|
|
21
|
+
* Apply light color to text in dark background.
|
|
22
|
+
* Values: boolean.
|
|
23
|
+
*/
|
|
24
|
+
this.inverted = false;
|
|
25
|
+
/**
|
|
26
|
+
* Apply base system color to elements like <a> and <abbr>.
|
|
27
|
+
* Values: String primary(default) | secondary | accent | neutral | success | error | warning | info.
|
|
28
|
+
*/
|
|
29
|
+
this.spotColor = 'primary';
|
|
20
30
|
}
|
|
21
31
|
connectedCallback() {
|
|
22
32
|
this.weights = window.CuraAPI.theme.fonts.getWeights();
|
|
@@ -36,11 +46,16 @@ const CuraDisplay$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
36
46
|
'--font-weight-black': this.weights.black
|
|
37
47
|
};
|
|
38
48
|
this.setHostProperty('--font-size', window.CuraAPI.theme.fonts.getSize());
|
|
49
|
+
this.setHostProperty('--block-margin', '0.5em');
|
|
39
50
|
}
|
|
40
51
|
setColors() {
|
|
41
|
-
const fontColor =
|
|
52
|
+
const fontColor = this.inverted
|
|
53
|
+
? window.CuraAPI.theme.colors.getColor('neutral-100')
|
|
54
|
+
: window.CuraAPI.theme.fonts.getColor();
|
|
42
55
|
this.styles['--color-body'] = fontColor || window.CuraAPI.theme.colors.getColor('neutral-darker');
|
|
43
|
-
this.styles['--color-link'] =
|
|
56
|
+
this.styles['--color-link'] = this.inverted
|
|
57
|
+
? window.CuraAPI.theme.colors.getColor(`${this.spotColor}-100`)
|
|
58
|
+
: window.CuraAPI.theme.colors.getColor(`${this.spotColor}-700`);
|
|
44
59
|
}
|
|
45
60
|
setHostProperty(prop, value) {
|
|
46
61
|
this.host.style.setProperty(prop, value);
|
|
@@ -64,7 +79,9 @@ const CuraDisplay$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
64
79
|
static get style() { return curaDisplayCss; }
|
|
65
80
|
}, [1, "cura-display", {
|
|
66
81
|
"level": [514],
|
|
67
|
-
"size": [513]
|
|
82
|
+
"size": [513],
|
|
83
|
+
"inverted": [516],
|
|
84
|
+
"spotColor": [513, "spot-color"]
|
|
68
85
|
}]);
|
|
69
86
|
function defineCustomElement$1() {
|
|
70
87
|
if (typeof customElements === "undefined") {
|