@cdc/core 4.22.10 → 4.22.11

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 (73) hide show
  1. package/README.md +1 -1
  2. package/components/AdvancedEditor.js +52 -67
  3. package/components/ErrorBoundary.jsx +10 -11
  4. package/components/GlobalContext.jsx +2 -6
  5. package/components/LegendCircle.jsx +3 -4
  6. package/components/Loading.jsx +14 -12
  7. package/components/Waiting.jsx +14 -5
  8. package/components/elements/Button.jsx +34 -45
  9. package/components/elements/Card.jsx +1 -1
  10. package/components/inputs/InputCheckbox.jsx +32 -35
  11. package/components/inputs/InputGroup.jsx +38 -17
  12. package/components/inputs/InputSelect.jsx +27 -23
  13. package/components/inputs/InputText.jsx +9 -25
  14. package/components/inputs/InputToggle.jsx +29 -33
  15. package/components/managers/DataDesigner.jsx +87 -64
  16. package/components/ui/Accordion.jsx +18 -30
  17. package/components/ui/Icon.jsx +34 -35
  18. package/components/ui/LoadSpin.jsx +6 -11
  19. package/components/ui/Modal.jsx +40 -44
  20. package/components/ui/Overlay.jsx +12 -23
  21. package/components/ui/OverlayFrame.jsx +1 -5
  22. package/components/ui/Tooltip.jsx +8 -28
  23. package/data/colorPalettes.js +29 -266
  24. package/data/dataDesignerTables.js +107 -107
  25. package/data/themes.js +13 -13
  26. package/helpers/DataTransform.js +92 -92
  27. package/helpers/cacheBustingString.js +3 -3
  28. package/helpers/events.js +5 -6
  29. package/helpers/fetchRemoteData.js +31 -33
  30. package/helpers/getViewport.js +15 -15
  31. package/helpers/numberFromString.js +7 -7
  32. package/helpers/updatePaletteNames.js +15 -17
  33. package/helpers/useDataVizClasses.js +38 -35
  34. package/helpers/validateFipsCodeLength.js +41 -56
  35. package/package.json +2 -2
  36. package/styles/_data-table.scss +32 -27
  37. package/styles/_global.scss +29 -24
  38. package/styles/_mixins.scss +12 -12
  39. package/styles/_reset.scss +85 -16
  40. package/styles/_variables.scss +5 -5
  41. package/styles/base.scss +99 -48
  42. package/styles/heading-colors.scss +6 -2
  43. package/styles/loading.scss +62 -60
  44. package/styles/v2/base/_file-selector.scss +2 -2
  45. package/styles/v2/base/_general.scss +1 -1
  46. package/styles/v2/base/_reset.scss +2 -2
  47. package/styles/v2/base/index.scss +4 -4
  48. package/styles/v2/components/accordion.scss +13 -13
  49. package/styles/v2/components/button.scss +3 -3
  50. package/styles/v2/components/card.scss +1 -1
  51. package/styles/v2/components/data-designer.scss +7 -6
  52. package/styles/v2/components/editor.scss +52 -51
  53. package/styles/v2/components/guidance-block.scss +6 -6
  54. package/styles/v2/components/input/_input-check-radio.scss +7 -7
  55. package/styles/v2/components/input/_input-group.scss +2 -2
  56. package/styles/v2/components/input/_input-slider.scss +2 -3
  57. package/styles/v2/components/input/index.scss +6 -6
  58. package/styles/v2/components/loadspin.scss +1 -1
  59. package/styles/v2/components/modal.scss +2 -2
  60. package/styles/v2/components/overlay.scss +4 -4
  61. package/styles/v2/layout/_alert.scss +8 -8
  62. package/styles/v2/layout/_component.scss +1 -1
  63. package/styles/v2/layout/_data-table.scss +12 -11
  64. package/styles/v2/layout/_progression.scss +8 -6
  65. package/styles/v2/layout/index.scss +5 -5
  66. package/styles/v2/main.scss +7 -7
  67. package/styles/v2/themes/_color-definitions.scss +77 -24
  68. package/styles/v2/themes/index.scss +1 -1
  69. package/styles/v2/utils/_animations.scss +2 -2
  70. package/styles/v2/utils/_breakpoints.scss +53 -12
  71. package/styles/v2/utils/_variables.scss +5 -5
  72. package/styles/v2/utils/index.scss +8 -8
  73. package/styles/waiting.scss +22 -23
@@ -18,7 +18,7 @@
18
18
  //TODO find fix
