@cfpb/cfpb-design-system 3.7.1 → 3.9.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 (56) hide show
  1. package/CHANGELOG.md +28 -1
  2. package/dist/base/index.css +1 -1
  3. package/dist/base/index.css.map +2 -2
  4. package/dist/base/index.js +1 -1
  5. package/dist/base/index.js.map +1 -1
  6. package/dist/components/cfpb-buttons/index.css +1 -1
  7. package/dist/components/cfpb-buttons/index.css.map +2 -2
  8. package/dist/components/cfpb-buttons/index.js.map +1 -1
  9. package/dist/components/cfpb-expandables/index.css +1 -1
  10. package/dist/components/cfpb-expandables/index.css.map +2 -2
  11. package/dist/components/cfpb-expandables/index.js +1 -1
  12. package/dist/components/cfpb-expandables/index.js.map +1 -1
  13. package/dist/components/cfpb-forms/index.css +1 -1
  14. package/dist/components/cfpb-forms/index.css.map +2 -2
  15. package/dist/components/cfpb-forms/index.js +1 -1
  16. package/dist/components/cfpb-forms/index.js.map +1 -1
  17. package/dist/components/cfpb-layout/index.css +1 -1
  18. package/dist/components/cfpb-layout/index.css.map +2 -2
  19. package/dist/components/cfpb-layout/index.js +1 -1
  20. package/dist/components/cfpb-layout/index.js.map +1 -1
  21. package/dist/components/cfpb-notifications/index.css +1 -1
  22. package/dist/components/cfpb-notifications/index.css.map +2 -2
  23. package/dist/components/cfpb-notifications/index.js.map +1 -1
  24. package/dist/components/cfpb-pagination/index.css +1 -1
  25. package/dist/components/cfpb-pagination/index.css.map +2 -2
  26. package/dist/components/cfpb-pagination/index.js.map +1 -1
  27. package/dist/components/cfpb-tables/index.css +1 -1
  28. package/dist/components/cfpb-tables/index.css.map +2 -2
  29. package/dist/components/cfpb-tables/index.js.map +1 -1
  30. package/dist/components/cfpb-tooltips/index.css +1 -1
  31. package/dist/components/cfpb-tooltips/index.css.map +2 -2
  32. package/dist/components/cfpb-tooltips/index.js.map +1 -1
  33. package/dist/components/cfpb-typography/index.css +1 -1
  34. package/dist/components/cfpb-typography/index.css.map +2 -2
  35. package/dist/components/cfpb-typography/index.js +1 -1
  36. package/dist/components/cfpb-typography/index.js.map +1 -1
  37. package/dist/index.css +1 -1
  38. package/dist/index.css.map +2 -2
  39. package/dist/index.js +1 -1
  40. package/dist/index.js.map +1 -1
  41. package/dist/utilities/index.css +1 -1
  42. package/dist/utilities/index.css.map +2 -2
  43. package/dist/utilities/index.js +1 -1
  44. package/dist/utilities/index.js.map +1 -1
  45. package/package.json +1 -1
  46. package/src/abstracts/media-queries.scss +3 -12
  47. package/src/base/base.scss +6 -0
  48. package/src/base/normalize.scss +4 -0
  49. package/src/components/cfpb-expandables/expandable-group.scss +1 -1
  50. package/src/components/cfpb-expandables/expandable.scss +1 -1
  51. package/src/components/cfpb-expandables/summary.scss +5 -1
  52. package/src/components/cfpb-forms/form-alert.scss +5 -2
  53. package/src/components/cfpb-forms/tag.scss +2 -2
  54. package/src/components/cfpb-notifications/notification.scss +5 -5
  55. package/src/components/cfpb-notifications/vars.scss +0 -4
  56. package/src/components/cfpb-typography/mixins.scss +5 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cfpb/cfpb-design-system",
3
- "version": "3.7.1",
3
+ "version": "3.9.0",
4
4
  "description": "CFPB's UI framework",
