@castlabs/ui 7.3.0 → 7.4.0

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.
Files changed (38) hide show
  1. package/dist/castlabs-ui-editor.common.js +50 -50
  2. package/dist/castlabs-ui-editor.common.js.map +1 -1
  3. package/dist/castlabs-ui-editor.umd.js +51 -51
  4. package/dist/castlabs-ui-editor.umd.js.map +1 -1
  5. package/dist/castlabs-ui.common.js +3 -3
  6. package/dist/castlabs-ui.common.js.map +1 -1
  7. package/dist/castlabs-ui.css +3 -3
  8. package/dist/castlabs-ui.umd.js +7 -7
  9. package/dist/castlabs-ui.umd.js.map +1 -1
  10. package/package.json +1 -1
  11. package/src/components/ClAlert/style.scss +1 -0
  12. package/src/components/ClButton/style.scss +6 -3
  13. package/src/components/ClCard/style.variables.scss +1 -1
  14. package/src/components/ClDropdown/style.scss +1 -3
  15. package/src/components/ClFooter/style.scss +1 -2
  16. package/src/components/ClIconotron/style.scss +1 -1
  17. package/src/components/form/ClFieldFile/style.scss +3 -1
  18. package/src/components/form/ClFieldGroup/style.scss +1 -1
  19. package/src/components/modal/ClModal/style.scss +2 -2
  20. package/src/components/navigation/ClNavSide/ClNavDrawer/style.scss +11 -3
  21. package/src/components/navigation/ClNavTop/style.scss +2 -7
  22. package/src/components/section/ClSectionHeadline/style.scss +1 -1
  23. package/src/components/table/ClTableCel/ID/style.scss +2 -3
  24. package/src/components/table/ClTableCel/Links/style.scss +3 -3
  25. package/src/components/text/ClCopy/style.scss +7 -6
  26. package/src/components/text/ClHashtag/style.scss +1 -0
  27. package/src/components/text/ClLinkExternal/style.scss +42 -34
  28. package/src/components/text/ClPlan/style.scss +1 -0
  29. package/src/components/text/ClRole/style.scss +1 -0
  30. package/src/styles/abstracts/app.scss +1 -0
  31. package/src/styles/abstracts/color.scss +21 -37
  32. package/src/styles/abstracts/fontawesome.scss +16 -6
  33. package/src/styles/abstracts/form.scss +1 -8
  34. package/src/styles/abstracts/typography.scss +84 -65
  35. package/src/styles/layout/color.scss +12 -7
  36. package/src/styles/layout/typography.scss +1 -1
  37. /package/dist/fonts/{DM_Mono_500.3f958442.woff2 → DM_Mono_500.03f95844.woff2} +0 -0
  38. /package/dist/fonts/{fa-brands-400.5faf8763.woff2 → fa-brands-400.05faf876.woff2} +0 -0
@@ -19,14 +19,15 @@
19
19
  /// Add a fontawesome icon ::after an element.
20
20
  ///
21
21
  /// @example scss
22
- /// @include cl-fontawesome-after('\f2bd', 0, .5em, .25em);
22
+ /// @include cl-fontawesome-after('\f2bd', #a0a0a0, 0, .5em, .25em);
23
23
  ///
24
24
  /// @param {value} $codepoint UTF8 codepoint.
25
+ /// @param {value} $color Color of icon. Defaults to inherent/no set color.
25
26
  /// @param {value} $offset Optional horizontal offset (em). Defaults to 0.
26
27
  /// @param {value} $scale Optinal icon scale (font-size) of the icon. Defaults to 1.
27
28
  /// @param {value} $top Optional vertical offset (em). Defaults to 0.
28
29
  /// @output ::after element.