19
19
  //background-image: url(~@cdc/core/assets/icon-minus.svg);
20
20
  background-size: 15px 15px; // Need to define both for IE11
21
- background-position: right .7em center;
21
+ background-position: right 0.7em center;
22
22
  background-repeat: no-repeat;
23
23
  border: $lightGray 1px solid;
24
24
  border-bottom: 0;
@@ -46,7 +46,7 @@
46
46
  appearance: none;
47
47
 
48
48
  * {
49
- box-sizing: border-box
49
+ box-sizing: border-box;
50
50
  }
51
51
 
52
52
  thead {
@@ -61,7 +61,7 @@
61
61
 
62
62
  th,
63
63
  td {
64
- padding: .5em 1.3em .5em .7em;
64
+ padding: 0.5em 1.3em 0.5em 0.7em;
65
65
  line-height: normal;
66
66
  position: relative;
67
67
  text-align: left;
@@ -75,7 +75,7 @@
75
75
 
76
76
  th:last-child,
77
77
  td:last-child {
78
- border-right: 0
78
+ border-right: 0;
79
79
  }
80
80
  }
81
81
 
@@ -84,7 +84,7 @@
84
84
  width: 100%;
85
85
 
86
86
  &:hover {
87
- background: rgba(0, 0, 0, 0.05)
87
+ background: rgba(0, 0, 0, 0.05);
88
88
  }
89
89
  }
90
90
  }
@@ -94,17 +94,17 @@
94
94
  min-width: 100%; // Needed to fill content up
95
95
 
96
96
  &:last-child {
97
- border-bottom: 0
97
+ border-bottom: 0;
98
98
  }
99
99
  }
100
100
 
101
101
  td {
102
102
  position: relative;
103
- padding: .3em .7em;
103
+ padding: 0.3em 0.7em;
104
104
  border-right: 1px solid rgba(0, 0, 0, 0.1);
105
105
 
106
106
  a {
107
- padding: .3em .7em;
107
+ padding: 0.3em 0.7em;
108
108
  position: absolute;
109
109
  top: 0;
110
110
  bottom: 0;
@@ -146,7 +146,7 @@
146
146
  .sort {
147
147
  background-color: darken($mediumGray, 10%);
148
148
  background-repeat: no-repeat;
149
- background-position: right .5em center;
149
+ background-position: right 0.5em center;
150
150
  background-size: 10px 5px;
151
151
  }
152
152
 
@@ -185,11 +185,12 @@
185
185
  position: relative;
186
186
  user-select: none;
187
187
 
188
- th, td {
188
+ th,
189
+ td {
189
190
  width: 50%;
190
191
 
191
192
  &::before {
192
- content: "\00a0";
193
+ content: '\00a0';
193
194
  }
194
195
  }
195
196
  }
@@ -14,7 +14,7 @@
14
14
  h3 {
15
15
  font-size: 1.3rem;
16
16
  font-weight: 600;
17
- margin-bottom: .3rem;
17
+ margin-bottom: 0.3rem;
18
18
  }
19
19
 
20
20
  p {
@@ -35,7 +35,7 @@
35
35
  left: 0;
36
36
  min-height: 30%;
37
37
  text-align: center;
38
- background: rgba(255, 255, 255, .5);
38
+ background: rgba(255, 255, 255, 0.5);
39
39
  z-index: 3;
40
40
 
41
41
  span {
@@ -56,8 +56,10 @@
56
56
  transform: scale(1.3);
57
57
  color: #777;
58
58
 
59
- &.sm, &.xs, &.xxs {
60
- transform: scale(0.7)
59
+ &.sm,
60
+ &.xs,
61
+ &.xxs {
62
+ transform: scale(0.7);
61
63
  }
62
64
 
63
65
  div + div {
@@ -72,10 +74,10 @@
72
74
  background-color: currentColor;
73
75
  border: 0 solid currentColor;
74
76
  border-radius: 100%;
75
- animation: ball-beat .7s -.15s infinite linear;
77
+ animation: ball-beat 0.7s -0.15s infinite linear;
76
78
 
77
79
  &:nth-child(2n-1) {
78
- animation-delay: -.5s;
80
+ animation-delay: -0.5s;
79
81
  }
80
82
  }
81
83
  }
@@ -1,5 +1,5 @@
1
- @import "alert";
2
- @import "component";
3
- @import "data-table";
4
- @import "progression";
5
- @import "tooltip";
1
+ @import 'alert';
2
+ @import 'component';
3
+ @import 'data-table';
4
+ @import 'progression';
5
+ @import 'tooltip';
@@ -9,7 +9,7 @@
9
9
 
10
10
  :focus,
11
11
  [tabindex]:focus-visible {
12
- outline: 2px solid rgba(255,102,1,.9);
12
+ outline: 2px solid rgba(255, 102, 1, 0.9);
13
13
  }
14
14
 
15
15
  margin: 0;
@@ -29,13 +29,13 @@
29
29
  }
30
30
 
31
31
  .warning {
32
- padding: .75em 1em;
32
+ padding: 0.75em 1em;
33
33
  margin: 1em 0;
34
- background-color: #FFD2D2;
35
- color: #D8000C;
36
- font-size: .8em;
37
- border: #D8000C 1px solid;
38
- border-radius: .4em;
34
+ background-color: #ffd2d2;
35
+ color: #d8000c;
36
+ font-size: 0.8em;
37
+ border: #d8000c 1px solid;
38
+ border-radius: 0.4em;
39
39
 
40
40
  strong {
41
41
  font-weight: 600;
@@ -1,17 +1,72 @@
1
- @use "sass:string";
1
+ @use 'sass:string';
2
2
 
3
3
  $theme: (
4
- 'amber': ('#fbab18', '#ffd54f', '#ffecb3', '#fff7e1'),
5
- 'blue': ('#005eaa', '#88c3ea', '#c0e9ff', '#edf9ff'),
6
- 'brown': ('#705043', '#ad907b', '#d7ccc8', '#f2ebe8'),
7
- 'cyan': ('#007B91', '#65b0bd', '#cce5e9', '#ebf5f6'),
8
- 'green': ('#4b830d', '#84bc49', '#dcedc8', '#f1f8e9'),
9
- 'indigo': ('#26418f', '#92a6dd', '#dee8ff', '#f2f6ff'),
10
- 'orange': ('#bb4d00', '#ffad42', '#ffe97d', '#fff4cf'),
11
- 'pink': ('#af4448', '#e57373', '#ffc2c2', '#ffe7e7'),
12
- 'purple': ('#712177', '#b890bb', '#e3d3e4', '#f7f2f7'),
13
- 'slate': ('#29434e', '#7e9ba5', '#b6c6d2', '#e2e8ed'),
14
- 'teal': ('#00695c', '#4ebaaa', '#ceece7', '#ebf7f5' )
4
+ 'amber': (
5
+ '#fbab18',
6
+ '#ffd54f',
7
+ '#ffecb3',
8
+ '#fff7e1'
9
+ ),
10
+ 'blue': (
11
+ '#005eaa',
12
+ '#88c3ea',
13
+ '#c0e9ff',
14
+ '#edf9ff'
15
+ ),
16
+ 'brown': (
17
+ '#705043',
18
+ '#ad907b',
19
+ '#d7ccc8',
20
+ '#f2ebe8'
21
+ ),
22
+ 'cyan': (
23
+ '#007B91',
24
+ '#65b0bd',
25
+ '#cce5e9',
26
+ '#ebf5f6'
27
+ ),
28
+ 'green': (
29
+ '#4b830d',
30
+ '#84bc49',
31
+ '#dcedc8',
32
+ '#f1f8e9'
33
+ ),
34
+ 'indigo': (
35
+ '#26418f',
36
+ '#92a6dd',
37
+ '#dee8ff',
38
+ '#f2f6ff'
39
+ ),
40
+ 'orange': (
41
+ '#bb4d00',
42
+ '#ffad42',
43
+ '#ffe97d',
44
+ '#fff4cf'
45
+ ),
46
+ 'pink': (
47
+ '#af4448',
48
+ '#e57373',
49
+ '#ffc2c2',
50
+ '#ffe7e7'
51
+ ),
52
+ 'purple': (
53
+ '#712177',
54
+ '#b890bb',
55
+ '#e3d3e4',
56
+ '#f7f2f7'
57
+ ),
58
+ 'slate': (
59
+ '#29434e',
60
+ '#7e9ba5',
61
+ '#b6c6d2',
62
+ '#e2e8ed'
63
+ ),
64
+ 'teal': (
65
+ '#00695c',
66
+ '#4ebaaa',
67
+ '#ceece7',
68
+ '#ebf7f5'
69
+ )
15
70
  );
16
71
 
17
72
  // .type-sparkline class used for creating sparklines
@@ -31,8 +86,7 @@ $theme: (
31
86
  border-bottom-width: 4px;
32
87
  }
33
88
 
34
- &.theme-#{$theme-name} {
35
-
89
+ &.theme-#{$theme-name} {
36
90
  .cove-component__content:not(.no-borders).component--has-borderColorTheme {
37
91
  border-left: 1px solid string.unquote(nth($theme-colors, 1));
38
92
  border-right: 1px solid string.unquote(nth($theme-colors, 1));
@@ -43,7 +97,7 @@ $theme: (
43
97
  .cove-component__inner:not(.component--has-title) .cove-component__content.component--has-borderColorTheme:not(.no-borders) {
44
98
  border-top: 1px solid string.unquote(nth($theme-colors, 1));
45
99
  }
46
-
100
+
47
101
  .cove-component__inner:not(.component--has-title) .cove-component__content {
48
102
  border-top: 1px solid #ccc;
49
103
  }
@@ -53,7 +107,7 @@ $theme: (
53
107
  }
54
108
 
55
109
  .cove-component__content.component--has-accent {
56
- border-left: .5rem solid string.unquote(nth($theme-colors, 1)) !important;
110
+ border-left: 0.5rem solid string.unquote(nth($theme-colors, 1)) !important;
57
111
  }
58
112
 
59
113
  .cove-component__content.component--has-background:not(.component--hideBackgroundColor) {
@@ -62,7 +116,6 @@ $theme: (
62
116
  }
63
117
 
64
118
  &.theme-#{$theme-name} {
65
-
66
119
  .cove-component__content:not(.no-borders).component--has-borderColorTheme {
67
120
  border-left: 1px solid string.unquote(nth($theme-colors, 1));
68
121
  border-right: 1px solid string.unquote(nth($theme-colors, 1));
@@ -73,7 +126,7 @@ $theme: (
73
126
  .cove-component__inner:not(.component--has-title) .cove-component__content.component--has-borderColorTheme:not(.no-borders) {
74
127
  border-top: 1px solid string.unquote(nth($theme-colors, 1));
75
128
  }
76
-
129
+
77
130
  // should probably be in color definitions but logically makes sense here.
78
131
  .cove-component__inner:not(.component--has-title) .cove-component__content {
79
132
  border-top: 1px solid #ccc;
@@ -84,7 +137,7 @@ $theme: (
84
137
  }
85
138
 
86
139
  .cove-component__content.component--has-accent {
87
- border-left: .5rem solid string.unquote(nth($theme-colors, 1)) !important;
140
+ border-left: 0.5rem solid string.unquote(nth($theme-colors, 1)) !important;
88
141
  }
89
142
 
90
143
  .cove-component__content.component--has-background:not(.component--hideBackgroundColor) {
@@ -95,17 +148,17 @@ $theme: (
95
148
  }
96
149
 
97
150
  $baseColor: #333;
98
- $blue: #005EAA;
99
- $lightestGray: #F2F2F2;
100
- $lightGray: #C7C7C7;
151
+ $blue: #005eaa;
152
+ $lightestGray: #f2f2f2;
153
+ $lightGray: #c7c7c7;
101
154
  $mediumGray: #565656;
102
155
  $darkGray: #333;
103
156
  $red: #d8000c;
104
157
  $white: #fff;
105
158
 
106
- $primary: #005eaa !default;
159
+ $primary: #005eaa !default;
107
160
  $secondary: #88c3ea !default;
108
- $tertiary: #c0e9ff !default;
161
+ $tertiary: #c0e9ff !default;
109
162
  $quaternary: #edf9ff !default;
110
163
 
111
164
  $purple-primary: #712177 !default;
@@ -1 +1 @@
1
- @import "color-definitions";
1
+ @import 'color-definitions';
@@ -32,8 +32,8 @@
32
32
 
33
33
  @keyframes ball-beat {
34
34
  50% {
35
- opacity: .2;
36
- transform: scale(.75);
35
+ opacity: 0.2;
36
+ transform: scale(0.75);
37
37
  }
38
38
  100% {
39
39
  opacity: 1;
@@ -1,18 +1,59 @@
1
1
  // Breakpoint Classes
2
2
  @mixin breakpoint($class) {
3
- @if $class == xs {@media (max-width: 767.98px) { @content; }}
4
- @else if $class == sm {@media (min-width: 768px) { @content; }}
5
- @else if $class == md {@media (min-width: 960px) { @content; }}
6
- @else if $class == lg {@media (min-width: 1170px) { @content; }}
7
- @else if $class == xl {@media (min-width: 1280px) { @content; }}
8
- @else {@warn "Breakpoint mixin supports: xs, sm, md, lg, xl";}
3
+ @if $class == xs {
4
+ @media (max-width: 767.98px) {
5
+ @content;
6
+ }
7
+ } @else if $class == sm {
8
+ @media (min-width: 768px) {
9
+ @content;
10
+ }
11
+ } @else if $class == md {
12
+ @media (min-width: 960px) {
13
+ @content;
14
+ }
15
+ } @else if $class == lg {
16
+ @media (min-width: 1170px) {
17
+ @content;
18
+ }
19
+ } @else if $class == xl {
20
+ @media (min-width: 1280px) {
21
+ @content;
22
+ }
23
+ } @else {
24
+ @warn "Breakpoint mixin supports: xs, sm, md, lg, xl";
25
+ }
9
26
  }
10
27
 
11
28
  @mixin breakpointClass($class) {
12
- @if $class == xs { &.xs, &.xxs {@content;} }
13
- @else if $class == sm { &.sm, &.md, &.lg, &.xl {@content;} }
14
- @else if $class == md { &.md, &.lg, &.xl {@content;} }
15
- @else if $class == lg { &.lg, &.xl {@content;} }
16
- @else if $class == xl { &.xl {@content;} }
17
- @else {@warn "Breakpoint Class mixin supports: xs, sm, md, lg, xl";}
29
+ @if $class == xs {
30
+ &.xs,
31
+ &.xxs {
32
+ @content;
33
+ }
34
+ } @else if $class == sm {
35
+ &.sm,
36
+ &.md,
37
+ &.lg,
38
+ &.xl {
39
+ @content;
40
+ }
41
+ } @else if $class == md {
42
+ &.md,
43
+ &.lg,
44
+ &.xl {
45
+ @content;
46
+ }
47
+ } @else if $class == lg {
48
+ &.lg,
49
+ &.xl {
50
+ @content;
51
+ }
52
+ } @else if $class == xl {
53
+ &.xl {
54
+ @content;
55
+ }
56
+ } @else {
57
+ @warn "Breakpoint Class mixin supports: xs, sm, md, lg, xl";
58
+ }
18
59
  }
@@ -1,9 +1,9 @@
1
1
  $cove-breakpoints: (
2
- xs: 480px,
3
- sm: 768px,
4
- md: 960px,
5
- lg: 1170px,
6
- xl: 1280px
2
+ xs: 480px,
3
+ sm: 768px,
4
+ md: 960px,
5
+ lg: 1170px,
6
+ xl: 1280px
7
7
  );
8
8
  $editorWidth: 350px;
9
9
  $transition-expo-out: cubic-bezier(0.16, 1, 0.3, 1);
@@ -1,9 +1,9 @@
1
- @import "variables";
2
- @import "mixins";
1
+ @import 'variables';
2
+ @import 'mixins';
3
3
 
4
- @import "align";
5
- @import "animations";
6
- @import "breakpoints";
7
- @import "functions";
8
- @import "grid";
9
- @import "spacers";
4
+ @import 'align';
5
+ @import 'animations';
6
+ @import 'breakpoints';
7
+ @import 'functions';
8
+ @import 'grid';
9
+ @import 'spacers';
@@ -1,26 +1,25 @@
1
1
  .cdc-open-viz-module {
2
- @import "mixins";
3
- .waiting {
4
- &.collapsed {
5
- padding: 2em !important;
6
- }
7
- @include emptyState;
8
- align-items: flex-start;
9
- padding-top: 250px;
10
- .waiting-container {
11
- max-width: 400px;
12
- }
13
- h3 {
14
- font-size: 1.3rem;
15
- font-weight: 600;
16
- margin-bottom: .3rem;
17
- }
18
- p {
19
- font-size: 1em;
20
- strong {
21
- font-weight: bold;
22
- }
23
- }
2
+ @import 'mixins';
3
+ .waiting {
4
+ &.collapsed {
5
+ padding: 2em !important;
24
6
  }
7
+ @include emptyState;
8
+ align-items: flex-start;
9
+ padding-top: 250px;
10
+ .waiting-container {
11
+ max-width: 400px;
12
+ }
13
+ h3 {
14
+ font-size: 1.3rem;
15
+ font-weight: 600;
16
+ margin-bottom: 0.3rem;
17
+ }
18
+ p {
19
+ font-size: 1em;
20
+ strong {
21
+ font-weight: bold;
22
+ }
23
+ }
24
+ }
25
25
  }
26
-