@usecapsule/core-components 3.5.1-dev.1 → 3.5.1-dev.3
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/capsule/capsule.esm.js +1 -1
- package/dist/capsule/{p-4da7328c.entry.js → p-57301812.entry.js} +3 -3
- package/dist/capsule/p-57301812.entry.js.map +1 -0
- package/dist/cjs/cpsl-alert_34.cjs.entry.js +30 -28
- package/dist/cjs/cpsl-alert_34.cjs.entry.js.map +1 -1
- package/dist/collection/components/cpsl-text/cpsl-text.css +178 -61
- package/dist/collection/components/cpsl-text/cpsl-text.js +29 -27
- package/dist/collection/components/cpsl-text/cpsl-text.js.map +1 -1
- package/dist/esm/cpsl-alert_34.entry.js +30 -28
- package/dist/esm/cpsl-alert_34.entry.js.map +1 -1
- package/dist/types/components/cpsl-text/cpsl-text.d.ts +1 -1
- package/package.json +1 -1
- package/dist/capsule/p-4da7328c.entry.js.map +0 -1
@@ -54,20 +54,8 @@
|
|
54
54
|
* }
|
55
55
|
*/
|
56
56
|
:host {
|
57
|
-
font-family: var(--cpsl-font-family, inherit);
|
58
|
-
color: var(--cpsl-color-text-primary);
|
59
|
-
padding: 0px;
|
60
|
-
margin: 0px;
|
61
57
|
display: block;
|
62
|
-
|
63
|
-
:host::-moz-selection {
|
64
|
-
/* Code for Firefox */
|
65
|
-
color: var(--cpsl-color-text-inverted) !important;
|
66
|
-
background: var(--cpsl-color-background-64) !important;
|
67
|
-
}
|
68
|
-
:host::selection {
|
69
|
-
color: var(--cpsl-color-text-inverted) !important;
|
70
|
-
background: var(--cpsl-color-background-64) !important;
|
58
|
+
color: var(--cpsl-color-text-primary) !important;
|
71
59
|
}
|
72
60
|
|
73
61
|
:host p,
|
@@ -77,107 +65,236 @@ h3,
|
|
77
65
|
h4,
|
78
66
|
h5,
|
79
67
|
h6 {
|
68
|
+
font-family: var(--cpsl-font-family, inherit);
|
80
69
|
padding: 0px;
|
81
70
|
margin: 0px;
|
82
|
-
font-weight: inherit;
|
83
|
-
font-size: inherit;
|
84
|
-
letter-spacing: inherit;
|
85
71
|
-webkit-font-smoothing: antialiased;
|
86
72
|
-moz-osx-font-smoothing: grayscale;
|
87
73
|
font-smooth: never;
|
88
74
|
}
|
89
|
-
|
90
|
-
|
91
|
-
|
75
|
+
:host p::-moz-selection,
|
76
|
+
h1::-moz-selection,
|
77
|
+
h2::-moz-selection,
|
78
|
+
h3::-moz-selection,
|
79
|
+
h4::-moz-selection,
|
80
|
+
h5::-moz-selection,
|
81
|
+
h6::-moz-selection {
|
82
|
+
/* Code for Firefox */
|
83
|
+
color: var(--cpsl-color-text-inverted) !important;
|
84
|
+
background: var(--cpsl-color-background-64) !important;
|
92
85
|
}
|
93
|
-
|
94
|
-
|
86
|
+
:host p::selection,
|
87
|
+
h1::selection,
|
88
|
+
h2::selection,
|
89
|
+
h3::selection,
|
90
|
+
h4::selection,
|
91
|
+
h5::selection,
|
92
|
+
h6::selection {
|
93
|
+
color: var(--cpsl-color-text-inverted) !important;
|
94
|
+
background: var(--cpsl-color-background-64) !important;
|
95
|
+
}
|
96
|
+
:host p.primary,
|
97
|
+
h1.primary,
|
98
|
+
h2.primary,
|
99
|
+
h3.primary,
|
100
|
+
h4.primary,
|
101
|
+
h5.primary,
|
102
|
+
h6.primary {
|
103
|
+
color: inherit;
|
104
|
+
}
|
105
|
+
:host p.secondary,
|
106
|
+
h1.secondary,
|
107
|
+
h2.secondary,
|
108
|
+
h3.secondary,
|
109
|
+
h4.secondary,
|
110
|
+
h5.secondary,
|
111
|
+
h6.secondary {
|
95
112
|
color: var(--cpsl-color-text-secondary);
|
96
113
|
}
|
97
|
-
|
98
|
-
|
114
|
+
:host p.tertiary,
|
115
|
+
h1.tertiary,
|
116
|
+
h2.tertiary,
|
117
|
+
h3.tertiary,
|
118
|
+
h4.tertiary,
|
119
|
+
h5.tertiary,
|
120
|
+
h6.tertiary {
|
99
121
|
color: var(--cpsl-color-text-tertiary);
|
100
122
|
}
|
101
|
-
|
102
|
-
|
123
|
+
:host p.subtle,
|
124
|
+
h1.subtle,
|
125
|
+
h2.subtle,
|
126
|
+
h3.subtle,
|
127
|
+
h4.subtle,
|
128
|
+
h5.subtle,
|
129
|
+
h6.subtle {
|
103
130
|
color: var(--cpsl-color-text-subtle);
|
104
131
|
}
|
105
|
-
|
106
|
-
|
132
|
+
:host p.inverted,
|
133
|
+
h1.inverted,
|
134
|
+
h2.inverted,
|
135
|
+
h3.inverted,
|
136
|
+
h4.inverted,
|
137
|
+
h5.inverted,
|
138
|
+
h6.inverted {
|
107
139
|
color: var(--cpsl-color-text-inverted);
|
108
140
|
}
|
109
|
-
|
110
|
-
|
141
|
+
:host p.error,
|
142
|
+
h1.error,
|
143
|
+
h2.error,
|
144
|
+
h3.error,
|
145
|
+
h4.error,
|
146
|
+
h5.error,
|
147
|
+
h6.error {
|
111
148
|
color: var(--cpsl-color-text-error);
|
112
149
|
}
|
113
|
-
|
114
|
-
|
150
|
+
:host p.contrast,
|
151
|
+
h1.contrast,
|
152
|
+
h2.contrast,
|
153
|
+
h3.contrast,
|
154
|
+
h4.contrast,
|
155
|
+
h5.contrast,
|
156
|
+
h6.contrast {
|
115
157
|
color: var(--cpsl-color-text-contrast);
|
116
158
|
}
|
117
|
-
|
118
|
-
|
159
|
+
:host p.medium,
|
160
|
+
h1.medium,
|
161
|
+
h2.medium,
|
162
|
+
h3.medium,
|
163
|
+
h4.medium,
|
164
|
+
h5.medium,
|
165
|
+
h6.medium {
|
119
166
|
font-weight: 500;
|
120
167
|
}
|
121
|
-
|
122
|
-
|
168
|
+
:host p.semi-bold,
|
169
|
+
h1.semi-bold,
|
170
|
+
h2.semi-bold,
|
171
|
+
h3.semi-bold,
|
172
|
+
h4.semi-bold,
|
173
|
+
h5.semi-bold,
|
174
|
+
h6.semi-bold {
|
123
175
|
font-weight: 600;
|
124
176
|
}
|
125
|
-
|
126
|
-
|
177
|
+
:host p.bold,
|
178
|
+
h1.bold,
|
179
|
+
h2.bold,
|
180
|
+
h3.bold,
|
181
|
+
h4.bold,
|
182
|
+
h5.bold,
|
183
|
+
h6.bold {
|
127
184
|
font-weight: 700;
|
128
185
|
}
|
129
|
-
|
130
|
-
|
186
|
+
:host p.body-2xs,
|
187
|
+
h1.body-2xs,
|
188
|
+
h2.body-2xs,
|
189
|
+
h3.body-2xs,
|
190
|
+
h4.body-2xs,
|
191
|
+
h5.body-2xs,
|
192
|
+
h6.body-2xs {
|
131
193
|
font-size: var(--cpsl-font-size-body-2xs);
|
132
194
|
}
|
133
|
-
|
134
|
-
|
195
|
+
:host p.body-xs,
|
196
|
+
h1.body-xs,
|
197
|
+
h2.body-xs,
|
198
|
+
h3.body-xs,
|
199
|
+
h4.body-xs,
|
200
|
+
h5.body-xs,
|
201
|
+
h6.body-xs {
|
135
202
|
font-size: var(--cpsl-font-size-body-xs);
|
136
203
|
}
|
137
|
-
|
138
|
-
|
204
|
+
:host p.body-s,
|
205
|
+
h1.body-s,
|
206
|
+
h2.body-s,
|
207
|
+
h3.body-s,
|
208
|
+
h4.body-s,
|
209
|
+
h5.body-s,
|
210
|
+
h6.body-s {
|
139
211
|
font-size: var(--cpsl-font-size-body-s);
|
140
212
|
line-height: 142.857%;
|
141
213
|
}
|
142
|
-
|
143
|
-
|
214
|
+
:host p.body-m,
|
215
|
+
h1.body-m,
|
216
|
+
h2.body-m,
|
217
|
+
h3.body-m,
|
218
|
+
h4.body-m,
|
219
|
+
h5.body-m,
|
220
|
+
h6.body-m {
|
144
221
|
font-size: var(--cpsl-font-size-body-m);
|
145
222
|
line-height: 150%;
|
146
223
|
}
|
147
|
-
|
148
|
-
|
224
|
+
:host p.body-l,
|
225
|
+
h1.body-l,
|
226
|
+
h2.body-l,
|
227
|
+
h3.body-l,
|
228
|
+
h4.body-l,
|
229
|
+
h5.body-l,
|
230
|
+
h6.body-l {
|
149
231
|
font-size: var(--cpsl-font-size-body-l);
|
150
232
|
line-height: 140%;
|
151
233
|
}
|
152
|
-
|
153
|
-
|
234
|
+
:host p.body-xl,
|
235
|
+
h1.body-xl,
|
236
|
+
h2.body-xl,
|
237
|
+
h3.body-xl,
|
238
|
+
h4.body-xl,
|
239
|
+
h5.body-xl,
|
240
|
+
h6.body-xl {
|
154
241
|
font-size: var(--cpsl-font-size-body-xl);
|
155
242
|
}
|
156
|
-
|
157
|
-
|
243
|
+
:host p.heading-xs,
|
244
|
+
h1.heading-xs,
|
245
|
+
h2.heading-xs,
|
246
|
+
h3.heading-xs,
|
247
|
+
h4.heading-xs,
|
248
|
+
h5.heading-xs,
|
249
|
+
h6.heading-xs {
|
158
250
|
font-size: var(--cpsl-font-size-heading-xs);
|
159
251
|
}
|
160
|
-
|
161
|
-
|
252
|
+
:host p.heading-s,
|
253
|
+
h1.heading-s,
|
254
|
+
h2.heading-s,
|
255
|
+
h3.heading-s,
|
256
|
+
h4.heading-s,
|
257
|
+
h5.heading-s,
|
258
|
+
h6.heading-s {
|
162
259
|
font-size: var(--cpsl-font-size-heading-s);
|
163
260
|
}
|
164
|
-
|
165
|
-
|
261
|
+
:host p.heading-m,
|
262
|
+
h1.heading-m,
|
263
|
+
h2.heading-m,
|
264
|
+
h3.heading-m,
|
265
|
+
h4.heading-m,
|
266
|
+
h5.heading-m,
|
267
|
+
h6.heading-m {
|
166
268
|
font-size: var(--cpsl-font-size-heading-m);
|
167
269
|
letter-spacing: -0.4px;
|
168
270
|
}
|
169
|
-
|
170
|
-
|
271
|
+
:host p.heading-l,
|
272
|
+
h1.heading-l,
|
273
|
+
h2.heading-l,
|
274
|
+
h3.heading-l,
|
275
|
+
h4.heading-l,
|
276
|
+
h5.heading-l,
|
277
|
+
h6.heading-l {
|
171
278
|
font-size: var(--cpsl-font-size-heading-l);
|
172
279
|
letter-spacing: -1.12px;
|
173
280
|
}
|
174
|
-
|
175
|
-
|
281
|
+
:host p.heading-xl,
|
282
|
+
h1.heading-xl,
|
283
|
+
h2.heading-xl,
|
284
|
+
h3.heading-xl,
|
285
|
+
h4.heading-xl,
|
286
|
+
h5.heading-xl,
|
287
|
+
h6.heading-xl {
|
176
288
|
font-size: var(--cpsl-font-size-heading-xl);
|
177
289
|
letter-spacing: -1.28px;
|
178
290
|
}
|
179
|
-
|
180
|
-
|
291
|
+
:host p.heading-2xl,
|
292
|
+
h1.heading-2xl,
|
293
|
+
h2.heading-2xl,
|
294
|
+
h3.heading-2xl,
|
295
|
+
h4.heading-2xl,
|
296
|
+
h5.heading-2xl,
|
297
|
+
h6.heading-2xl {
|
181
298
|
font-size: var(--cpsl-font-size-heading-2xl);
|
182
299
|
letter-spacing: -1.44px;
|
183
300
|
}
|
@@ -2,37 +2,38 @@ import { Host, h } from "@stencil/core";
|
|
2
2
|
const TEXT_EL_PART = 'text-element';
|
3
3
|
export class CpslText {
|
4
4
|
constructor() {
|
5
|
+
this.getContent = ({ classes, }) => {
|
6
|
+
switch (this.variant) {
|
7
|
+
case 'headingXS': {
|
8
|
+
return (h("h6", { class: classes, part: TEXT_EL_PART }, h("slot", null)));
|
9
|
+
}
|
10
|
+
case 'headingS': {
|
11
|
+
return (h("h5", { class: classes, part: TEXT_EL_PART }, h("slot", null)));
|
12
|
+
}
|
13
|
+
case 'headingM': {
|
14
|
+
return (h("h4", { class: classes, part: TEXT_EL_PART }, h("slot", null)));
|
15
|
+
}
|
16
|
+
case 'headingL': {
|
17
|
+
return (h("h3", { class: classes, part: TEXT_EL_PART }, h("slot", null)));
|
18
|
+
}
|
19
|
+
case 'headingXL': {
|
20
|
+
return (h("h2", { class: classes, part: TEXT_EL_PART }, h("slot", null)));
|
21
|
+
}
|
22
|
+
case 'heading2XL': {
|
23
|
+
return (h("h1", { class: classes, part: TEXT_EL_PART }, h("slot", null)));
|
24
|
+
}
|
25
|
+
default: {
|
26
|
+
return (h("p", { class: classes, part: TEXT_EL_PART }, h("slot", null)));
|
27
|
+
}
|
28
|
+
}
|
29
|
+
};
|
5
30
|
this.color = 'primary';
|
6
31
|
this.variant = 'bodyM';
|
7
32
|
this.weight = 'regular';
|
8
33
|
}
|
9
|
-
get Content() {
|
10
|
-
switch (this.variant) {
|
11
|
-
case 'headingXS': {
|
12
|
-
return (h("h6", { part: TEXT_EL_PART }, h("slot", null)));
|
13
|
-
}
|
14
|
-
case 'headingS': {
|
15
|
-
return (h("h5", { part: TEXT_EL_PART }, h("slot", null)));
|
16
|
-
}
|
17
|
-
case 'headingM': {
|
18
|
-
return (h("h4", { part: TEXT_EL_PART }, h("slot", null)));
|
19
|
-
}
|
20
|
-
case 'headingL': {
|
21
|
-
return (h("h3", { part: TEXT_EL_PART }, h("slot", null)));
|
22
|
-
}
|
23
|
-
case 'headingXL': {
|
24
|
-
return (h("h2", { part: TEXT_EL_PART }, h("slot", null)));
|
25
|
-
}
|
26
|
-
case 'heading2XL': {
|
27
|
-
return (h("h1", { part: TEXT_EL_PART }, h("slot", null)));
|
28
|
-
}
|
29
|
-
default: {
|
30
|
-
return (h("p", { part: TEXT_EL_PART }, h("slot", null)));
|
31
|
-
}
|
32
|
-
}
|
33
|
-
}
|
34
34
|
render() {
|
35
|
-
return (h(Host, { key: '
|
35
|
+
return (h(Host, { key: '4e5d967b96ae69553f1826a31cd0baf84735cdb0' }, this.getContent({
|
36
|
+
classes: {
|
36
37
|
// COLORS
|
37
38
|
'primary': this.color === 'primary',
|
38
39
|
'secondary': this.color === 'secondary',
|
@@ -58,7 +59,8 @@ export class CpslText {
|
|
58
59
|
'heading-l': this.variant === 'headingL',
|
59
60
|
'heading-xl': this.variant === 'headingXL',
|
60
61
|
'heading-2xl': this.variant === 'heading2XL',
|
61
|
-
}
|
62
|
+
},
|
63
|
+
})));
|
62
64
|
}
|
63
65
|
static get is() { return "cpsl-text"; }
|
64
66
|
static get encapsulation() { return "shadow"; }
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"cpsl-text.js","sourceRoot":"","sources":["../../../../src/components/cpsl-text/cpsl-text.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAEzD,MAAM,YAAY,GAAG,cAAc,CAAC;AAOpC,MAAM,OAAO,QAAQ;;
|
1
|
+
{"version":3,"file":"cpsl-text.js","sourceRoot":"","sources":["../../../../src/components/cpsl-text/cpsl-text.tsx"],"names":[],"mappings":"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","sourcesContent":["import { Component, Host, Prop, h } from '@stencil/core';\n\nconst TEXT_EL_PART = 'text-element';\n\n@Component({\n tag: 'cpsl-text',\n styleUrl: 'cpsl-text.scss',\n shadow: true,\n})\nexport class CpslText {\n /**\n * The color of text.\n * Options are: `\"primary\"`, `\"secondary\", `\"tertiary\", `\"subtle\", `\"inverted\", `\"error\".\n * Default is: `\"primary\"`.\n */\n @Prop() color?: 'primary' | 'secondary' | 'tertiary' | 'subtle' | 'inverted' | 'error' | 'contrast' = 'primary';\n\n /**\n * The variant of text.\n * Options are: `\"body2XS\"`, `\"bodyXS\", `\"bodyS\", `\"bodyM\", `\"bodyL\", `\"bodyXL\", `\"headingXS\", `\"headingS\", `\"headingM\", `\"headingL\", `\"headingXL\", `\"heading2XL\".\n * Default is: `\"bodyM\"`.\n */\n @Prop() variant?: 'body2XS' | 'bodyXS' | 'bodyS' | 'bodyM' | 'bodyL' | 'bodyXL' | 'headingXS' | 'headingS' | 'headingM' | 'headingL' | 'headingXL' | 'heading2XL' = 'bodyM';\n\n /**\n * The weight of text.\n * Options are: `\"regular\"`, `\"medium\", `\"semiBold\", `\"bold\".\n * Default is: `\"regular\"`.\n */\n @Prop() weight?: 'regular' | 'medium' | 'semiBold' | 'bold' = 'regular';\n\n private getContent = ({\n classes,\n }: {\n classes: {\n [className: string]: boolean;\n };\n }) => {\n switch (this.variant) {\n case 'headingXS': {\n return (\n <h6 class={classes} part={TEXT_EL_PART}>\n <slot></slot>\n </h6>\n );\n }\n case 'headingS': {\n return (\n <h5 class={classes} part={TEXT_EL_PART}>\n <slot></slot>\n </h5>\n );\n }\n case 'headingM': {\n return (\n <h4 class={classes} part={TEXT_EL_PART}>\n <slot></slot>\n </h4>\n );\n }\n case 'headingL': {\n return (\n <h3 class={classes} part={TEXT_EL_PART}>\n <slot></slot>\n </h3>\n );\n }\n case 'headingXL': {\n return (\n <h2 class={classes} part={TEXT_EL_PART}>\n <slot></slot>\n </h2>\n );\n }\n case 'heading2XL': {\n return (\n <h1 class={classes} part={TEXT_EL_PART}>\n <slot></slot>\n </h1>\n );\n }\n default: {\n return (\n <p class={classes} part={TEXT_EL_PART}>\n <slot></slot>\n </p>\n );\n }\n }\n };\n\n render() {\n return (\n <Host>\n {this.getContent({\n classes: {\n // COLORS\n 'primary': this.color === 'primary',\n 'secondary': this.color === 'secondary',\n 'tertiary': this.color === 'tertiary',\n 'subtle': this.color === 'subtle',\n 'inverted': this.color === 'inverted',\n 'error': this.color === 'error',\n 'contrast': this.color === 'contrast',\n // WEIGHTS\n 'medium': this.weight === 'medium',\n 'semi-bold': this.weight === 'semiBold',\n 'bold': this.weight === 'bold',\n // SIZES\n 'body-2xs': this.variant === 'body2XS',\n 'body-xs': this.variant === 'bodyXS',\n 'body-s': this.variant === 'bodyS',\n 'body-m': this.variant === 'bodyM',\n 'body-l': this.variant === 'bodyL',\n 'body-xl': this.variant === 'bodyXL',\n 'heading-xs': this.variant === 'headingXS',\n 'heading-s': this.variant === 'headingS',\n 'heading-m': this.variant === 'headingM',\n 'heading-l': this.variant === 'headingL',\n 'heading-xl': this.variant === 'headingXL',\n 'heading-2xl': this.variant === 'heading2XL',\n },\n })}\n </Host>\n );\n }\n}\n"]}
|
@@ -19941,44 +19941,45 @@ const getTab = (tabs, tab) => {
|
|
19941
19941
|
};
|
19942
19942
|
CpslTabs.style = CpslTabsStyle0;
|
19943
19943
|
|
19944
|
-
const cpslTextCss = ":host{
|
19944
|
+
const cpslTextCss = ":host{display:block;color:var(--cpsl-color-text-primary) !important}:host p,h1,h2,h3,h4,h5,h6{font-family:var(--cpsl-font-family, inherit);padding:0px;margin:0px;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-smooth:never}:host p::-moz-selection,h1::-moz-selection,h2::-moz-selection,h3::-moz-selection,h4::-moz-selection,h5::-moz-selection,h6::-moz-selection{color:var(--cpsl-color-text-inverted) !important;background:var(--cpsl-color-background-64) !important}:host p::selection,h1::selection,h2::selection,h3::selection,h4::selection,h5::selection,h6::selection{color:var(--cpsl-color-text-inverted) !important;background:var(--cpsl-color-background-64) !important}:host p.primary,h1.primary,h2.primary,h3.primary,h4.primary,h5.primary,h6.primary{color:inherit}:host p.secondary,h1.secondary,h2.secondary,h3.secondary,h4.secondary,h5.secondary,h6.secondary{color:var(--cpsl-color-text-secondary)}:host p.tertiary,h1.tertiary,h2.tertiary,h3.tertiary,h4.tertiary,h5.tertiary,h6.tertiary{color:var(--cpsl-color-text-tertiary)}:host p.subtle,h1.subtle,h2.subtle,h3.subtle,h4.subtle,h5.subtle,h6.subtle{color:var(--cpsl-color-text-subtle)}:host p.inverted,h1.inverted,h2.inverted,h3.inverted,h4.inverted,h5.inverted,h6.inverted{color:var(--cpsl-color-text-inverted)}:host p.error,h1.error,h2.error,h3.error,h4.error,h5.error,h6.error{color:var(--cpsl-color-text-error)}:host p.contrast,h1.contrast,h2.contrast,h3.contrast,h4.contrast,h5.contrast,h6.contrast{color:var(--cpsl-color-text-contrast)}:host p.medium,h1.medium,h2.medium,h3.medium,h4.medium,h5.medium,h6.medium{font-weight:500}:host p.semi-bold,h1.semi-bold,h2.semi-bold,h3.semi-bold,h4.semi-bold,h5.semi-bold,h6.semi-bold{font-weight:600}:host p.bold,h1.bold,h2.bold,h3.bold,h4.bold,h5.bold,h6.bold{font-weight:700}:host p.body-2xs,h1.body-2xs,h2.body-2xs,h3.body-2xs,h4.body-2xs,h5.body-2xs,h6.body-2xs{font-size:var(--cpsl-font-size-body-2xs)}:host p.body-xs,h1.body-xs,h2.body-xs,h3.body-xs,h4.body-xs,h5.body-xs,h6.body-xs{font-size:var(--cpsl-font-size-body-xs)}:host p.body-s,h1.body-s,h2.body-s,h3.body-s,h4.body-s,h5.body-s,h6.body-s{font-size:var(--cpsl-font-size-body-s);line-height:142.857%}:host p.body-m,h1.body-m,h2.body-m,h3.body-m,h4.body-m,h5.body-m,h6.body-m{font-size:var(--cpsl-font-size-body-m);line-height:150%}:host p.body-l,h1.body-l,h2.body-l,h3.body-l,h4.body-l,h5.body-l,h6.body-l{font-size:var(--cpsl-font-size-body-l);line-height:140%}:host p.body-xl,h1.body-xl,h2.body-xl,h3.body-xl,h4.body-xl,h5.body-xl,h6.body-xl{font-size:var(--cpsl-font-size-body-xl)}:host p.heading-xs,h1.heading-xs,h2.heading-xs,h3.heading-xs,h4.heading-xs,h5.heading-xs,h6.heading-xs{font-size:var(--cpsl-font-size-heading-xs)}:host p.heading-s,h1.heading-s,h2.heading-s,h3.heading-s,h4.heading-s,h5.heading-s,h6.heading-s{font-size:var(--cpsl-font-size-heading-s)}:host p.heading-m,h1.heading-m,h2.heading-m,h3.heading-m,h4.heading-m,h5.heading-m,h6.heading-m{font-size:var(--cpsl-font-size-heading-m);letter-spacing:-0.4px}:host p.heading-l,h1.heading-l,h2.heading-l,h3.heading-l,h4.heading-l,h5.heading-l,h6.heading-l{font-size:var(--cpsl-font-size-heading-l);letter-spacing:-1.12px}:host p.heading-xl,h1.heading-xl,h2.heading-xl,h3.heading-xl,h4.heading-xl,h5.heading-xl,h6.heading-xl{font-size:var(--cpsl-font-size-heading-xl);letter-spacing:-1.28px}:host p.heading-2xl,h1.heading-2xl,h2.heading-2xl,h3.heading-2xl,h4.heading-2xl,h5.heading-2xl,h6.heading-2xl{font-size:var(--cpsl-font-size-heading-2xl);letter-spacing:-1.44px}";
|
19945
19945
|
const CpslTextStyle0 = cpslTextCss;
|
19946
19946
|
|
19947
19947
|
const TEXT_EL_PART = 'text-element';
|
19948
19948
|
const CpslText = class {
|
19949
19949
|
constructor(hostRef) {
|
19950
19950
|
registerInstance(this, hostRef);
|
19951
|
+
this.getContent = ({ classes, }) => {
|
19952
|
+
switch (this.variant) {
|
19953
|
+
case 'headingXS': {
|
19954
|
+
return (h("h6", { class: classes, part: TEXT_EL_PART }, h("slot", null)));
|
19955
|
+
}
|
19956
|
+
case 'headingS': {
|
19957
|
+
return (h("h5", { class: classes, part: TEXT_EL_PART }, h("slot", null)));
|
19958
|
+
}
|
19959
|
+
case 'headingM': {
|
19960
|
+
return (h("h4", { class: classes, part: TEXT_EL_PART }, h("slot", null)));
|
19961
|
+
}
|
19962
|
+
case 'headingL': {
|
19963
|
+
return (h("h3", { class: classes, part: TEXT_EL_PART }, h("slot", null)));
|
19964
|
+
}
|
19965
|
+
case 'headingXL': {
|
19966
|
+
return (h("h2", { class: classes, part: TEXT_EL_PART }, h("slot", null)));
|
19967
|
+
}
|
19968
|
+
case 'heading2XL': {
|
19969
|
+
return (h("h1", { class: classes, part: TEXT_EL_PART }, h("slot", null)));
|
19970
|
+
}
|
19971
|
+
default: {
|
19972
|
+
return (h("p", { class: classes, part: TEXT_EL_PART }, h("slot", null)));
|
19973
|
+
}
|
19974
|
+
}
|
19975
|
+
};
|
19951
19976
|
this.color = 'primary';
|
19952
19977
|
this.variant = 'bodyM';
|
19953
19978
|
this.weight = 'regular';
|
19954
19979
|
}
|
19955
|
-
get Content() {
|
19956
|
-
switch (this.variant) {
|
19957
|
-
case 'headingXS': {
|
19958
|
-
return (h("h6", { part: TEXT_EL_PART }, h("slot", null)));
|
19959
|
-
}
|
19960
|
-
case 'headingS': {
|
19961
|
-
return (h("h5", { part: TEXT_EL_PART }, h("slot", null)));
|
19962
|
-
}
|
19963
|
-
case 'headingM': {
|
19964
|
-
return (h("h4", { part: TEXT_EL_PART }, h("slot", null)));
|
19965
|
-
}
|
19966
|
-
case 'headingL': {
|
19967
|
-
return (h("h3", { part: TEXT_EL_PART }, h("slot", null)));
|
19968
|
-
}
|
19969
|
-
case 'headingXL': {
|
19970
|
-
return (h("h2", { part: TEXT_EL_PART }, h("slot", null)));
|
19971
|
-
}
|
19972
|
-
case 'heading2XL': {
|
19973
|
-
return (h("h1", { part: TEXT_EL_PART }, h("slot", null)));
|
19974
|
-
}
|
19975
|
-
default: {
|
19976
|
-
return (h("p", { part: TEXT_EL_PART }, h("slot", null)));
|
19977
|
-
}
|
19978
|
-
}
|
19979
|
-
}
|
19980
19980
|
render() {
|
19981
|
-
return (h(Host, { key: '
|
19981
|
+
return (h(Host, { key: '4e5d967b96ae69553f1826a31cd0baf84735cdb0' }, this.getContent({
|
19982
|
+
classes: {
|
19982
19983
|
// COLORS
|
19983
19984
|
'primary': this.color === 'primary',
|
19984
19985
|
'secondary': this.color === 'secondary',
|
@@ -20004,7 +20005,8 @@ const CpslText = class {
|
|
20004
20005
|
'heading-l': this.variant === 'headingL',
|
20005
20006
|
'heading-xl': this.variant === 'headingXL',
|
20006
20007
|
'heading-2xl': this.variant === 'heading2XL',
|
20007
|
-
}
|
20008
|
+
},
|
20009
|
+
})));
|
20008
20010
|
}
|
20009
20011
|
};
|
20010
20012
|
CpslText.style = CpslTextStyle0;
|