29
- @mixin cl-fontawesome-after($codepoint, $offset: 0, $scale: 1em, $top: 0) {
30
+ @mixin cl-fontawesome-after($codepoint, $color: inherit, $offset: 0, $scale: 1em, $top: 0) {
30
31
  $cl-fontawesome-box: 1em;
31
32
 
32
33
  margin-right: $cl-fontawesome-box;
@@ -34,7 +35,7 @@
34
35
 
35
36
  &::after {
36
37
  @include cl-fontawesome($codepoint);
37
-
38
+ @include set-property-if-not(color, inherit, $color);
38
39
  @include set-property-if-not(font-size, 1em, $scale);
39
40
 
40
41
  font-weight: 400;
@@ -43,19 +44,24 @@
43
44
  top: $top;
44
45
  width: 0;
45
46
  }
47
+
48
+ &:hover::after {
49
+ color: inherit;
50
+ }
46
51
  }
47
52
 
48
53
  /// Add a fontawesome icon ::before an element.
49
54
  ///
50
55
  /// @example scss
51
- /// @include cl-fontawesome-before('\f2bd', 0, .5em, .25em);
56
+ /// @include cl-fontawesome-before('\f2bd', #a0a0a0, 0, .5em, .25em);
52
57
  ///
53
58
  /// @param {value} $codepoint UTF8 codepoint.
59
+ /// @param {value} $color Color of icon. Defaults to inherent/no set color.
54
60
  /// @param {value} $offset Optional horizontal offset (em). Defaults to 0.
55
61
  /// @param {value} $scale Optinal icon scale (font-size) of the icon. Defaults to 1.
56
62
  /// @param {value} $top Optional vertical offset (em). Defaults to 0.
57
63
  /// @output ::before element.
58
- @mixin cl-fontawesome-before($codepoint, $offset: 0, $scale: 1em, $top: 0) {
64
+ @mixin cl-fontawesome-before($codepoint, $color: inherit, $offset: 0, $scale: 1em, $top: 0) {
59
65
  $cl-fontawesome-box: 1em;
60
66
 
61
67
  margin-left: $cl-fontawesome-box;
@@ -63,7 +69,7 @@
63
69
 
64
70
  &::before {
65
71
  @include cl-fontawesome($codepoint);
66
-
72
+ @include set-property-if-not(color, inherit, $color);
67
73
  @include set-property-if-not(font-size, 1em, $scale);
68
74
 
69
75
  font-weight: 400;
@@ -73,6 +79,10 @@
73
79
  top: $top;
74
80
  width: 0;
75
81
  }
82
+
83
+ &:hover::before {
84
+ color: inherit;
85
+ }
76
86
  }
77
87
 
78
88
  @mixin cl-fontawesome-postfix($codepoint) {
@@ -49,8 +49,7 @@ $form-spacing-label-input: px(2);
49
49
  400,
50
50
  $form-field-fontsize,
51
51
  $form-field-line-height,
52
- 0.025em,
53
- 80%
52
+ 0.025em
54
53
  );
55
54
  }
56
55
 
@@ -64,12 +63,6 @@ $form-spacing-label-input: px(2);
64
63
  background: $color-focus;
65
64
  color: $color-ci-eggshell;
66
65
  }
67
-
68
- // border-color: $color-ci-berry !important;
69
- // box-shadow: none;
70
- // box-shadow: 0 0 0 1px $color-ci-berry inset;
71
- // color: var(--cl-color-text);
72
- // outline: none;
73
66
  }
74
67
 
75
68
  @mixin cl-form-focus {
@@ -16,8 +16,8 @@
16
16
  // h3 40
17
17
  // h4 32
18
18
  // body xl: 32 700
19
- // body lg: 24 700
20
- // body md: 20 400/700
19
+ // body lg: 24 400 -> 22 in admin
20
+ // body md: 20 400/700 -> 18 in admin
21
21
  // body sm: 14 400/700
22
22
  // button: 18 700
23
23
  // navigation: 16 400/700
@@ -74,11 +74,28 @@ $typography-monospace-line-height: 1.375;
74
74
  }
75
75
  }
76
76
 
