@cdc/core 4.22.10 → 4.23.1

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 (75) 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/CoveMediaControls.js +139 -0
  27. package/helpers/DataTransform.js +92 -92
  28. package/helpers/cacheBustingString.js +3 -3
  29. package/helpers/events.js +5 -6
  30. package/helpers/fetchRemoteData.js +33 -33
  31. package/helpers/getViewport.js +15 -15
  32. package/helpers/numberFromString.js +7 -7
  33. package/helpers/updatePaletteNames.js +15 -17
  34. package/helpers/useDataVizClasses.js +38 -35
  35. package/helpers/validateFipsCodeLength.js +41 -56
  36. package/package.json +4 -2
  37. package/styles/_button-section.scss +35 -0
  38. package/styles/_data-table.scss +39 -27
  39. package/styles/_global.scss +29 -24
  40. package/styles/_mixins.scss +12 -12
  41. package/styles/_reset.scss +85 -16
  42. package/styles/_variables.scss +5 -5
  43. package/styles/base.scss +100 -48
  44. package/styles/heading-colors.scss +6 -2
  45. package/styles/loading.scss +62 -60
  46. package/styles/v2/base/_file-selector.scss +2 -2
  47. package/styles/v2/base/_general.scss +1 -1
  48. package/styles/v2/base/_reset.scss +2 -2
  49. package/styles/v2/base/index.scss +4 -4
  50. package/styles/v2/components/accordion.scss +13 -13
  51. package/styles/v2/components/button.scss +3 -3
  52. package/styles/v2/components/card.scss +1 -1
  53. package/styles/v2/components/data-designer.scss +7 -6
  54. package/styles/v2/components/editor.scss +52 -51
  55. package/styles/v2/components/guidance-block.scss +6 -6
  56. package/styles/v2/components/input/_input-check-radio.scss +7 -7
  57. package/styles/v2/components/input/_input-group.scss +2 -2
  58. package/styles/v2/components/input/_input-slider.scss +2 -3
  59. package/styles/v2/components/input/index.scss +6 -6
  60. package/styles/v2/components/loadspin.scss +1 -1
  61. package/styles/v2/components/modal.scss +2 -2
  62. package/styles/v2/components/overlay.scss +4 -4
  63. package/styles/v2/layout/_alert.scss +8 -8
  64. package/styles/v2/layout/_component.scss +1 -1
  65. package/styles/v2/layout/_data-table.scss +12 -11
  66. package/styles/v2/layout/_progression.scss +8 -6
  67. package/styles/v2/layout/index.scss +5 -5
  68. package/styles/v2/main.scss +7 -7
  69. package/styles/v2/themes/_color-definitions.scss +77 -24
  70. package/styles/v2/themes/index.scss +1 -1
  71. package/styles/v2/utils/_animations.scss +2 -2
  72. package/styles/v2/utils/_breakpoints.scss +53 -12
  73. package/styles/v2/utils/_variables.scss +5 -5
  74. package/styles/v2/utils/index.scss +8 -8
  75. package/styles/waiting.scss +22 -23
@@ -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
-