@usecapsule/core-components 3.5.1-dev.1 → 3.5.1-dev.2
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-c6940f81.entry.js} +3 -3
- package/dist/capsule/p-c6940f81.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 +176 -57
- 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,21 +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
58
|
}
|
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;
|
71
|
-
}
|
72
59
|
|
73
60
|
:host p,
|
74
61
|
h1,
|
@@ -77,6 +64,7 @@ h3,
|
|
77
64
|
h4,
|
78
65
|
h5,
|
79
66
|
h6 {
|
67
|
+
font-family: var(--cpsl-font-family, inherit);
|
80
68
|
padding: 0px;
|
81
69
|
margin: 0px;
|
82
70
|
font-weight: inherit;
|
@@ -86,98 +74,229 @@ h6 {
|
|
86
74
|
-moz-osx-font-smoothing: grayscale;
|
87
75
|
font-smooth: never;
|
88
76
|
}
|
89
|
-
|
90
|
-
|
77
|
+
:host p::-moz-selection,
|
78
|
+
h1::-moz-selection,
|
79
|
+
h2::-moz-selection,
|
80
|
+
h3::-moz-selection,
|
81
|
+
h4::-moz-selection,
|
82
|
+
h5::-moz-selection,
|
83
|
+
h6::-moz-selection {
|
84
|
+
/* Code for Firefox */
|
85
|
+
color: var(--cpsl-color-text-inverted) !important;
|
86
|
+
background: var(--cpsl-color-background-64) !important;
|
87
|
+
}
|
88
|
+
:host p::selection,
|
89
|
+
h1::selection,
|
90
|
+
h2::selection,
|
91
|
+
h3::selection,
|
92
|
+
h4::selection,
|
93
|
+
h5::selection,
|
94
|
+
h6::selection {
|
95
|
+
color: var(--cpsl-color-text-inverted) !important;
|
96
|
+
background: var(--cpsl-color-background-64) !important;
|
97
|
+
}
|
98
|
+
:host p.primary,
|
99
|
+
h1.primary,
|
100
|
+
h2.primary,
|
101
|
+
h3.primary,
|
102
|
+
h4.primary,
|
103
|
+
h5.primary,
|
104
|
+
h6.primary {
|
91
105
|
color: var(--cpsl-color-text-primary);
|
92
106
|
}
|
93
|
-
|
94
|
-
|
107
|
+
:host p.secondary,
|
108
|
+
h1.secondary,
|
109
|
+
h2.secondary,
|
110
|
+
h3.secondary,
|
111
|
+
h4.secondary,
|
112
|
+
h5.secondary,
|
113
|
+
h6.secondary {
|
95
114
|
color: var(--cpsl-color-text-secondary);
|
96
115
|
}
|
97
|
-
|
98
|
-
|
116
|
+
:host p.tertiary,
|
117
|
+
h1.tertiary,
|
118
|
+
h2.tertiary,
|
119
|
+
h3.tertiary,
|
120
|
+
h4.tertiary,
|
121
|
+
h5.tertiary,
|
122
|
+
h6.tertiary {
|
99
123
|
color: var(--cpsl-color-text-tertiary);
|
100
124
|
}
|
101
|
-
|
102
|
-
|
125
|
+
:host p.subtle,
|
126
|
+
h1.subtle,
|
127
|
+
h2.subtle,
|
128
|
+
h3.subtle,
|
129
|
+
h4.subtle,
|
130
|
+
h5.subtle,
|
131
|
+
h6.subtle {
|
103
132
|
color: var(--cpsl-color-text-subtle);
|
104
133
|
}
|
105
|
-
|
106
|
-
|
134
|
+
:host p.inverted,
|
135
|
+
h1.inverted,
|
136
|
+
h2.inverted,
|
137
|
+
h3.inverted,
|
138
|
+
h4.inverted,
|
139
|
+
h5.inverted,
|
140
|
+
h6.inverted {
|
107
141
|
color: var(--cpsl-color-text-inverted);
|
108
142
|
}
|
109
|
-
|
110
|
-
|
143
|
+
:host p.error,
|
144
|
+
h1.error,
|
145
|
+
h2.error,
|
146
|
+
h3.error,
|
147
|
+
h4.error,
|
148
|
+
h5.error,
|
149
|
+
h6.error {
|
111
150
|
color: var(--cpsl-color-text-error);
|
112
151
|
}
|
113
|
-
|
114
|
-
|
152
|
+
:host p.contrast,
|
153
|
+
h1.contrast,
|
154
|
+
h2.contrast,
|
155
|
+
h3.contrast,
|
156
|
+
h4.contrast,
|
157
|
+
h5.contrast,
|
158
|
+
h6.contrast {
|
115
159
|
color: var(--cpsl-color-text-contrast);
|
116
160
|
}
|
117
|
-
|
118
|
-
|
161
|
+
:host p.medium,
|
162
|
+
h1.medium,
|
163
|
+
h2.medium,
|
164
|
+
h3.medium,
|
165
|
+
h4.medium,
|
166
|
+
h5.medium,
|
167
|
+
h6.medium {
|
119
168
|
font-weight: 500;
|
120
169
|
}
|
121
|
-
|
122
|
-
|
170
|
+
:host p.semi-bold,
|
171
|
+
h1.semi-bold,
|
172
|
+
h2.semi-bold,
|
173
|
+
h3.semi-bold,
|
174
|
+
h4.semi-bold,
|
175
|
+
h5.semi-bold,
|
176
|
+
h6.semi-bold {
|
123
177
|
font-weight: 600;
|
124
178
|
}
|
125
|
-
|
126
|
-
|
179
|
+
:host p.bold,
|
180
|
+
h1.bold,
|
181
|
+
h2.bold,
|
182
|
+
h3.bold,
|
183
|
+
h4.bold,
|
184
|
+
h5.bold,
|
185
|
+
h6.bold {
|
127
186
|
font-weight: 700;
|
128
187
|
}
|
129
|
-
|
130
|
-
|
188
|
+
:host p.body-2xs,
|
189
|
+
h1.body-2xs,
|
190
|
+
h2.body-2xs,
|
191
|
+
h3.body-2xs,
|
192
|
+
h4.body-2xs,
|
193
|
+
h5.body-2xs,
|
194
|
+
h6.body-2xs {
|
131
195
|
font-size: var(--cpsl-font-size-body-2xs);
|
132
196
|
}
|
133
|
-
|
134
|
-
|
197
|
+
:host p.body-xs,
|
198
|
+
h1.body-xs,
|
199
|
+
h2.body-xs,
|
200
|
+
h3.body-xs,
|
201
|
+
h4.body-xs,
|
202
|
+
h5.body-xs,
|
203
|
+
h6.body-xs {
|
135
204
|
font-size: var(--cpsl-font-size-body-xs);
|
136
205
|
}
|
137
|
-
|
138
|
-
|
206
|
+
:host p.body-s,
|
207
|
+
h1.body-s,
|
208
|
+
h2.body-s,
|
209
|
+
h3.body-s,
|
210
|
+
h4.body-s,
|
211
|
+
h5.body-s,
|
212
|
+
h6.body-s {
|
139
213
|
font-size: var(--cpsl-font-size-body-s);
|
140
214
|
line-height: 142.857%;
|
141
215
|
}
|
142
|
-
|
143
|
-
|
216
|
+
:host p.body-m,
|
217
|
+
h1.body-m,
|
218
|
+
h2.body-m,
|
219
|
+
h3.body-m,
|
220
|
+
h4.body-m,
|
221
|
+
h5.body-m,
|
222
|
+
h6.body-m {
|
144
223
|
font-size: var(--cpsl-font-size-body-m);
|
145
224
|
line-height: 150%;
|
146
225
|
}
|
147
|
-
|
148
|
-
|
226
|
+
:host p.body-l,
|
227
|
+
h1.body-l,
|
228
|
+
h2.body-l,
|
229
|
+
h3.body-l,
|
230
|
+
h4.body-l,
|
231
|
+
h5.body-l,
|
232
|
+
h6.body-l {
|
149
233
|
font-size: var(--cpsl-font-size-body-l);
|
150
234
|
line-height: 140%;
|
151
235
|
}
|
152
|
-
|
153
|
-
|
236
|
+
:host p.body-xl,
|
237
|
+
h1.body-xl,
|
238
|
+
h2.body-xl,
|
239
|
+
h3.body-xl,
|
240
|
+
h4.body-xl,
|
241
|
+
h5.body-xl,
|
242
|
+
h6.body-xl {
|
154
243
|
font-size: var(--cpsl-font-size-body-xl);
|
155
244
|
}
|
156
|
-
|
157
|
-
|
245
|
+
:host p.heading-xs,
|
246
|
+
h1.heading-xs,
|
247
|
+
h2.heading-xs,
|
248
|
+
h3.heading-xs,
|
249
|
+
h4.heading-xs,
|
250
|
+
h5.heading-xs,
|
251
|
+
h6.heading-xs {
|
158
252
|
font-size: var(--cpsl-font-size-heading-xs);
|
159
253
|
}
|
160
|
-
|
161
|
-
|
254
|
+
:host p.heading-s,
|
255
|
+
h1.heading-s,
|
256
|
+
h2.heading-s,
|
257
|
+
h3.heading-s,
|
258
|
+
h4.heading-s,
|
259
|
+
h5.heading-s,
|
260
|
+
h6.heading-s {
|
162
261
|
font-size: var(--cpsl-font-size-heading-s);
|
163
262
|
}
|
164
|
-
|
165
|
-
|
263
|
+
:host p.heading-m,
|
264
|
+
h1.heading-m,
|
265
|
+
h2.heading-m,
|
266
|
+
h3.heading-m,
|
267
|
+
h4.heading-m,
|
268
|
+
h5.heading-m,
|
269
|
+
h6.heading-m {
|
166
270
|
font-size: var(--cpsl-font-size-heading-m);
|
167
271
|
letter-spacing: -0.4px;
|
168
272
|
}
|
169
|
-
|
170
|
-
|
273
|
+
:host p.heading-l,
|
274
|
+
h1.heading-l,
|
275
|
+
h2.heading-l,
|
276
|
+
h3.heading-l,
|
277
|
+
h4.heading-l,
|
278
|
+
h5.heading-l,
|
279
|
+
h6.heading-l {
|
171
280
|
font-size: var(--cpsl-font-size-heading-l);
|
172
281
|
letter-spacing: -1.12px;
|
173
282
|
}
|
174
|
-
|
175
|
-
|
283
|
+
:host p.heading-xl,
|
284
|
+
h1.heading-xl,
|
285
|
+
h2.heading-xl,
|
286
|
+
h3.heading-xl,
|
287
|
+
h4.heading-xl,
|
288
|
+
h5.heading-xl,
|
289
|
+
h6.heading-xl {
|
176
290
|
font-size: var(--cpsl-font-size-heading-xl);
|
177
291
|
letter-spacing: -1.28px;
|
178
292
|
}
|
179
|
-
|
180
|
-
|
293
|
+
:host p.heading-2xl,
|
294
|
+
h1.heading-2xl,
|
295
|
+
h2.heading-2xl,
|
296
|
+
h3.heading-2xl,
|
297
|
+
h4.heading-2xl,
|
298
|
+
h5.heading-2xl,
|
299
|
+
h6.heading-2xl {
|
181
300
|
font-size: var(--cpsl-font-size-heading-2xl);
|
182
301
|
letter-spacing: -1.44px;
|
183
302
|
}
|
@@ -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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,OAAO,KAAK,UAAU;gBACxC,WAAW,EAAE,IAAI,CAAC,OAAO,KAAK,UAAU;gBACxC,YAAY,EAAE,IAAI,CAAC,OAAO,KAAK,WAAW;gBAC1C,aAAa,EAAE,IAAI,CAAC,OAAO,KAAK,YAAY;aAC7C;SACF,CAAC,CACG,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","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{font-family:var(--cpsl-font-family, inherit);
|
19944
|
+
const cpslTextCss = ":host{display:block}:host p,h1,h2,h3,h4,h5,h6{font-family:var(--cpsl-font-family, inherit);padding:0px;margin:0px;font-weight:inherit;font-size:inherit;letter-spacing:inherit;-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:var(--cpsl-color-text-primary)}: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;
|