@cdc/core 4.26.2 → 4.26.3

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 (186) hide show
  1. package/LICENSE +201 -0
  2. package/_stories/Gallery.Charts.stories.tsx +1 -1
  3. package/_stories/Gallery.DataBite.stories.tsx +1 -1
  4. package/_stories/Gallery.Maps.stories.tsx +1 -1
  5. package/_stories/PageART.stories.tsx +1 -1
  6. package/_stories/PageBRFSS.stories.tsx +1 -1
  7. package/_stories/PageCancerRegistries.stories.tsx +1 -1
  8. package/_stories/PageEasternEquineEncephalitis.stories.tsx +3 -3
  9. package/_stories/PageExcessiveAlcoholUse.stories.tsx +1 -1
  10. package/_stories/PageMaternalMortality.stories.tsx +1 -1
  11. package/_stories/PageOralHealth.stories.tsx +1 -1
  12. package/_stories/PageRespiratory.stories.tsx +4 -4
  13. package/_stories/PageSmokingTobacco.stories.tsx +1 -1
  14. package/_stories/PageStateDiabetesProfiles.stories.tsx +1 -1
  15. package/_stories/PageWastewater.stories.tsx +4 -4
  16. package/_stories/VegaImport.stories.tsx +3 -3
  17. package/assets/callout-flag.svg +7 -0
  18. package/components/AdvancedEditor/EmbedEditor.tsx +1 -1
  19. package/components/Alert/components/Alert.styles.css +2 -2
  20. package/components/ComboBox/combobox.styles.css +48 -48
  21. package/components/CustomColorsEditor/CustomColorsEditor.css +53 -53
  22. package/components/DataTable/DataTable.tsx +46 -18
  23. package/components/DataTable/DataTableStandAlone.tsx +1 -0
  24. package/components/DataTable/components/ChartHeader.tsx +21 -12
  25. package/components/DataTable/components/MapHeader.tsx +34 -28
  26. package/components/DataTable/components/SortIcon/sort-icon.css +5 -5
  27. package/components/DataTable/data-table.css +50 -52
  28. package/components/DataTable/helpers/applyCustomOrder.ts +17 -0
  29. package/components/DataTable/helpers/getChartCellValue.ts +10 -7
  30. package/components/DataTable/helpers/getMapDataTableColumnKeys.ts +22 -0
  31. package/components/DataTable/helpers/mapCellMatrix.tsx +33 -23
  32. package/components/DataTable/helpers/tests/mapCellMatrix.test.ts +33 -0
  33. package/components/DownloadButton.tsx +14 -6
  34. package/components/EditorPanel/ColumnsEditor.tsx +38 -31
  35. package/components/EditorPanel/CustomSortOrder.tsx +94 -0
  36. package/components/EditorPanel/DataTableEditor.tsx +139 -23
  37. package/components/EditorPanel/EditorPanel.styles.css +71 -71
  38. package/components/EditorPanel/EditorPanel.tsx +3 -8
  39. package/components/EditorPanel/EditorPanelDispatch.tsx +4 -4
  40. package/components/EditorPanel/FootnotesEditor.tsx +2 -2
  41. package/components/EditorPanel/VizFilterEditor/NestedDropdownEditor.tsx +7 -6
  42. package/components/EditorPanel/VizFilterEditor/VizFilterEditor.tsx +12 -10
  43. package/components/EditorPanel/components/MarkupVariablesEditor.tsx +160 -106
  44. package/components/EditorPanel/components/PanelMarkup.tsx +5 -1
  45. package/{styles/v2/components → components/EditorPanel}/editor.scss +67 -13
  46. package/components/EditorPanel/sections/StyleTreatmentSection.tsx +99 -0
  47. package/components/EditorPanel/sections/VisualSection.tsx +11 -0
  48. package/components/EditorWrapper/editor-wrapper.style.css +1 -1
  49. package/components/Filters/Filters.tsx +3 -5
  50. package/components/Filters/components/Tabs.tsx +19 -7
  51. package/{styles → components/Filters}/filters.scss +3 -3
  52. package/components/Footnotes/FootnotesStandAlone.tsx +4 -2
  53. package/components/HeaderThemeSelector/HeaderThemeSelector.css +61 -5
  54. package/components/Layout/components/Responsive.tsx +14 -6
  55. package/components/Layout/components/Sidebar/components/Sidebar.tsx +1 -1
  56. package/components/Layout/components/Sidebar/components/sidebar.styles.scss +12 -18
  57. package/components/Layout/components/Visualization/index.tsx +39 -38
  58. package/components/Layout/components/Visualization/visualizations.scss +232 -15
  59. package/components/Layout/components/VisualizationContainer.test.tsx +67 -0
  60. package/components/Layout/components/VisualizationContainer.tsx +37 -0
  61. package/components/Layout/components/VisualizationContent.test.tsx +182 -0
  62. package/components/Layout/components/VisualizationContent.tsx +75 -0
  63. package/components/Layout/index.tsx +5 -5
  64. package/components/Layout/styles/editor-utils.scss +3 -3
  65. package/components/Layout/styles/editor.scss +4 -4
  66. package/components/Legend/Legend.Gradient.tsx +7 -1
  67. package/components/Loader/loader.styles.css +2 -2
  68. package/components/Loading.jsx +1 -1
  69. package/components/MediaControls.tsx +10 -2
  70. package/components/MultiSelect/multiselect.styles.css +19 -19
  71. package/components/NestedDropdown/nesteddropdown.styles.css +15 -15
  72. package/components/PaletteSelector/PaletteSelector.css +15 -15
  73. package/components/RichTooltip/richTooltip.css +6 -6
  74. package/components/Table/table.styles.css +2 -2
  75. package/components/Waiting.tsx +1 -1
  76. package/components/_stories/Filters.stories.tsx +1 -1
  77. package/components/_stories/styles.scss +0 -1
  78. package/components/elements/Button.jsx +1 -1
  79. package/components/elements/Card.jsx +1 -1
  80. package/{styles/v2/components → components/elements}/button.scss +9 -8
  81. package/components/inputs/InputCheckbox.jsx +1 -1
  82. package/components/inputs/InputSelect.tsx +1 -1
  83. package/components/inputs/InputText.jsx +1 -1
  84. package/components/inputs/InputToggle.tsx +1 -1
  85. package/{styles/v2/components/input → components/inputs}/_input-check-radio.scss +2 -2
  86. package/{styles/v2/components/input → components/inputs}/_input-group.scss +3 -3
  87. package/{styles/v2/components/input → components/inputs}/_input-slider.scss +2 -2
  88. package/{styles/v2/components/input → components/inputs}/_input.scss +5 -5
  89. package/{styles/v2/components/input → components/inputs}/index.scss +2 -2
  90. package/{styles → components}/loading.scss +1 -1
  91. package/components/managers/DataDesigner.tsx +1 -1
  92. package/{styles/v2/components → components/managers}/data-designer.scss +6 -7
  93. package/components/ui/Accordion.jsx +1 -1
  94. package/components/ui/Icon.tsx +1 -1
  95. package/components/ui/LoadSpin.jsx +1 -1
  96. package/components/ui/Modal.jsx +1 -1
  97. package/components/ui/Overlay.jsx +1 -1
  98. package/components/ui/Title/index.test.tsx +34 -0
  99. package/components/ui/Title/index.tsx +24 -7
  100. package/components/ui/Title/title.styles.css +119 -25
  101. package/components/ui/Tooltip.tsx +1 -1
  102. package/components/ui/_stories/Title.stories.tsx +1 -1
  103. package/{styles/v2/components → components/ui}/accordion.scss +3 -3
  104. package/components/ui/accordion.styles.css +11 -11
  105. package/{styles/v2/components → components/ui}/modal.scss +2 -2
  106. package/{styles/v2/components → components/ui}/overlay.scss +6 -6
  107. package/{styles/v2/components → components}/ui/tooltip.scss +1 -1
  108. package/{styles → components}/waiting.scss +9 -3
  109. package/devTemplate/dev.js +50 -0
  110. package/dist/cove-main.css +528 -231
  111. package/dist/cove-main.css.map +1 -1
  112. package/generateViteConfig.js +2 -2
  113. package/helpers/backfillDefaults.ts +35 -0
  114. package/helpers/constants.ts +12 -0
  115. package/helpers/cove/date.ts +32 -3
  116. package/helpers/cove/number.ts +29 -15
  117. package/helpers/coveUpdateWorker.ts +12 -8
  118. package/helpers/displayDataAsText.ts +1 -1
  119. package/helpers/embed/embedHelper.js +13 -2
  120. package/helpers/embed/index.ts +0 -4
  121. package/helpers/extractDataAndMetadata.ts +20 -0
  122. package/helpers/fetchRemoteData.ts +14 -8
  123. package/helpers/labelHash.ts +9 -0
  124. package/helpers/markupProcessor.ts +56 -38
  125. package/helpers/prepareScreenshot.ts +6 -3
  126. package/helpers/testing.ts +1 -1
  127. package/helpers/tests/abbreviateNumber.test.ts +59 -0
  128. package/helpers/tests/backfillDefaults.test.ts +253 -0
  129. package/helpers/tests/date.test.ts +46 -0
  130. package/helpers/tests/extractDataAndMetadata.test.ts +93 -0
  131. package/helpers/tests/markupProcessor.test.ts +315 -124
  132. package/helpers/tests/number.test.ts +42 -0
  133. package/helpers/tests/prepareScreenshot.test.ts +28 -28
  134. package/helpers/tests/testStandaloneBuild.ts +36 -26
  135. package/helpers/tests/useDataVizClasses.test.ts +66 -0
  136. package/helpers/tests/visualizationWrapperUsage.test.ts +57 -0
  137. package/helpers/useDataVizClasses.ts +13 -7
  138. package/helpers/ver/4.24.4.ts +24 -0
  139. package/helpers/ver/4.26.3.ts +44 -0
  140. package/helpers/ver/4.26.4.ts +31 -0
  141. package/helpers/ver/tests/4.26.3.test.ts +168 -0
  142. package/helpers/ver/tests/4.26.4.test.ts +88 -0
  143. package/helpers/ver/tests/coveUpdateWorker.test.ts +57 -0
  144. package/package.json +2 -2
  145. package/styles/_global.scss +7 -7
  146. package/styles/_reset.scss +2 -2
  147. package/styles/{v2/base → base}/_file-selector.scss +4 -4
  148. package/styles/{v2/base → base}/_general.scss +2 -4
  149. package/styles/{v2/base → base}/index.scss +1 -1
  150. package/styles/base.scss +107 -165
  151. package/styles/cove-main.scss +3 -6
  152. package/styles/layout/_component.scss +110 -0
  153. package/styles/{v2/layout → layout}/_data-table.scss +7 -7
  154. package/styles/layout/_wrapper-padding.scss +27 -0
  155. package/styles/{v2/main.scss → main.scss} +3 -1
  156. package/styles/{v2/themes → themes}/_color-definitions.scss +46 -41
  157. package/styles/{_accessibility.scss → utils/_accessibility.scss} +1 -1
  158. package/styles/{_global-variables.scss → utils/_properties.scss} +133 -112
  159. package/styles/{v2/utils → utils}/index.scss +2 -1
  160. package/types/Axis.ts +2 -0
  161. package/types/ComponentStyles.ts +1 -0
  162. package/types/ConfigureData.ts +1 -0
  163. package/types/MarkupInclude.ts +1 -0
  164. package/types/MarkupVariable.ts +2 -1
  165. package/types/Palette.ts +1 -0
  166. package/types/Table.ts +9 -0
  167. package/types/Visualization.ts +1 -0
  168. package/styles/_common-components.css +0 -73
  169. package/styles/_variables.scss +0 -63
  170. package/styles/v2/layout/_component.scss +0 -21
  171. package/styles/v2/utils/_variables.scss +0 -9
  172. package/{styles/v2/components/card.scss → components/elements/card.css} +2 -2
  173. /package/{styles/v2/components → components/ui}/icon.scss +0 -0
  174. /package/{styles/v2/components → components/ui}/loadspin.scss +0 -0
  175. /package/styles/{v2/base → base}/_heading.scss +0 -0
  176. /package/styles/{v2/base → base}/_reset.scss +0 -0
  177. /package/styles/{v2/layout → layout}/_alert.scss +0 -0
  178. /package/styles/{v2/layout → layout}/_progression.scss +0 -0
  179. /package/styles/{v2/layout → layout}/_tooltip.scss +0 -0
  180. /package/styles/{v2/layout → layout}/index.scss +0 -0
  181. /package/styles/{v2/themes → themes}/index.scss +0 -0
  182. /package/styles/{v2/utils → utils}/_align.scss +0 -0
  183. /package/styles/{v2/utils → utils}/_animations.scss +0 -0
  184. /package/styles/{v2/utils → utils}/_breakpoints.scss +0 -0
  185. /package/styles/{v2/utils → utils}/_grid.scss +0 -0
  186. /package/styles/{v2/utils → utils}/_mixins.scss +0 -0