5
5
  "exports": {
6
6
  ".": "./src/index.js",
@@ -12,7 +12,7 @@
12
12
  @mixin respond-to-min($bp) {
13
13
  $ems: math.div($bp, $base-font-size-px) + em;
14
14
 
15
- @media only all and (min-width: $ems) {
15
+ @media only screen and (min-width: $ems) {
16
16
  @content;
17
17
  }
18
18
  }
@@ -20,7 +20,7 @@
20
20
  @mixin respond-to-max($bp) {
21
21
  $ems: math.div($bp, $base-font-size-px) + em;
22
22
 
23
- @media only all and (max-width: $ems) {
23
+ @media only screen and (max-width: $ems) {
24
24
  @content;
25
25
  }
26
26
  }
@@ -29,16 +29,7 @@
29
29
  $ems1: math.div($bp1, $base-font-size-px) + em;
30
30
  $ems2: math.div($bp2, $base-font-size-px) + em;
31
31
 
32
- @media only all and (min-width: $ems1) and (max-width: $ems2) {
33
- @content;
34
- }
35
- }
36
-
37
- @mixin respond-to-print() {
38
- @media print {
39
- @content;
40
- }
41
- .print {
32
+ @media only screen and (min-width: $ems1) and (max-width: $ems2) {
42
33
  @content;
43
34
  }
44
35
  }
@@ -44,6 +44,12 @@ input[type='date'] {
44
44
  }
45
45
  }
46
46
 
47
+ // Globally remove inset border style from HR elements.
48
+ hr {
49
+ border: none;
50
+ border-top: 1px solid var(--gray-40);
51
+ }
52
+
47
53
  strong,
48
54
  b {
49
55
  font-weight: 600;
@@ -208,7 +208,11 @@ button,
208
208
  html input[type="button"], /* 1 */
209
209
  input[type="reset"],
210
210
  input[type="submit"] {
211
+ /* TODO: stylelint wants to convert `appearance: button` to `appearance: auto`
212
+ Investigate why. */
213
+ /* stylelint-disable */
211
214
  appearance: button; /* 2 */
215
+ /* stylelint-enable */
212
216
  cursor: pointer; /* 3 */
213
217
  }
214
218
 
@@ -22,7 +22,7 @@
22
22
  }
23
23
  }
24
24
 
25
- @include respond-to-print {
25
+ @media print {
26
26
  // Hide the interactive expandable cues when printing
27
27
  &__header[aria-expanded='true'] &__cue-close,
28
28
  &__header[aria-expanded='false'] &__cue-open {
@@ -158,7 +158,7 @@
158
158
  }
159
159
  }
160
160
 
161
- @include respond-to-print {
161
+ @media print {
162
162
  // Hide the interactive expandable cues when printing
163
163
  &__header[aria-expanded='true'] &__cue-close,
164
164
  &__header[aria-expanded='false'] &__cue-open {
@@ -43,14 +43,18 @@
43
43
 
44
44
  // 4px is needed because the 2px movement of the content's bounding box.
45
45
  top: calc(-100% + 2px);
46
+
47
+ /* TODO: stylelint wants to convert rgba to rgb. Investigate why. */
48
+ /* stylelint-disable */
46
49
  background: linear-gradient(
47
50
  to bottom,
48
51
  rgba(255, 255, 255, 0%) 0%,
49
52
  rgba(255, 255, 255, 100%) 100%
50
53
  );
54
+ /* stylelint-enable */
51
55
  content: '';
52
56
 
53
- @include respond-to-print {
57
+ @media print {
54
58
  background: none;
55
59
  }
56
60
  }
@@ -2,14 +2,17 @@
2
2
  @use '@cfpb/cfpb-design-system/src/abstracts' as *;
3
3
 
4
4
  .a-form-alert {
5
+ display: flex;
6
+ gap: math.div(5px, $base-font-size-px) + rem;
7
+
5
8
  .cf-icon-svg {
6
9
  color: $input-icon;
7
- float: left;
10
+ flex: none;
11
+ margin-top: math.div(1px, $base-font-size-px) + rem;
8
12
  }
9
13
 
10
14
  &__text {
11
15
  display: block;
12
- margin-left: math.div(20px, $base-font-size-px) + em;
13
16
  }
14
17
 
15
18
  &--success .cf-icon-svg {
@@ -42,7 +42,7 @@ button.a-tag-filter {
42
42
  }
43
43
 
44
44
  &:active {
45
- background-color: var(--teal);
45
+ background-color: var(--teal-60);
46
46
  }
47
47
  }
48
48
 
@@ -60,7 +60,7 @@ a.a-tag-filter {
60
60
  var(--teal),
61
61
  var(--teal),
62
62
  var(--teal),
63
- var(--teal)
63
+ var(--teal-60)
64
64
  );
65
65
  }
66
66
 
@@ -9,13 +9,12 @@
9
9
 
10
10
  .m-notification {
11
11
  display: none;
12
- position: relative;
13
- padding: $notification-padding-px;
12
+ padding: math.div(15px, $base-font-size-px) + rem;
14
13
  background: $notification-bg;
15
14
  border: 1px solid $notification-border;
16
15
 
17
16
  & > .cf-icon-svg {
18
- position: absolute;
17
+ flex: none;
19
18
  fill: $notification-icon;
20
19
  }
21
20
 
@@ -63,7 +62,8 @@
63
62
  }
64
63
 
65
64
  &--visible {
66
- display: block;
65
+ display: flex;
66
+ gap: math.div(5px, $base-font-size-px) + rem;
67
67
  }
68
68
 
69
69
  &__content {
@@ -72,7 +72,7 @@
72
72
 
73
73
  // Only adding left padding if an icon is present.
74
74
  .cf-icon-svg + &__content {
75
- padding-left: math.div(25px, $base-font-size-px) + rem;
75
+ flex-grow: 1;
76
76
  }
77
77
 
78
78
  &__message {
@@ -21,7 +21,3 @@ $notification-icon: var(--gray);
21
21
  $notification-icon-success: var(--green);
22
22
  $notification-icon-warning: var(--gold);
23
23
  $notification-icon-error: var(--red);
24
-
25
- // Sizing variables
26
-
27
- $notification-padding-px: 15px;
@@ -21,7 +21,12 @@
21
21
 
22
22
  .#{$jump-link-class}__text {
23
23
  color: var(--gray);
24
+
25
+ /* TODO: `word-break: break-word` is deprecated should be converted to
26
+ `overflow-wrap: anywhere` combined with `word-break: normal` */
27
+ /* stylelint-disable declaration-property-value-keyword-no-deprecated */
24
28
  word-break: break-word;
29
+ /* stylelint-enable declaration-property-value-keyword-no-deprecated */
25
30
  }
26
31
  } @else {
27
32
  font-weight: 500;