77
- @mixin typography-link($color: inherit, $color-hover: $color, $underline: 1) {
77
+ @mixin typography-link(
78
+ $color: inherit,
79
+ $color-hover: var(--cl-color-hover),
80
+ $color-underline: var(--cl-color-link),
81
+ $color-underline-hover: $color-hover
82
+ ) {
78
83
  color: $color;
79
84
  display: inline;
85
+ text-decoration: underline $color-underline;
86
+
87
+ &:hover {
88
+ color: $color-hover;
89
+ cursor: pointer;
90
+ text-decoration: underline $color-underline-hover;
91
+ }
92
+ }
80
93
 
81
- @if $underline <= 0 {
94
+ @mixin typography-link-legacy($color: inherit, $color-hover: $color, $underline: 1) {
95
+ color: $color;
96
+ display: inline;
97
+
98
+ @if $underline == transprarent {
82
99
  text-decoration: none;
83
100
  }
84
101
 
@@ -89,8 +106,10 @@ $typography-monospace-line-height: 1.375;
89
106
  }
90
107
 
91
108
  @mixin typography-link-invisible {
92
- @include typography-link(inherit, inherit, 0);
109
+ @include typography-link(var(--cl-color-text), $color-ci-red, transparent, $color-ci-red);
93
110
  @include cl-color-focus-outline(var(--cl-color-focus), 2px);
111
+
112
+ border-radius: $brand-border-radius-minor;
94
113
  }
95
114
 
96
115
  @mixin cl-btn-a($line-height-px) {
@@ -112,7 +131,6 @@ $typography-monospace-line-height: 1.375;
112
131
  outline-offset: -2px;
113
132
  padding: 0;
114
133
  text-align: inherit;
115
- text-decoration: underline;
116
134
  vertical-align: inherit;
117
135
 
118
136
  &:focus-visible {
@@ -131,25 +149,13 @@ $typography-monospace-line-height: 1.375;
131
149
  }
132
150
 
133
151
  %cl-a {
134
- @include typography-link(var(--cl-color-link), $color-ci-red);
152
+ @include typography-link;
135
153
  @include cl-color-focus-outline(var(--cl-color-focus), 2px);
136
154
  }
137
155
 
138
- %cl-a-text {
139
- @include typography-link(var(--cl-color-text), $color-ci-ash);
140
- }
141
-
142
- %cl-a-transparent {
143
- @include typography-link(var(--cl-color-text), $color-ci-ash);
144
- }
145
-
146
- %cl-a-none {
147
- @include typography-link(var(--cl-color-text), $color-ci-ash);
148
- }
149
-
150
156
  %cl-a-btn {
151
157
  // a link that is more an embedded button
152
- @extend %cl-a-text;
158
+ @include typography-link;
153
159
 
154
160
  background-color: transparent;
155
161
  border: 0;
@@ -177,7 +183,7 @@ $typography-responsive-scale: 0.8;
177
183
  px(32),
178
184
  px(32 * $typography-sans-line-height),
179
185
  0.01em,
180
- 100,
186
+ 100%,
181
187
  -0.1em
182
188
  );
183
189
 
@@ -199,7 +205,7 @@ $typography-responsive-scale: 0.8;
199
205
  px(32 * $typography-responsive-scale),
200
206
  px(32 * $typography-responsive-scale * $typography-sans-line-height),
201
207
  0.01em,
202
- 100,
208
+ 100%,
203
209
  -0.1em
204
210
  );
205
211
  }
@@ -207,14 +213,16 @@ $typography-responsive-scale: 0.8;
207
213
  }
208
214
 
209
215
  %cl-p-large {
210
- // body lg: 24 700
216
+ // body lg: 21 400
217
+ $font-size: 22;
218
+
211
219
  @include typography-font(
212
220
  $typography-sans-font-list,
213
221
  400,
214
- px(24),
215
- px(24 * $typography-sans-line-height),
222
+ px($font-size),
223
+ px(30),
216
224
  0.01em,
217
- 100,
225
+ 100%,
218
226
  -0.1em
219
227
  );
220
228
 
@@ -233,10 +241,10 @@ $typography-responsive-scale: 0.8;
233
241
  @include typography-font(
234
242
  $typography-sans-font-list,
235
243
  400,
236
- px(24 * $typography-responsive-scale),
237
- px(24 * $typography-responsive-scale * $typography-sans-line-height),
244
+ px($font-size * $typography-responsive-scale),
245
+ px(30 * $typography-responsive-scale),
238
246
  0.01em,
239
- 100,
247
+ 100%,
240
248
  -0.1em
241
249
  );
242
250
  }