@@ -1,7 +1,7 @@
1
1
  // Only frontend styles are applied in WCMS/TP
2
2
  // This helps match those styles when viewing in the editor
3
3
  .modal.cdc-cove-editor *:focus-visible,
4
- .cdc-open-viz-module *:focus-visible {
4
+ .cove-visualization *:focus-visible {
5
5
  outline: dashed 2px rgb(0, 122, 153) !important;
6
6
  outline-offset: 3px !important;
7
7
  border-radius: 6px !important;
@@ -1,112 +1,133 @@
1
- $colors: (
2
- 'baseColor': #333,
3
- 'blue': #005eaa,
4
- 'lightestGray': #f2f2f2,
5
- 'gray2': #f5f5f5,
6
- 'lightGray': #c7c7c7,
7
- 'mediumGray': #565656,
8
- 'darkGray': #333,
9
- 'red': #d8000c,
10
- 'white': #fff,
11
- 'silver': #eee,
12
-
13
- 'primary': #005eaa,
14
- 'secondary': #88c3ea,
15
- 'tertiary': #c0e9ff,
16
- 'quaternary': #edf9ff,
17
-
18
- 'purple-primary': #712177,
19
- 'purple-secondary': #b890bb,
20
- 'purple-tertiary': #e3d3e4,
21
- 'purple-quaternary': #f7f2f7,
22
-
23
- 'brown-primary': #705043,
24
- 'brown-secondary': #ad907b,
25
- 'brown-tertiary': #d7ccc8,
26
- 'brown-quaternary': #f2ebe8,
27
-
28
- 'teal-primary': #00695c,
29
- 'teal-secondary': #4ebaaa,
30
- 'teal-tertiary': #ceece7,
31
- 'teal-quaternary': #ebf7f5,
32
-
33
- 'pink-primary': #af4448,
34
- 'pink-secondary': #e57373,
35
- 'pink-tertiary': #ffc2c2,
36
- 'pink-quaternary': #ffe7e7,
37
-
38
- 'orange-primary': #bb4d00,
39
- 'orange-secondary': #ffad42,
40
- 'orange-tertiary': #ffe97d,
41
- 'orange-quaternary': #fff4cf,
42
-
43
- 'slate-primary': #29434e,
44
- 'slate-secondary': #7e9ba5,
45
- 'slate-tertiary': #b6c6d2,
46
- 'slate-quaternary': #e2e8ed,
47
-
48
- 'indigo-primary': #26418f,
49
- 'indigo-secondary': #92a6dd,
50
- 'indigo-tertiary': #dee8ff,
51
- 'indigo-quaternary': #f2f6ff,
52
-
53
- 'cyan-primary': #006778,
54
- 'cyan-secondary': #65b0bd,
55
- 'cyan-tertiary': #cce5e9,
56
- 'cyan-quaternary': #ebf5f6,
57
-
58
- 'green-primary': #4b830d,
59
- 'green-secondary': #84bc49,
60
- 'green-tertiary': #dcedc8,
61
- 'green-quaternary': #f1f8e9,
62
-
63
- 'amber-primary': #fbab18,
64
- 'amber-secondary': #ffd54f,
65
- 'amber-tertiary': #ffecb3,
66
- 'amber-quaternary': #fff7e1,
67
-
68
- 'cool-gray-90': #1c1d1f,
69
- 'cool-gray-50': #71767a,
70
- 'cool-gray-30': #a9aeb1,
71
- 'cool-gray-10': #dfe1e2,
72
- 'colors-blue-vivid-60': #005ea2
73
- );
74
-
75
- @mixin theme() {
76
- :root {
77
- @each $key, $value in $colors {
78
- --#{$key}: #{$value};
79
- }
80
- }
81
- }
82
-
83
- @include theme();
84
-
85
- :root {
86
- // Spacing
87
- --editorContentPadding: 30px;
88
- --editorWidth: 350px;
89
- --space-between-legend-item-rows: 1rem;
90
- --space-between-legend-item-columns: 1.5rem;
91
- // Breakpoints
92
- --breakpoint-xs: 480px;
93
- --breakpoint-sm: 768px;
94
- --breakpoint-md: 960px;
95
- --breakpoint-lg: 1170px;
96
- --breakpoint-xl: 1280px;
97
- // Font
98
- --app-font-main: 'Nunito', sans-serif;
99
- --app-font-secondary: 'Poppins', sans-serif;
100
- // Font sizes
101
- --legend-title-font-size: 1rem;
102
- --legend-description-font-size: 1rem;
103
- --legend-item-font-size: 0.889rem;
104
- --download-link-font-size: 0.772rem;
105
- --filter-select-font-size: 0.833rem;
106
- --filter-label-font-size: 0.889rem;
107
- --filter-buttons-font-size: 0.889rem;
108
- --superTitle-font-size: 0.833rem;
109
- --title-font-size: 1.222rem;
110
- --territory-label-font-size: 0.809rem;
111
- --territory-label-font-size-mobile: 0.556rem;
112
- }
1
+ // ─────────────────────────────────────────────────────────────────────────────
2
+ // CSS Custom Properties — single source of truth for all design values.
3
+ // SCSS variables below are kept only where SCSS features require them:
4
+ // $cove-breakpoints — used in breakpoint mixins
5
+ // $blue, $red, $mediumGray — used in color.adjust() calls (migrate later)
6
+ // ─────────────────────────────────────────────────────────────────────────────
7
+
8
+ // Required for breakpoint mixins (cannot be replaced by CSS vars)
9
+ $cove-breakpoints: (
10
+ xs: 480px,
11
+ sm: 768px,
12
+ md: 960px,
13
+ lg: 1170px,
14
+ xl: 1280px
15
+ );
16
+
17
+ // Required for color.adjust() calls — to be removed in a future phase
18
+ $blue: #005eaa;
19
+ $red: #d8000c;
20
+ $mediumGray: #565656;
21
+
22
+ // Color map — drives the CSS custom property generation below
23
+ $colors: (
24
+ 'baseColor': #333,
25
+ 'blue': #005eaa,
26
+ 'lightestGray': #f2f2f2,
27
+ 'gray2': #f5f5f5,
28
+ 'lightGray': #c7c7c7,
29
+ 'mediumGray': #565656,
30
+ 'darkGray': #333,
31
+ 'red': #d8000c,
32
+ 'white': #fff,
33
+ 'silver': #eee,
34
+ 'primary': #005eaa,
35
+ 'secondary': #88c3ea,
36
+ 'tertiary': #c0e9ff,
37
+ 'quaternary': #edf9ff,
38
+ 'purple-primary': #712177,
39
+ 'purple-secondary': #b890bb,
40
+ 'purple-tertiary': #e3d3e4,
41
+ 'purple-quaternary': #f7f2f7,
42
+ 'brown-primary': #705043,
43
+ 'brown-secondary': #ad907b,
44
+ 'brown-tertiary': #d7ccc8,
45
+ 'brown-quaternary': #f2ebe8,
46
+ 'teal-primary': #00695c,
47
+ 'teal-secondary': #4ebaaa,
48
+ 'teal-tertiary': #ceece7,
49
+ 'teal-quaternary': #ebf7f5,
50
+ 'pink-primary': #af4448,
51
+ 'pink-secondary': #e57373,
52
+ 'pink-tertiary': #ffc2c2,
53
+ 'pink-quaternary': #ffe7e7,
54
+ 'orange-primary': #bb4d00,
55
+ 'orange-secondary': #ffad42,
56
+ 'orange-tertiary': #ffe97d,
57
+ 'orange-quaternary': #fff4cf,
58
+ 'slate-primary': #29434e,
59
+ 'slate-secondary': #7e9ba5,
60
+ 'slate-tertiary': #b6c6d2,
61
+ 'slate-quaternary': #e2e8ed,
62
+ 'indigo-primary': #26418f,
63
+ 'indigo-secondary': #92a6dd,
64
+ 'indigo-tertiary': #dee8ff,
65
+ 'indigo-quaternary': #f2f6ff,
66
+ 'cyan-primary': #006778,
67
+ 'cyan-secondary': #65b0bd,
68
+ 'cyan-tertiary': #cce5e9,
69
+ 'cyan-quaternary': #ebf5f6,
70
+ 'green-primary': #4b830d,
71
+ 'green-secondary': #84bc49,
72
+ 'green-tertiary': #dcedc8,
73
+ 'green-quaternary': #f1f8e9,
74
+ 'amber-primary': #fbab18,
75
+ 'amber-secondary': #ffd54f,
76
+ 'amber-tertiary': #ffecb3,
77
+ 'amber-quaternary': #fff7e1,
78
+ 'cool-gray-90': #1c1d1f,
79
+ 'cool-gray-50': #71767a,
80
+ 'cool-gray-30': #a9aeb1,
81
+ 'cool-gray-10': #dfe1e2,
82
+ 'colors-gray-cool-70': #3d4551,
83
+ 'colors-blue-vivid-60': #005ea2,
84
+ 'colors-cyan-10': #eff9fa,
85
+ 'colors-cyan-15': #dff2f6,
86
+ 'colors-cyan-60v': #007a99
87
+ );
88
+
89
+ @mixin theme() {
90
+ :root {
91
+ @each $key, $value in $colors {
92
+ --#{$key}: #{$value};
93
+ }
94
+ }
95
+ }
96
+
97
+ @include theme();
98
+
99
+ :root {
100
+ // Spacing
101
+ --editorContentPadding: 30px;
102
+ --editorWidth: 350px;
103
+ --space-between-legend-item-rows: 1rem;
104
+ --space-between-legend-item-columns: 1.5rem;
105
+ // Breakpoints
106
+ --breakpoint-xs: 480px;
107
+ --breakpoint-sm: 768px;
108
+ --breakpoint-md: 960px;
109
+ --breakpoint-lg: 1170px;
110
+ --breakpoint-xl: 1280px;
111
+ // Font
112
+ --app-font-main: 'Nunito', sans-serif;
113
+ --app-font-secondary: 'Poppins', sans-serif;
114
+ --app-font-size: 1rem;
115
+
116
+ // Font sizes
117
+ --legend-title-font-size: 1rem;
118
+ --legend-description-font-size: 1rem;
119
+ --legend-item-font-size: 0.889rem;
120
+ --download-link-font-size: 0.772rem;
121
+ --filter-select-font-size: 0.833rem;
122
+ --filter-label-font-size: 0.889rem;
123
+ --filter-buttons-font-size: 0.889rem;
124
+ --superTitle-font-size: 0.833rem;
125
+ --title-font-size: 1.222rem;
126
+ --territory-label-font-size: 0.809rem;
127
+ --territory-label-font-size-mobile: 0.556rem;
128
+ --visualization-body-font-family: var(--app-font-main);
129
+ --visualization-meta-font-size: 0.889rem;
130
+ --visualization-body-line-height: 1.5;
131
+ // Transitions
132
+ --transition-expo-out: cubic-bezier(0.16, 1, 0.3, 1);
133
+ }
@@ -1,6 +1,7 @@
1
- @import 'variables';
1
+ @import 'properties';
2
2
  @import 'mixins';
3
3
 
4
+ @import 'accessibility';
4
5
  @import 'align';
5
6
  @import 'animations';
6
7
  @import 'breakpoints';
package/types/Axis.ts CHANGED
@@ -27,6 +27,7 @@ export type Axis = {
27
27
  max?: string
28
28
  maxTickRotation?: number
29
29
  min?: string
30
+ smallestLeftAxisMax?: number
30
31
  numTicks?: number
31
32
  padding?: number
32
33
  paddingPercent?: number
@@ -37,6 +38,7 @@ export type Axis = {
37
38
  rightLabel?: string
38
39
  rightLabelOffsetSize?: number
39
40
  rightMax?: string
41
+ smallestRightAxisMax?: number
40
42
  rightNumTicks?: number
41
43
  sortDates?: boolean
42
44
  sortKey?: string
@@ -4,4 +4,5 @@ export type ComponentStyles = {
4
4
  background: boolean
5
5
  hideBackgroundColor: boolean
6
6
  borderColorTheme: boolean
7
+ highlightWrappers?: boolean
7
8
  }
@@ -3,6 +3,7 @@ import { DataDescription } from './DataDescription'
3
3
  export type ConfigureData = {
4
4
  dataDescription: Partial<DataDescription>
5
5
  data?: Object[]
6
+ dataMetadata?: Record<string, string>
6
7
  formattedData?: Object[]
7
8
  dataKey: string // This is the key of the dataset in the config
8
9
  }
@@ -18,6 +18,7 @@ export type MarkupIncludeConfig = Visualization & {
18
18
  useInlineHTML: boolean
19
19
  }
20
20
  data?: Object[]
21
+ dataMetadata?: Record<string, string>
21
22
  enableMarkupVariables?: boolean
22
23
  filters?: VizFilter[]
23
24
  formattedData: {}
@@ -5,12 +5,13 @@ export type MarkupCondition = {
5
5
  }
6
6
 
7
7
  export type MarkupVariable = {
8
- columnName: string
8
+ columnName?: string
9
9
  conditions: MarkupCondition[]
10
10
  name: string
11
11
  tag: string
12
12
  addCommas?: boolean
13
13
  hideOnNull?: boolean
14
+ metadataKey?: string
14
15
  }
15
16
 
16
17
  export type MarkupConfig = {
package/types/Palette.ts CHANGED
@@ -10,6 +10,7 @@ export type PaletteBackup = {
10
10
  export type Palette = {
11
11
  name?: string
12
12
  customColors?: string[]
13
+ customColorsOrdered?: string[]
13
14
  version?: PaletteVersion
14
15
  isReversed?: boolean
15
16
  backups?: PaletteBackup[]
package/types/Table.ts CHANGED
@@ -3,6 +3,12 @@ export type Pivot = {
3
3
  valueColumns: string[]
4
4
  }
5
5
 
6
+ export type DefaultSort = {
7
+ column?: string
8
+ sortDirection?: 'asc' | 'desc' | 'custom'
9
+ customOrder?: string[]
10
+ }
11
+
6
12
  export type Table = {
7
13
  caption?: string
8
14
  cellMinWidth?: number
@@ -10,6 +16,8 @@ export type Table = {
10
16
  dateDisplayFormat?: string
11
17
  showNonGeoData?: boolean
12
18
  download?: boolean
19
+ downloadDataLabel?: string
20
+ downloadImageLabel?: string
13
21
  downloadVisibleDataOnly?: boolean
14
22
  downloadImageButton?: boolean
15
23
  downloadPdfButton?: boolean
@@ -31,4 +39,5 @@ export type Table = {
31
39
  showDownloadPdfButton?: boolean
32
40
  showDownloadUrl?: boolean
33
41
  showVertical?: boolean
42
+ defaultSort?: DefaultSort
34
43
  }
@@ -28,6 +28,7 @@ type DeprecatedVisualizationType = {
28
28
  filters: VizFilter[]
29
29
  general: General
30
30
  legend: Legend
31
+ locale: string
31
32
  newViz: boolean
32
33
  isResponsiveTicks: boolean
33
34
  openModal?: boolean
@@ -1,73 +0,0 @@
1
- /* Common component styles shared across packages */
2
- /* This file combines loader, warning-icon, and checkbox-group styles */
3
-
4
- /* Shared loader component */
5
- /* Used across: chart, dashboard, data-bite, waffle-chart packages */
6
- .loader {
7
- width: 100%;
8
- text-align: center;
9
- display: inline-block;
10
- animation: spin 1s linear infinite;
11
- }
12
-
13
- .loader::before {
14
- content: '\21BB';
15
- }
16
-
17
- /* Shared warning icon component */
18
- /* TODO: Currently different panel classes on different packages */
19
- .accordion__button svg.warning-icon,
20
- .cove-accordion__button svg.warning-icon {
21
- position: absolute;
22
- right: 35px;
23
- left: auto;
24
- top: 50%;
25
- transform: translateY(-50%);
26
-
27
- }
28
-
29
- .warning-icon {
30
- color: #d72f00;
31
- width: 15px;
32
- height: 15px;
33
- }
34
-
35
- .warning-icon path {
36
- fill: #d8000c;
37
- }
38
-
39
- /* Shared checkbox group component */
40
- /* Used across: chart, data-bite, markup-include packages */
41
- .checkbox-group {
42
- padding: 16px;
43
- border: 1px solid #c4c4c4;
44
- border-radius: 8px;
45
- margin-top: 8px;
46
- margin-bottom: 24px;
47
- }
48
-
49
- .cove-accordion__panel.panel-visual .checkbox-group label.checkbox,
50
- .cove-accordion__panel.panel-visual .reverse-labels label.checkbox,
51
- .panel-visual .checkbox-group label.checkbox,
52
- .panel-visual .reverse-labels label.checkbox {
53
- display: flex !important;
54
- align-items: center !important;
55
- width: 100% !important;
56
- margin-bottom: 8px !important;
57
- }
58
-
59
- .cove-accordion__panel.panel-visual .checkbox-group label.checkbox input[type="checkbox"],
60
- .cove-accordion__panel.panel-visual .reverse-labels label.checkbox input[type="checkbox"],
61
- .panel-visual .checkbox-group label.checkbox input[type="checkbox"],
62
- .panel-visual .reverse-labels label.checkbox input[type="checkbox"] {
63
- flex-shrink: 0 !important;
64
- margin-right: 8px !important;
65
- }
66
-
67
- .cove-accordion__panel.panel-visual .checkbox-group label.checkbox span,
68
- .cove-accordion__panel.panel-visual .reverse-labels label.checkbox span,
69
- .panel-visual .checkbox-group label.checkbox span,
70
- .panel-visual .reverse-labels label.checkbox span {
71
- flex: 1 !important;
72
- display: inline-block !important;
73
- }
@@ -1,63 +0,0 @@
1
- $baseColor: #333;
2
- $blue: #005eaa;
3
- $lightestGray: #f2f2f2;
4
- $lightGray: #c7c7c7;
5
- $mediumGray: #565656;
6
- $darkGray: #333;
7
- $red: #d8000c;
8
- $white: #fff;
9
-
10
- $primary: #005eaa !default;
11
- $secondary: #88c3ea !default;
12
- $tertiary: #c0e9ff !default;
13
- $quaternary: #edf9ff !default;
14
-
15
- $purple-primary: #712177 !default;
16
- $purple-secondary: #b890bb !default;
17
- $purple-tertiary: #e3d3e4 !default;
18
- $purple-quaternary: #f7f2f7 !default;
19
-
20
- $brown-primary: #705043 !default;
21
- $brown-secondary: #ad907b !default;
22
- $brown-tertiary: #d7ccc8 !default;
23
- $brown-quaternary: #f2ebe8 !default;
24
-
25
- $teal-primary: #00695c !default;
26
- $teal-secondary: #4ebaaa !default;
27
- $teal-tertiary: #ceece7 !default;
28
- $teal-quaternary: #ebf7f5 !default;
29
-
30
- $pink-primary: #af4448 !default;
31
- $pink-secondary: #e57373 !default;
32
- $pink-tertiary: #ffc2c2 !default;
33
- $pink-quaternary: #ffe7e7 !default;
34
-
35
- $orange-primary: #bb4d00 !default;
36
- $orange-secondary: #ffad42 !default;
37
- $orange-tertiary: #ffe97d !default;
38
- $orange-quaternary: #fff4cf !default;
39
-
40
- $slate-primary: #29434e !default;
41
- $slate-secondary: #7e9ba5 !default;
42
- $slate-tertiary: #b6c6d2 !default;
43
- $slate-quaternary: #e2e8ed !default;
44
-
45
- $indigo-primary: #26418f !default;
46
- $indigo-secondary: #92a6dd !default;
47
- $indigo-tertiary: #dee8ff !default;
48
- $indigo-quaternary: #f2f6ff !default;
49
-
50
- $cyan-primary: #006778 !default;
51
- $cyan-secondary: #65b0bd !default;
52
- $cyan-tertiary: #cce5e9 !default;
53
- $cyan-quaternary: #ebf5f6 !default;
54
-
55
- $green-primary: #4b830d !default;
56
- $green-secondary: #84bc49 !default;
57
- $green-tertiary: #dcedc8 !default;
58
- $green-quaternary: #f1f8e9 !default;
59
-
60
- $amber-primary: #fbab18 !default;
61
- $amber-secondary: #ffd54f !default;
62
- $amber-tertiary: #ffecb3 !default;
63
- $amber-quaternary: #fff7e1 !default;
@@ -1,21 +0,0 @@
1
- .cove-component {
2
- border-radius: 3px;
3
- }
4
-
5
- .cove-component__content {
6
- border: solid 1px #ccc;
7
- border-top: none;
8
- border-radius: 0 0 3px 3px;
9
-
10
- &.no-borders {
11
- border: none !important;
12
- }
13
-
14
- .cove-component__content:not(.component--hideBackgroundColor) {
15
- background: $lightestGray;
16
- }
17
- }
18
-
19
- .cove-component__content-wrap {
20
- padding: 0 1rem 1rem;
21
- }
@@ -1,9 +0,0 @@
1
- $cove-breakpoints: (
2
- xs: 480px,
3
- sm: 768px,
4
- md: 960px,
5
- lg: 1170px,
6
- xl: 1280px
7
- );
8
- $editorWidth: 350px;
9
- $transition-expo-out: cubic-bezier(0.16, 1, 0.3, 1);
@@ -1,7 +1,7 @@
1
1
  .cove-card {
2
+ background-color: #f2f2f2;
2
3
  border: 1px solid #c7c7c7;
3
4
  border-radius: 0.25rem;
4
- background-color: #f2f2f2;
5
- padding: 0.75rem;
6
5
  height: 100%;
6
+ padding: 0.75rem;
7
7
  }
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes