@usecapsule/core-components 3.8.0 → 3.8.2-dev.1
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/capsule.esm.js.map +1 -1
- package/dist/capsule/{p-acf73691.entry.js → p-b4250e4d.entry.js} +5 -5
- package/dist/capsule/p-b4250e4d.entry.js.map +1 -0
- package/dist/cjs/capsule.cjs.js +1 -1
- package/dist/cjs/cpsl-alert_34.cjs.entry.js +15 -16
- package/dist/cjs/cpsl-alert_34.cjs.entry.js.map +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/assets/icons/x.svg +1 -1
- package/dist/collection/components/cpsl-alert/cpsl-alert.js +19 -1
- package/dist/collection/components/cpsl-alert/cpsl-alert.js.map +1 -1
- package/dist/collection/components/cpsl-select-item/cpsl-select-item.css +1 -0
- package/dist/collection/components/cpsl-text/cpsl-text.css +295 -190
- package/dist/collection/components/cpsl-text/cpsl-text.js +10 -12
- package/dist/collection/components/cpsl-text/cpsl-text.js.map +1 -1
- package/dist/esm/capsule.js +1 -1
- package/dist/esm/cpsl-alert_34.entry.js +15 -16
- package/dist/esm/cpsl-alert_34.entry.js.map +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/types/components/cpsl-alert/cpsl-alert.d.ts +4 -0
- package/dist/types/components.d.ts +8 -0
- package/package.json +8 -3
- package/dist/capsule/p-acf73691.entry.js.map +0 -1
@@ -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
|
-
|
75
|
-
|
76
|
-
|
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
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
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
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
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
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
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
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
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
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
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
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
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
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
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
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
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
|
-
|
168
|
-
|
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
|
177
|
-
h1
|
178
|
-
h2
|
179
|
-
h3
|
180
|
-
h4
|
181
|
-
h5
|
182
|
-
|
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
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
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
|
-
|
195
|
-
|
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
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
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
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
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
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
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
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
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
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
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
|
-
|
252
|
-
|
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
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
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
|
-
|
270
|
-
|
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
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
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
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
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
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
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 = (
|
5
|
+
this.getContent = () => {
|
6
6
|
switch (this.variant) {
|
7
7
|
case 'headingXS': {
|
8
|
-
return (h("h6", {
|
8
|
+
return (h("h6", { part: TEXT_EL_PART }, h("slot", null)));
|
9
9
|
}
|
10
10
|
case 'headingS': {
|
11
|
-
return (h("h5", {
|
11
|
+
return (h("h5", { part: TEXT_EL_PART }, h("slot", null)));
|
12
12
|
}
|
13
13
|
case 'headingM': {
|
14
|
-
return (h("h4", {
|
14
|
+
return (h("h4", { part: TEXT_EL_PART }, h("slot", null)));
|
15
15
|
}
|
16
16
|
case 'headingL': {
|
17
|
-
return (h("h3", {
|
17
|
+
return (h("h3", { part: TEXT_EL_PART }, h("slot", null)));
|
18
18
|
}
|
19
19
|
case 'headingXL': {
|
20
|
-
return (h("h2", {
|
20
|
+
return (h("h2", { part: TEXT_EL_PART }, h("slot", null)));
|
21
21
|
}
|
22
22
|
case 'heading2XL': {
|
23
|
-
return (h("h1", {
|
23
|
+
return (h("h1", { part: TEXT_EL_PART }, h("slot", null)));
|
24
24
|
}
|
25
25
|
default: {
|
26
|
-
return (h("p", {
|
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: '
|
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,
|
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 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"]}
|