@@ -244,14 +252,16 @@ $typography-responsive-scale: 0.8;
244
252
  }
245
253
 
246
254
  %cl-p-medium {
247
- // body md: 20 400/700
255
+ // body md: 18 400/700
256
+ $font-size: 17;
257
+
248
258
  @include typography-font(
249
259
  $typography-sans-font-list,
250
260
  400,
251
- px(20),
252
- px(20 * $typography-sans-line-height),
253
- 0.01em,
254
- 100,
261
+ px($font-size),
262
+ px(25),
263
+ 0,
264
+ 100%,
255
265
  -0.1em
256
266
  );
257
267
 
@@ -270,10 +280,10 @@ $typography-responsive-scale: 0.8;
270
280
  @include typography-font(
271
281
  $typography-sans-font-list,
272
282
  400,
273
- px(20 * $typography-responsive-scale),
274
- px(20 * $typography-responsive-scale * $typography-sans-line-height),
275
- 0.01em,
276
- 100,
283
+ px($font-size * $typography-responsive-scale),
284
+ px(25 * $typography-responsive-scale),
285
+ 0,
286
+ 100%,
277
287
  -0.1em
278
288
  );
279
289
  }
@@ -289,7 +299,7 @@ $typography-responsive-scale: 0.8;
289
299
  px(14),
290
300
  px(14 * $typography-sans-line-height),
291
301
  0.01em,
292
- 100,
302
+ 100%,
293
303
  -0.1em
294
304
  );
295
305
 
@@ -311,7 +321,7 @@ $typography-responsive-scale: 0.8;
311
321
  px(14 * $typography-responsive-scale),
312
322
  px(14 * $typography-responsive-scale * $typography-sans-line-height),
313
323
  0.01em,
314
- 100,
324
+ 100%,
315
325
  -0.1em
316
326
  );
317
327
  }
@@ -319,13 +329,16 @@ $typography-responsive-scale: 0.8;
319
329
  }
320
330
 
321
331
  %cl-h0 {
332
+ // for use in blogs/WP
333
+ $font-size: 100;
334
+
322
335
  @include typography-font(
323
336
  $typography-sans-font-list,
324
337
  700,
325
- px(100),
326
- px(100 * $typography-sans-line-height),
338
+ px($font-size),
339
+ px($font-size * $typography-sans-line-height),
327
340
  0.01em,
328
- 100,
341
+ 100%,
329
342
  -0.1em
330
343
  );
331
344
 
@@ -335,10 +348,10 @@ $typography-responsive-scale: 0.8;
335
348
  @include typography-font(
336
349
  $typography-sans-font-list,
337
350
  700,
338
- px(100 * $typography-responsive-scale),
339
- px(100 * $typography-responsive-scale * $typography-sans-line-height),
351
+ px($font-size * $typography-responsive-scale),
352
+ px($font-size * $typography-responsive-scale * $typography-sans-line-height),
340
353
  0.01em,
341
- 100,
354
+ 100%,
342
355
  -0.1em
343
356
  );
344
357
  }
@@ -346,13 +359,15 @@ $typography-responsive-scale: 0.8;
346
359
  }
347
360
 
348
361
  %cl-h1 {
362
+ $font-size: 36;
363
+
349
364
  @include typography-font(
350
365
  $typography-sans-font-list,
351
366
  700,
352
- px(48),
353
- px(48 * 1.1),
367
+ px($font-size),
368
+ px($font-size * 1.1),
354
369
  0.01em,
355
- 100,
370
+ 100%,
356
371
  -0.1em
357
372
  );
358
373
 
@@ -362,10 +377,10 @@ $typography-responsive-scale: 0.8;
362
377
  @include typography-font(
363
378
  $typography-sans-font-list,
364
379
  700,
365
- px(48 * $typography-responsive-scale),
366
- px(48 * $typography-responsive-scale * 1.1),
380
+ px($font-size * $typography-responsive-scale),
381
+ px($font-size * $typography-responsive-scale * 1.1),
367
382
  0.01em,
368
- 100,
383
+ 100%,
369
384
  -0.1em
370
385
  );
371
386
  }
@@ -373,13 +388,15 @@ $typography-responsive-scale: 0.8;
373
388
  }
374
389
 
375
390
  %cl-h2 {
391
+ $font-size: 30;
392
+
376
393
  @include typography-font(
377
394
  $typography-sans-font-list,
378
395
  700,
379
- px(40),
380
- px(40 * 1.1),
396
+ px($font-size),
397
+ px($font-size * 1.1),
381
398
  0.01em,
382
- 100,
399
+ 100%,
383
400
  -0.1em
384
401
  );
385
402
 
@@ -389,10 +406,10 @@ $typography-responsive-scale: 0.8;
389
406
  @include typography-font(
390
407
  $typography-sans-font-list,
391
408
  700,
392
- px(40 * $typography-responsive-scale),
393
- px(40 * $typography-responsive-scale * 1.1),
409
+ px($font-size * $typography-responsive-scale),
410
+ px($font-size * $typography-responsive-scale * 1.1),
394
411
  0.01em,
395
- 100,
412
+ 100%,
396
413
  -0.1em
397
414
  );
398
415
  }
@@ -400,13 +417,15 @@ $typography-responsive-scale: 0.8;
400
417
  }
401
418
 
402
419
  %cl-h3 {
420
+ $font-size: 24;
421
+
403
422
  @include typography-font(
404
423
  $typography-sans-font-list,
405
424
  700,
406
- px(32),
407
- px(32 * 1.1),
425
+ px($font-size),
426
+ px($font-size * 1.1),
408
427
  0.01em,
409
- 100,
428
+ 100%,
410
429
  -0.1em
411
430
  );
412
431
 
@@ -416,10 +435,10 @@ $typography-responsive-scale: 0.8;
416
435
  @include typography-font(
417
436
  $typography-sans-font-list,
418
437
  700,
419
- px(32 * $typography-responsive-scale),
420
- px(32 * $typography-responsive-scale * 1.1),
438
+ px($font-size * $typography-responsive-scale),
439
+ px($font-size * $typography-responsive-scale * 1.1),
421
440
  0.01em,
422
- 100,
441
+ 100%,
423
442
  -0.1em
424
443
  );
425
444
  }
@@ -462,7 +481,7 @@ $typography-responsive-scale: 0.8;
462
481
  border: $brand-line-width solid var(--cl-color-text);
463
482
  border-radius: $brand-border-radius;
464
483
  clip-path: inset(0 round 20px);
465
- font-size: px(16);
484
+ font-size: px(15);
466
485
  line-height: 1.4;
467
486
  margin-top: $spacing-small;
468
487
  padding: $spacing-small;
@@ -125,17 +125,22 @@
125
125
  #{'--cl-color-text'}: $color-ci-brick;
126
126
  }
127
127
 
128
+ .cl-color-text-honey {
129
+ #{'--cl-color-text'}: $color-ci-honey;
130
+ }
131
+
132
+ .cl-color-text-leaf {
133
+ #{'--cl-color-text'}: $color-ci-leaf;
134
+ }
135
+
128
136
  .cl-color-text-sea {
129
137
  #{'--cl-color-text'}: $color-ci-sea;
130
138
  }
131
139
 
140
+ .cl-color-text-orchid {
141
+ #{'--cl-color-text'}: $color-ci-orchid;
142
+ }
143
+
132
144
  .cl-color-text-steel {
133
145
  #{'--cl-color-text'}: $color-ci-steel;
134
146
  }
135
-
136
- // --- admin/secondary colors -------------------------------------------
137
-
138
- //
139
- // .cl-color-haze {
140
- // @extend %cl-color-haze;
141
- // }
@@ -239,7 +239,7 @@ hr {
239
239
  @include spacing-before-auto($typography-hr-spacing);
240
240
 
241
241
  border: 0;
242
- border-bottom: $brand-line-width solid var(--cl-color-text);
242
+ border-bottom: $brand-line-width solid var(--cl-color-line);
243
243
  margin-bottom: $typography-hr-spacing;
244
244
  opacity: 1;
245
245