@usecapsule/core-components 3.8.0 → 3.8.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -55,15 +55,6 @@
55
55
  */
56
56
  :host {
57
57
  display: block;
58
- }
59
-
60
- :host p,
61
- h1,
62
- h2,
63
- h3,
64
- h4,
65
- h5,
66
- h6 {
67
58
  font-family: var(--cpsl-font-family, inherit);
68
59
  padding: 0px;
69
60
  margin: 0px;
@@ -71,238 +62,352 @@ h6 {
71
62
  -moz-osx-font-smoothing: grayscale;
72
63
  font-smooth: never;
73
64
  }
74
- :host p::-moz-selection,
75
- h1::-moz-selection,
76
- h2::-moz-selection,
77
- h3::-moz-selection,
78
- h4::-moz-selection,
79
- h5::-moz-selection,
80
- h6::-moz-selection {
81
- /* Code for Firefox */
82
- color: var(--cpsl-color-text-inverted) !important;
83
- background: var(--cpsl-color-background-64) !important;
84
- }
85
- :host p::selection,
86
- h1::selection,
87
- h2::selection,
88
- h3::selection,
89
- h4::selection,
90
- h5::selection,
91
- h6::selection {
92
- color: var(--cpsl-color-text-inverted) !important;
93
- background: var(--cpsl-color-background-64) !important;
65
+
66
+ :host(.primary) {
67
+ color: var(--color-override, var(--cpsl-color-text-primary));
94
68
  }
95
- :host p.primary,
96
- h1.primary,
97
- h2.primary,
98
- h3.primary,
99
- h4.primary,
100
- h5.primary,
101
- h6.primary {
69
+ :host(.primary) > p,
70
+ :host(.primary) h1,
71
+ :host(.primary) h2,
72
+ :host(.primary) h3,
73
+ :host(.primary) h4,
74
+ :host(.primary) h5,
75
+ :host(.primary) h6 {
102
76
  color: var(--color-override, var(--cpsl-color-text-primary));
103
77
  }
104
- :host p.secondary,
105
- h1.secondary,
106
- h2.secondary,
107
- h3.secondary,
108
- h4.secondary,
109
- h5.secondary,
110
- h6.secondary {
78
+
79
+ :host(.secondary) {
80
+ color: var(--color-override, var(--cpsl-color-text-secondary));
81
+ }
82
+ :host(.secondary) > p,
83
+ :host(.secondary) h1,
84
+ :host(.secondary) h2,
85
+ :host(.secondary) h3,
86
+ :host(.secondary) h4,
87
+ :host(.secondary) h5,
88
+ :host(.secondary) h6 {
111
89
  color: var(--color-override, var(--cpsl-color-text-secondary));
112
90
  }
113
- :host p.tertiary,
114
- h1.tertiary,
115
- h2.tertiary,
116
- h3.tertiary,
117
- h4.tertiary,
118
- h5.tertiary,
119
- h6.tertiary {
91
+
92
+ :host(.tertiary) {
93
+ color: var(--color-override, var(--cpsl-color-text-tertiary));
94
+ }
95
+ :host(.tertiary) > p,
96
+ :host(.tertiary) h1,
97
+ :host(.tertiary) h2,
98
+ :host(.tertiary) h3,
99
+ :host(.tertiary) h4,
100
+ :host(.tertiary) h5,
101
+ :host(.tertiary) h6 {
120
102
  color: var(--color-override, var(--cpsl-color-text-tertiary));
121
103
  }
122
- :host p.subtle,
123
- h1.subtle,
124
- h2.subtle,
125
- h3.subtle,
126
- h4.subtle,
127
- h5.subtle,
128
- h6.subtle {
104
+
105
+ :host(.subtle) {
106
+ color: var(--color-override, var(--cpsl-color-text-subtle));
107
+ }
108
+ :host(.subtle) > p,
109
+ :host(.subtle) h1,
110
+ :host(.subtle) h2,
111
+ :host(.subtle) h3,
112
+ :host(.subtle) h4,
113
+ :host(.subtle) h5,
114
+ :host(.subtle) h6 {
129
115
  color: var(--color-override, var(--cpsl-color-text-subtle));
130
116
  }
131
- :host p.inverted,
132
- h1.inverted,
133
- h2.inverted,
134
- h3.inverted,
135
- h4.inverted,
136
- h5.inverted,
137
- h6.inverted {
117
+
118
+ :host(.inverted) {
119
+ color: var(--color-override, var(--cpsl-color-text-inverted));
120
+ }
121
+ :host(.inverted) > p,
122
+ :host(.inverted) h1,
123
+ :host(.inverted) h2,
124
+ :host(.inverted) h3,
125
+ :host(.inverted) h4,
126
+ :host(.inverted) h5,
127
+ :host(.inverted) h6 {
138
128
  color: var(--color-override, var(--cpsl-color-text-inverted));
139
129
  }
140
- :host p.error,
141
- h1.error,
142
- h2.error,
143
- h3.error,
144
- h4.error,
145
- h5.error,
146
- h6.error {
130
+
131
+ :host(.error) {
132
+ color: var(--color-override, var(--cpsl-color-text-error));
133
+ }
134
+ :host(.error) > p,
135
+ :host(.error) h1,
136
+ :host(.error) h2,
137
+ :host(.error) h3,
138
+ :host(.error) h4,
139
+ :host(.error) h5,
140
+ :host(.error) h6 {
147
141
  color: var(--color-override, var(--cpsl-color-text-error));
148
142
  }
149
- :host p.contrast,
150
- h1.contrast,
151
- h2.contrast,
152
- h3.contrast,
153
- h4.contrast,
154
- h5.contrast,
155
- h6.contrast {
143
+
144
+ :host(.contrast) {
145
+ color: var(--color-override, var(--cpsl-color-text-contrast));
146
+ }
147
+ :host(.contrast) > p,
148
+ :host(.contrast) h1,
149
+ :host(.contrast) h2,
150
+ :host(.contrast) h3,
151
+ :host(.contrast) h4,
152
+ :host(.contrast) h5,
153
+ :host(.contrast) h6 {
156
154
  color: var(--color-override, var(--cpsl-color-text-contrast));
157
155
  }
158
- :host p.regular,
159
- h1.regular,
160
- h2.regular,
161
- h3.regular,
162
- h4.regular,
163
- h5.regular,
164
- h6.regular {
156
+
157
+ :host(.regular) {
158
+ font-weight: 400;
159
+ }
160
+ :host(.regular) > p,
161
+ :host(.regular) h1,
162
+ :host(.regular) h2,
163
+ :host(.regular) h3,
164
+ :host(.regular) h4,
165
+ :host(.regular) h5,
166
+ :host(.regular) h6 {
165
167
  font-weight: 400;
166
168
  }
167
- :host p.medium,
168
- h1.medium,
169
- h2.medium,
170
- h3.medium,
171
- h4.medium,
172
- h5.medium,
173
- h6.medium {
169
+
170
+ :host(.medium) {
174
171
  font-weight: 500;
175
172
  }
176
- :host p.semi-bold,
177
- h1.semi-bold,
178
- h2.semi-bold,
179
- h3.semi-bold,
180
- h4.semi-bold,
181
- h5.semi-bold,
182
- h6.semi-bold {
173
+ :host(.medium) > p,
174
+ :host(.medium) h1,
175
+ :host(.medium) h2,
176
+ :host(.medium) h3,
177
+ :host(.medium) h4,
178
+ :host(.medium) h5,
179
+ :host(.medium) h6 {
180
+ font-weight: 500;
181
+ }
182
+
183
+ :host(.semi-bold) {
184
+ font-weight: 600;
185
+ }
186
+ :host(.semi-bold) > p,
187
+ :host(.semi-bold) h1,
188
+ :host(.semi-bold) h2,
189
+ :host(.semi-bold) h3,
190
+ :host(.semi-bold) h4,
191
+ :host(.semi-bold) h5,
192
+ :host(.semi-bold) h6 {
183
193
  font-weight: 600;
184
194
  }
185
- :host p.bold,
186
- h1.bold,
187
- h2.bold,
188
- h3.bold,
189
- h4.bold,
190
- h5.bold,
191
- h6.bold {
195
+
196
+ :host(.bold) {
197
+ font-weight: 700;
198
+ }
199
+ :host(.bold) > p,
200
+ :host(.bold) h1,
201
+ :host(.bold) h2,
202
+ :host(.bold) h3,
203
+ :host(.bold) h4,
204
+ :host(.bold) h5,
205
+ :host(.bold) h6 {
192
206
  font-weight: 700;
193
207
  }
194
- :host p.body-2xs,
195
- h1.body-2xs,
196
- h2.body-2xs,
197
- h3.body-2xs,
198
- h4.body-2xs,
199
- h5.body-2xs,
200
- h6.body-2xs {
208
+
209
+ :host(.body-2xs) {
201
210
  font-size: var(--cpsl-font-size-body-2xs);
202
211
  }
203
- :host p.body-xs,
204
- h1.body-xs,
205
- h2.body-xs,
206
- h3.body-xs,
207
- h4.body-xs,
208
- h5.body-xs,
209
- h6.body-xs {
212
+ :host(.body-2xs) > p,
213
+ :host(.body-2xs) h1,
214
+ :host(.body-2xs) h2,
215
+ :host(.body-2xs) h3,
216
+ :host(.body-2xs) h4,
217
+ :host(.body-2xs) h5,
218
+ :host(.body-2xs) h6 {
219
+ font-size: var(--cpsl-font-size-body-2xs);
220
+ }
221
+
222
+ :host(.body-xs) {
223
+ font-size: var(--cpsl-font-size-body-xs);
224
+ }
225
+ :host(.body-xs) > p,
226
+ :host(.body-xs) h1,
227
+ :host(.body-xs) h2,
228
+ :host(.body-xs) h3,
229
+ :host(.body-xs) h4,
230
+ :host(.body-xs) h5,
231
+ :host(.body-xs) h6 {
210
232
  font-size: var(--cpsl-font-size-body-xs);
211
233
  }
212
- :host p.body-s,
213
- h1.body-s,
214
- h2.body-s,
215
- h3.body-s,
216
- h4.body-s,
217
- h5.body-s,
218
- h6.body-s {
234
+
235
+ :host(.body-s) {
236
+ font-size: var(--cpsl-font-size-body-s);
237
+ line-height: 142.857%;
238
+ }
239
+ :host(.body-s) > p,
240
+ :host(.body-s) h1,
241
+ :host(.body-s) h2,
242
+ :host(.body-s) h3,
243
+ :host(.body-s) h4,
244
+ :host(.body-s) h5,
245
+ :host(.body-s) h6 {
219
246
  font-size: var(--cpsl-font-size-body-s);
220
247
  line-height: 142.857%;
221
248
  }
222
- :host p.body-m,
223
- h1.body-m,
224
- h2.body-m,
225
- h3.body-m,
226
- h4.body-m,
227
- h5.body-m,
228
- h6.body-m {
249
+
250
+ :host(.body-m) {
251
+ font-size: var(--cpsl-font-size-body-m);
252
+ line-height: 150%;
253
+ }
254
+ :host(.body-m) > p,
255
+ :host(.body-m) h1,
256
+ :host(.body-m) h2,
257
+ :host(.body-m) h3,
258
+ :host(.body-m) h4,
259
+ :host(.body-m) h5,
260
+ :host(.body-m) h6 {
229
261
  font-size: var(--cpsl-font-size-body-m);
230
262
  line-height: 150%;
231
263
  }
232
- :host p.body-l,
233
- h1.body-l,
234
- h2.body-l,
235
- h3.body-l,
236
- h4.body-l,
237
- h5.body-l,
238
- h6.body-l {
264
+
265
+ :host(.body-l) {
266
+ font-size: var(--cpsl-font-size-body-l);
267
+ line-height: 140%;
268
+ }
269
+ :host(.body-l) > p,
270
+ :host(.body-l) h1,
271
+ :host(.body-l) h2,
272
+ :host(.body-l) h3,
273
+ :host(.body-l) h4,
274
+ :host(.body-l) h5,
275
+ :host(.body-l) h6 {
239
276
  font-size: var(--cpsl-font-size-body-l);
240
277
  line-height: 140%;
241
278
  }
242
- :host p.body-xl,
243
- h1.body-xl,
244
- h2.body-xl,
245
- h3.body-xl,
246
- h4.body-xl,
247
- h5.body-xl,
248
- h6.body-xl {
279
+
280
+ :host(.body-xl) {
281
+ font-size: var(--cpsl-font-size-body-xl);
282
+ }
283
+ :host(.body-xl) > p,
284
+ :host(.body-xl) h1,
285
+ :host(.body-xl) h2,
286
+ :host(.body-xl) h3,
287
+ :host(.body-xl) h4,
288
+ :host(.body-xl) h5,
289
+ :host(.body-xl) h6 {
249
290
  font-size: var(--cpsl-font-size-body-xl);
250
291
  }
251
- :host p.heading-xs,
252
- h1.heading-xs,
253
- h2.heading-xs,
254
- h3.heading-xs,
255
- h4.heading-xs,
256
- h5.heading-xs,
257
- h6.heading-xs {
292
+
293
+ :host(.heading-xs) {
258
294
  font-size: var(--cpsl-font-size-heading-xs);
259
295
  }
260
- :host p.heading-s,
261
- h1.heading-s,
262
- h2.heading-s,
263
- h3.heading-s,
264
- h4.heading-s,
265
- h5.heading-s,
266
- h6.heading-s {
296
+ :host(.heading-xs) > p,
297
+ :host(.heading-xs) h1,
298
+ :host(.heading-xs) h2,
299
+ :host(.heading-xs) h3,
300
+ :host(.heading-xs) h4,
301
+ :host(.heading-xs) h5,
302
+ :host(.heading-xs) h6 {
303
+ font-size: var(--cpsl-font-size-heading-xs);
304
+ }
305
+
306
+ :host(.heading-s) {
307
+ font-size: var(--cpsl-font-size-heading-s);
308
+ }
309
+ :host(.heading-s) > p,
310
+ :host(.heading-s) h1,
311
+ :host(.heading-s) h2,
312
+ :host(.heading-s) h3,
313
+ :host(.heading-s) h4,
314
+ :host(.heading-s) h5,
315
+ :host(.heading-s) h6 {
267
316
  font-size: var(--cpsl-font-size-heading-s);
268
317
  }
269
- :host p.heading-m,
270
- h1.heading-m,
271
- h2.heading-m,
272
- h3.heading-m,
273
- h4.heading-m,
274
- h5.heading-m,
275
- h6.heading-m {
318
+
319
+ :host(.heading-m) {
276
320
  font-size: var(--cpsl-font-size-heading-m);
277
321
  letter-spacing: -0.4px;
278
322
  }
279
- :host p.heading-l,
280
- h1.heading-l,
281
- h2.heading-l,
282
- h3.heading-l,
283
- h4.heading-l,
284
- h5.heading-l,
285
- h6.heading-l {
323
+ :host(.heading-m) > p,
324
+ :host(.heading-m) h1,
325
+ :host(.heading-m) h2,
326
+ :host(.heading-m) h3,
327
+ :host(.heading-m) h4,
328
+ :host(.heading-m) h5,
329
+ :host(.heading-m) h6 {
330
+ font-size: var(--cpsl-font-size-heading-m);
331
+ letter-spacing: -0.4px;
332
+ }
333
+
334
+ :host(.heading-l) {
286
335
  font-size: var(--cpsl-font-size-heading-l);
287
336
  letter-spacing: -1.12px;
288
337
  }
289
- :host p.heading-xl,
290
- h1.heading-xl,
291
- h2.heading-xl,
292
- h3.heading-xl,
293
- h4.heading-xl,
294
- h5.heading-xl,
295
- h6.heading-xl {
338
+ :host(.heading-l) > p,
339
+ :host(.heading-l) h1,
340
+ :host(.heading-l) h2,
341
+ :host(.heading-l) h3,
342
+ :host(.heading-l) h4,
343
+ :host(.heading-l) h5,
344
+ :host(.heading-l) h6 {
345
+ font-size: var(--cpsl-font-size-heading-l);
346
+ letter-spacing: -1.12px;
347
+ }
348
+
349
+ :host(.heading-xl) {
296
350
  font-size: var(--cpsl-font-size-heading-xl);
297
351
  letter-spacing: -1.28px;
298
352
  }
299
- :host p.heading-2xl,
300
- h1.heading-2xl,
301
- h2.heading-2xl,
302
- h3.heading-2xl,
303
- h4.heading-2xl,
304
- h5.heading-2xl,
305
- h6.heading-2xl {
353
+ :host(.heading-xl) > p,
354
+ :host(.heading-xl) h1,
355
+ :host(.heading-xl) h2,
356
+ :host(.heading-xl) h3,
357
+ :host(.heading-xl) h4,
358
+ :host(.heading-xl) h5,
359
+ :host(.heading-xl) h6 {
360
+ font-size: var(--cpsl-font-size-heading-xl);
361
+ letter-spacing: -1.28px;
362
+ }
363
+
364
+ :host(.heading-2xl) {
306
365
  font-size: var(--cpsl-font-size-heading-2xl);
307
366
  letter-spacing: -1.44px;
367
+ }
368
+ :host(.heading-2xl) > p,
369
+ :host(.heading-2xl) h1,
370
+ :host(.heading-2xl) h2,
371
+ :host(.heading-2xl) h3,
372
+ :host(.heading-2xl) h4,
373
+ :host(.heading-2xl) h5,
374
+ :host(.heading-2xl) h6 {
375
+ font-size: var(--cpsl-font-size-heading-2xl);
376
+ letter-spacing: -1.44px;
377
+ }
378
+
379
+ :host p,
380
+ h1,
381
+ h2,
382
+ h3,
383
+ h4,
384
+ h5,
385
+ h6 {
386
+ font-family: var(--cpsl-font-family, inherit);
387
+ padding: 0px;
388
+ margin: 0px;
389
+ -webkit-font-smoothing: antialiased;
390
+ -moz-osx-font-smoothing: grayscale;
391
+ font-smooth: never;
392
+ }
393
+ :host p::-moz-selection,
394
+ h1::-moz-selection,
395
+ h2::-moz-selection,
396
+ h3::-moz-selection,
397
+ h4::-moz-selection,
398
+ h5::-moz-selection,
399
+ h6::-moz-selection {
400
+ /* Code for Firefox */
401
+ color: var(--cpsl-color-text-inverted) !important;
402
+ background: var(--cpsl-color-background-64) !important;
403
+ }
404
+ :host p::selection,
405
+ h1::selection,
406
+ h2::selection,
407
+ h3::selection,
408
+ h4::selection,
409
+ h5::selection,
410
+ h6::selection {
411
+ color: var(--cpsl-color-text-inverted) !important;
412
+ background: var(--cpsl-color-background-64) !important;
308
413
  }
@@ -2,28 +2,28 @@ 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, }) => {
5
+ this.getContent = () => {
6
6
  switch (this.variant) {
7
7
  case 'headingXS': {
8
- return (h("h6", { class: classes, part: TEXT_EL_PART }, h("slot", null)));
8
+ return (h("h6", { part: TEXT_EL_PART }, h("slot", null)));
9
9
  }
10
10
  case 'headingS': {
11
- return (h("h5", { class: classes, part: TEXT_EL_PART }, h("slot", null)));
11
+ return (h("h5", { part: TEXT_EL_PART }, h("slot", null)));
12
12
  }
13
13
  case 'headingM': {
14
- return (h("h4", { class: classes, part: TEXT_EL_PART }, h("slot", null)));
14
+ return (h("h4", { part: TEXT_EL_PART }, h("slot", null)));
15
15
  }
16
16
  case 'headingL': {
17
- return (h("h3", { class: classes, part: TEXT_EL_PART }, h("slot", null)));
17
+ return (h("h3", { part: TEXT_EL_PART }, h("slot", null)));
18
18
  }
19
19
  case 'headingXL': {
20
- return (h("h2", { class: classes, part: TEXT_EL_PART }, h("slot", null)));
20
+ return (h("h2", { part: TEXT_EL_PART }, h("slot", null)));
21
21
  }
22
22
  case 'heading2XL': {
23
- return (h("h1", { class: classes, part: TEXT_EL_PART }, h("slot", null)));
23
+ return (h("h1", { part: TEXT_EL_PART }, h("slot", null)));
24
24
  }
25
25
  default: {
26
- return (h("p", { class: classes, part: TEXT_EL_PART }, h("slot", null)));
26
+ return (h("p", { part: TEXT_EL_PART }, h("slot", null)));
27
27
  }
28
28
  }
29
29
  };
@@ -32,8 +32,7 @@ export class CpslText {
32
32
  this.weight = 'regular';
33
33
  }
34
34
  render() {
35
- return (h(Host, { key: '4e5d967b96ae69553f1826a31cd0baf84735cdb0' }, this.getContent({
36
- classes: {
35
+ return (h(Host, { key: '0fe34c3a91b7ac83a985eccbf47aa423c21123c1', class: {
37
36
  // COLORS
38
37
  'primary': this.color === 'primary',
39
38
  'secondary': this.color === 'secondary',
@@ -59,8 +58,7 @@ export class CpslText {
59
58
  'heading-l': this.variant === 'headingL',
60
59
  'heading-xl': this.variant === 'headingXL',
61
60
  'heading-2xl': this.variant === 'heading2XL',
62
- },
63
- })));
61
+ } }, this.getContent()));
64
62
  }
65
63
  static get is() { return "cpsl-text"; }
66
64
  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;;QAsBX,eAAU,GAAG,CAAC,EACpB,OAAO,GAKR,EAAE,EAAE;YACH,QAAQ,IAAI,CAAC,OAAO,EAAE,CAAC;gBACrB,KAAK,W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EXT_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"]}
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;;QAsBX,eAAU,GAAG,GAAG,EAAE;YACxB,QAAQ,IAAI,CAAC,OAAO,EAAE,CAAC;gBACrB,KAAK,WAAW,CAAC,CAAC,CAAC;oBACjB,OAAO,CACL,UAAI,IAAI,EAAE,YAAY;wBACpB,eAAa,CACV,CACN,CAAC;gBACJ,CAAC;gBACD,KAAK,UAAU,CAAC,CAAC,CAAC;oBAChB,OAAO,CACL,UAAI,IAAI,EAAE,YAAY;wBACpB,eAAa,CACV,C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AAM,EAAE,IAAI,CAAC,MAAM,KAAK,MAAM;gBAC9B,QAAQ;gBACR,UAAU,EAAE,IAAI,CAAC,OAAO,KAAK,SAAS;gBACtC,SAAS,EAAE,IAAI,CAAC,OAAO,KAAK,QAAQ;gBACpC,QAAQ,EAAE,IAAI,CAAC,OAAO,KAAK,OAAO;gBAClC,QAAQ,EAAE,IAAI,CAAC,OAAO,KAAK,OAAO;gBAClC,QAAQ,EAAE,IAAI,CAAC,OAAO,KAAK,OAAO;gBAClC,SAAS,EAAE,IAAI,CAAC,OAAO,KAAK,QAAQ;gBACpC,YAAY,EAAE,IAAI,CAAC,OAAO,KAAK,WAAW;gBAC1C,WAAW,EAAE,IAAI,CAAC,OAAO,KAAK,UAAU;gBACxC,WAAW,EAAE,IAAI,CAAC,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,IAEA,IAAI,CAAC,UAAU,EAAE,CACb,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 switch (this.variant) {\n case 'headingXS': {\n return (\n <h6 part={TEXT_EL_PART}>\n <slot></slot>\n </h6>\n );\n }\n case 'headingS': {\n return (\n <h5 part={TEXT_EL_PART}>\n <slot></slot>\n </h5>\n );\n }\n case 'headingM': {\n return (\n <h4 part={TEXT_EL_PART}>\n <slot></slot>\n </h4>\n );\n }\n case 'headingL': {\n return (\n <h3 part={TEXT_EL_PART}>\n <slot></slot>\n </h3>\n );\n }\n case 'headingXL': {\n return (\n <h2 part={TEXT_EL_PART}>\n <slot></slot>\n </h2>\n );\n }\n case 'heading2XL': {\n return (\n <h1 part={TEXT_EL_PART}>\n <slot></slot>\n </h1>\n );\n }\n default: {\n return (\n <p part={TEXT_EL_PART}>\n <slot></slot>\n </p>\n );\n }\n }\n };\n\n render() {\n return (\n <Host\n class={{\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 {this.getContent()}\n </Host>\n );\n }\n}\n"]}