@cdc/core 4.24.12 → 4.25.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 (68) hide show
  1. package/components/DataTable/DataTable.tsx +26 -36
  2. package/components/DataTable/DataTableStandAlone.tsx +3 -3
  3. package/components/DataTable/components/ChartHeader.tsx +3 -2
  4. package/components/DataTable/components/ExpandCollapse.tsx +1 -4
  5. package/components/DataTable/data-table.css +2 -7
  6. package/components/DataTable/helpers/customSort.ts +2 -2
  7. package/components/DataTable/helpers/mapCellMatrix.tsx +83 -60
  8. package/components/DataTable/types/TableConfig.ts +0 -1
  9. package/components/EditorPanel/FootnotesEditor.tsx +49 -7
  10. package/components/EditorPanel/VizFilterEditor/VizFilterEditor.tsx +15 -2
  11. package/components/Filters/Filters.tsx +42 -36
  12. package/components/Filters/helpers/handleSorting.ts +5 -0
  13. package/components/Footnotes/Footnotes.tsx +1 -1
  14. package/components/Layout/components/Visualization/index.tsx +18 -4
  15. package/components/Layout/components/Visualization/visualizations.scss +1 -1
  16. package/components/Legend/Legend.Gradient.tsx +1 -4
  17. package/components/Legend/index.tsx +1 -1
  18. package/components/LegendShape.tsx +2 -3
  19. package/components/MediaControls.jsx +32 -8
  20. package/components/NestedDropdown/NestedDropdown.tsx +7 -12
  21. package/components/NestedDropdown/nesteddropdown.styles.css +11 -5
  22. package/components/Table/Table.tsx +0 -6
  23. package/components/Table/components/Row.tsx +2 -5
  24. package/components/_stories/DataTable.stories.tsx +1 -2
  25. package/components/elements/Button.jsx +38 -19
  26. package/components/elements/Confirm.tsx +45 -0
  27. package/components/elements/Error.tsx +24 -0
  28. package/components/managers/DataDesigner.tsx +198 -143
  29. package/components/ui/Title/Title.scss +12 -5
  30. package/components/ui/Title/index.tsx +1 -1
  31. package/dist/cove-main.css +77 -591
  32. package/dist/cove-main.css.map +1 -1
  33. package/helpers/DataTransform.ts +55 -63
  34. package/helpers/addValuesToFilters.ts +45 -16
  35. package/helpers/cove/accessibility.ts +24 -0
  36. package/helpers/cove/fontSettings.ts +1 -1
  37. package/helpers/cove/number.ts +1 -7
  38. package/helpers/coveUpdateWorker.ts +5 -1
  39. package/helpers/displayDataAsText.ts +64 -0
  40. package/helpers/filterVizData.ts +2 -2
  41. package/helpers/formatConfigBeforeSave.ts +16 -1
  42. package/helpers/isOlderVersion.ts +20 -0
  43. package/helpers/missingRequiredSections.ts +20 -0
  44. package/helpers/tests/addValuesToFilters.test.ts +19 -1
  45. package/helpers/useDataVizClasses.ts +8 -4
  46. package/helpers/ver/4.24.10.ts +12 -0
  47. package/helpers/ver/4.24.11.ts +18 -0
  48. package/helpers/ver/4.25.1.ts +18 -0
  49. package/package.json +2 -2
  50. package/styles/_button-section.scss +2 -5
  51. package/styles/_global-variables.scss +17 -7
  52. package/styles/_global.scss +8 -12
  53. package/styles/_reset.scss +4 -5
  54. package/styles/_typography.scss +0 -20
  55. package/styles/_variables.scss +0 -3
  56. package/styles/base.scss +44 -5
  57. package/styles/cove-main.scss +1 -1
  58. package/styles/filters.scss +5 -6
  59. package/styles/v2/base/_general.scss +3 -2
  60. package/styles/v2/components/button.scss +0 -1
  61. package/styles/v2/main.scss +3 -4
  62. package/styles/v2/utils/index.scss +0 -1
  63. package/types/BoxPlot.ts +1 -0
  64. package/types/Runtime.ts +1 -0
  65. package/types/Table.ts +0 -1
  66. package/types/Version.ts +1 -1
  67. package/types/VizFilter.ts +2 -1
  68. package/styles/v2/utils/_spacers.scss +0 -31
@@ -0,0 +1,20 @@
1
+ export const missingRequiredSections = config => {
2
+ if (config.visualizationType === 'Sankey') return false // skip checks for now
3
+ if (config.visualizationType === 'Forecasting') return false // skip required checks for now.
4
+ if (config.visualizationType === 'Forest Plot') return false // skip required checks for now.
5
+ if (config.visualizationType === 'Pie') {
6
+ if (undefined === config?.yAxis.dataKey) {
7
+ return true
8
+ }
9
+ } else {
10
+ if ((undefined === config?.series || false === config?.series.length > 0) && !config?.dynamicSeries) {
11
+ return true
12
+ }
13
+ }
14
+
15
+ if (!config.xAxis.dataKey) {
16
+ return true
17
+ }
18
+
19
+ return false
20
+ }
@@ -2,6 +2,7 @@ import _ from 'lodash'
2
2
  import { VizFilter } from '../../types/VizFilter'
3
3
  import { addValuesToFilters } from '../addValuesToFilters'
4
4
  import { describe, it, expect, vi } from 'vitest'
5
+ import { FILTER_STYLE } from '@cdc/dashboard/src/types/FilterStyles'
5
6
 
6
7
  describe('addValuesToFilters', () => {
7
8
  const parentFilter = { columnName: 'parentColumn', id: 11, active: 'apple', values: [] } as VizFilter
@@ -26,6 +27,19 @@ describe('addValuesToFilters', () => {
26
27
  expect(newFilters2[2].values).toEqual([3, 1, 4])
27
28
  expect(newFilters2[1].values).toEqual([])
28
29
  })
30
+ it('adds filter values based on parent queued active values', () => {
31
+ const filtersCopy = _.cloneDeep([{ ...parentFilter, queuedActive: 'pear' }, childFilter, parentFilter2])
32
+ const newFilters2 = addValuesToFilters(filtersCopy, data)
33
+ expect(newFilters2[0].values).toEqual(['apple', 'pear'])
34
+ expect(newFilters2[2].values).toEqual([3, 1, 4])
35
+ expect(newFilters2[1].values).toEqual([])
36
+
37
+ filtersCopy[0].queuedActive = 'apple'
38
+ const newFilters = addValuesToFilters(filtersCopy, data)
39
+ expect(newFilters[0].values).toEqual(['apple', 'pear'])
40
+ expect(newFilters[2].values).toEqual([3, 1, 4])
41
+ expect(newFilters[1].values).toEqual(['b'])
42
+ })
29
43
  it('works when data is an object', () => {
30
44
  const filtersCopy = _.cloneDeep(filters)
31
45
  const newFilters = addValuesToFilters(filtersCopy, { '0': data })
@@ -36,7 +50,11 @@ describe('addValuesToFilters', () => {
36
50
  //expect(newFilters[1].values).toEqual([])
37
51
  })
38
52
  it('works for nested dropdowns', () => {
39
- const nestedParentFilter = { ...parentFilter, subGrouping: { columnName: 'childColumn' } }
53
+ const nestedParentFilter = {
54
+ ...parentFilter,
55
+ filterStyle: FILTER_STYLE.nestedDropdown,
56
+ subGrouping: { columnName: 'childColumn' }
57
+ }
40
58
  const newFilters = addValuesToFilters([nestedParentFilter], data)
41
59
  expect(newFilters[0].values).toEqual(['apple', 'pear'])
42
60
  expect(newFilters[0].subGrouping.valuesLookup).toEqual({ apple: { values: ['a', 'b'] }, pear: { values: ['c'] } })
@@ -1,3 +1,6 @@
1
+ import useResizeObserver from '@cdc/map/src/hooks/useResizeObserver'
2
+ import { isBelowBreakpoint } from './viewports'
3
+
1
4
  export default function useDataVizClasses(config, viewport = null) {
2
5
  const {
3
6
  legend,
@@ -77,16 +80,17 @@ export default function useDataVizClasses(config, viewport = null) {
77
80
  ]
78
81
 
79
82
  const usePadding = !legend?.hideBorder
83
+ const legendPadding = `m${isBelowBreakpoint('md', viewport) ? 't' : ''}-3`
80
84
 
81
85
  const legendClasses = {
82
86
  aside: legendOuterClasses,
83
- section: ['legend-container', usePadding ? 'legend-padding' : ''],
87
+ section: ['legend-container', usePadding ? legendPadding : ''],
84
88
  ul: getUlClasses(),
85
89
  li: ['single-legend-item', 'legend-container__li'],
86
- title: ['legend-container__title'],
87
- description: ['legend-container__description'],
90
+ title: ['legend-container__title fw-bold'],
91
+ description: ['legend-container__description mt-2'],
88
92
  div: [legend?.position === 'bottom' && legend?.singleRow ? 'shape-container single-row' : 'shape-container'],
89
- resetButton: ['legend-container__reset-button']
93
+ showAllButton: ['legend-container__reset-button']
90
94
  }
91
95
 
92
96
  return { innerContainerClasses, contentClasses, lineDatapointClass, sparkLineStyles, legendClasses }
@@ -34,12 +34,24 @@ export const setXAxisLabelOffsetToZero = newConfig => {
34
34
  newConfig.xAxis.labelOffset = 0
35
35
  }
36
36
 
37
+ export const defineFilterStyles = newConfig => {
38
+ if (newConfig.filters) {
39
+ newConfig.filters = newConfig.filters.map(filter => {
40
+ if (!filter.filterStyle) {
41
+ filter.filterStyle = 'dropdown'
42
+ }
43
+ return filter
44
+ })
45
+ }
46
+ }
47
+
37
48
  const update_4_24_10 = config => {
38
49
  const ver = '4.24.10'
39
50
  const newConfig = _.cloneDeep(config)
40
51
  setXAxisLabelOffsetToZero(newConfig)
41
52
  changePivotColumns(newConfig)
42
53
  removeMultiSelectPropFromMultiselect(newConfig)
54
+ defineFilterStyles(newConfig)
43
55
  newConfig.version = ver
44
56
  return newConfig
45
57
  }
@@ -0,0 +1,18 @@
1
+ import _ from 'lodash'
2
+
3
+ const addColorMigration = config => {
4
+ // add new property
5
+ config.migrations = config.migrations || {}
6
+ config.migrations.addColorMigration = true
7
+ return config
8
+ }
9
+
10
+ const update_4_24_11 = config => {
11
+ const ver = '4.24.11'
12
+ const newConfig = _.cloneDeep(config)
13
+ addColorMigration(newConfig)
14
+ newConfig.version = ver
15
+ return newConfig
16
+ }
17
+
18
+ export default update_4_24_11
@@ -0,0 +1,18 @@
1
+ import _ from 'lodash'
2
+
3
+ const removeTerritoriesLabel = config => {
4
+ if (config.general?.territoriesLabel) {
5
+ delete config.general.territoriesLabel
6
+ }
7
+ return config
8
+ }
9
+
10
+ const update_4_25_1 = config => {
11
+ const ver = '4.25.1'
12
+ const newConfig = _.cloneDeep(config)
13
+ removeTerritoriesLabel(newConfig)
14
+ newConfig.version = ver
15
+ return newConfig
16
+ }
17
+
18
+ export default update_4_25_1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cdc/core",
3
- "version": "4.24.12",
3
+ "version": "4.25.1",
4
4
  "description": "Core components, styles, hooks, and helpers, for the CDC Open Visualization project",
5
5
  "moduleName": "CdcCore",
6
6
  "main": "dist/cdccore",
@@ -34,7 +34,7 @@
34
34
  "react": "^18.2.0",
35
35
  "react-dom": "^18.2.0"
36
36
  },
37
- "gitHead": "347414f1da4b0e9bf2f22a7b59335deccf0b2d9c",
37
+ "gitHead": "c32d727f516fe3525178e3a6480abbe70b2a20d6",
38
38
  "devDependencies": {
39
39
  "sass": "^1.79.4"
40
40
  }
@@ -17,6 +17,7 @@
17
17
  display: flex;
18
18
  justify-content: flex-end;
19
19
  width: 100%;
20
+ line-height: 1;
20
21
  &.brush-active {
21
22
  margin-top: 2em;
22
23
  }
@@ -24,11 +25,7 @@
24
25
  margin-right: 10px;
25
26
  }
26
27
  & a {
27
- font-size: 16px;
28
- }
29
- margin-top: 20px;
30
- &.below-table {
31
- margin-top: 5px;
28
+ font-size: var(--download-link-font-size);
32
29
  }
33
30
  }
34
31
 
@@ -81,18 +81,28 @@ $colors: (
81
81
  @include theme();
82
82
 
83
83
  :root {
84
+ // Spacing
84
85
  --editorContentPadding: 30px;
85
86
  --editorWidth: 350px;
87
+ --space-between-legend-item-rows: 1rem;
88
+ --space-between-legend-item-columns: 1.5rem;
89
+ // Breakpoints
86
90
  --breakpoint-xs: 480px;
87
91
  --breakpoint-sm: 768px;
88
92
  --breakpoint-md: 960px;
89
93
  --breakpoint-lg: 1170px;
90
94
  --breakpoint-xl: 1280px;
91
- --font-size: 17px;
92
- }
93
-
94
- @media (max-width: 576px) {
95
- :root {
96
- --font-size: 13px;
97
- }
95
+ // Font
96
+ --app-font-main: 'Nunito', sans-serif;
97
+ --app-font-secondary: 'Poppins', sans-serif;
98
+ // Font sizes
99
+ --legend-title-font-size: 1rem;
100
+ --legend-description-font-size: 1rem;
101
+ --legend-item-font-size: 0.889rem;
102
+ --download-link-font-size: 0.772rem;
103
+ --filter-select-font-size: 0.833rem;
104
+ --filter-label-font-size: 0.889rem;
105
+ --filter-buttons-font-size: 0.889rem;
106
+ --superTitle-font-size: 0.833rem;
107
+ --title-font-size: 1.222rem;
98
108
  }
@@ -156,17 +156,11 @@ textarea {
156
156
 
157
157
  section.introText {
158
158
  width: 100%;
159
- margin-bottom: 25px;
160
159
  }
161
160
 
162
161
  section.footnotes {
163
- border-top: 1px solid #ddd;
164
- margin-top: 20px;
165
- padding: 15px;
166
- }
167
-
168
- .cdc-chart-inner-container .subtext {
169
- margin-top: 20px;
162
+ border-top: 1px solid var(--cool-gray-10);
163
+ width: 100%;
170
164
  }
171
165
 
172
166
  .margin-left-href {
@@ -182,14 +176,16 @@ section.footnotes {
182
176
  }
183
177
  }
184
178
 
185
-
186
179
  // after migration to TP5 this declaration should be removed and all references
187
180
  // to it should be replaced with .form-select
188
181
  .cove-form-select {
182
+ font-family: var(--app-font-secondary);
183
+ font-weight: 300;
184
+ font-size: var(--filter-select-font-size);
189
185
  display: block;
190
186
  width: 100%;
191
187
  padding: 0.375rem 0.75rem;
192
188
  border-radius: 0.25rem;
193
- border: 1px solid var(--lightGray);
194
- color: var(--darkGray);
195
- }
189
+ border: 1px solid var(--cool-gray-10);
190
+ color: var(--cool-gray-90);
191
+ }
@@ -1,12 +1,11 @@
1
1
  .cdc-open-viz-module {
2
2
  margin: 0;
3
- font: 1em/1.6 system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, Ubuntu, Cantarell, Droid Sans,
4
- Helvetica Neue, Fira Sans, sans-serif;
3
+ font-family: var(--app-font-main);
4
+ font-size: 1em;
5
+ line-height: 1.5;
5
6
  font-weight: 400;
6
7
  font-style: normal;
7
8
  text-rendering: optimizeLegibility;
8
- -webkit-font-smoothing: antialiased;
9
- color: #111;
10
9
 
11
10
  // match cdc site outline
12
11
  :focus,
@@ -90,7 +89,7 @@
90
89
  margin: 0;
91
90
  padding: 0;
92
91
  border: 0;
93
- font-family: sans-serif;
92
+ font-family: var(--app-font-main);
94
93
  font-weight: normal;
95
94
  vertical-align: baseline;
96
95
  }
@@ -1,20 +0,0 @@
1
- &.font-small {
2
- .chart-container {
3
- font-size: 0.9em !important;
4
- }
5
- }
6
-
7
- &.font-medium {
8
- font-size: 1em !important;
9
- }
10
-
11
- &.font-large {
12
- .chart-container {
13
- font-size: 1.1em !important;
14
- }
15
- }
16
-
17
- .subtext {
18
- font-style: italic;
19
- font-size: 0.9em !important;
20
- }
@@ -61,6 +61,3 @@ $amber-primary: #fbab18 !default;
61
61
  $amber-secondary: #ffd54f !default;
62
62
  $amber-tertiary: #ffecb3 !default;
63
63
  $amber-quaternary: #fff7e1 !default;
64
-
65
- /// Fonts
66
- $font-small: 0.7em;
package/styles/base.scss CHANGED
@@ -65,12 +65,7 @@ body.post-type-cdc_visualization .cdc-editor .configure .editor-panel {
65
65
 
66
66
  .cdc-open-viz-module {
67
67
  position: relative;
68
- color: $baseColor;
69
- font-size: 14px !important;
70
68
  line-height: 1.4;
71
- @include breakpointClass(md) {
72
- font-size: 16px !important;
73
- }
74
69
  @import 'global';
75
70
  @import 'button-section';
76
71
  @import 'series-list';
@@ -153,4 +148,48 @@ body.post-type-cdc_visualization .cdc-editor .configure .editor-panel {
153
148
  '#ebf7f5'
154
149
  )
155
150
  );
151
+
152
+ // These are required because Chronic has pages that still use TP4 and these Bootstrap5 margin classes aren't defined on those pages
153
+ .me-0 {
154
+ margin-right: 0 !important;
155
+ }
156
+ .me-1 {
157
+ margin-right: 0.25rem !important;
158
+ }
159
+ .me-2 {
160
+ margin-right: 0.5rem !important;
161
+ }
162
+ .me-3 {
163
+ margin-right: 1rem !important;
164
+ }
165
+ .me-4 {
166
+ margin-right: 1.5rem !important;
167
+ }
168
+ .me-5 {
169
+ margin-right: 3rem !important;
170
+ }
171
+ .me-auto {
172
+ margin-right: auto !important;
173
+ }
174
+ .ms-0 {
175
+ margin-left: 0 !important;
176
+ }
177
+ .ms-1 {
178
+ margin-left: 0.25rem !important;
179
+ }
180
+ .ms-2 {
181
+ margin-left: 0.5rem !important;
182
+ }
183
+ .ms-3 {
184
+ margin-left: 1rem !important;
185
+ }
186
+ .ms-4 {
187
+ margin-left: 1.5rem !important;
188
+ }
189
+ .ms-5 {
190
+ margin-left: 3rem !important;
191
+ }
192
+ .ms-auto {
193
+ margin-left: auto !important;
194
+ }
156
195
  }
@@ -3,4 +3,4 @@
3
3
  @import 'v2/themes/color-definitions';
4
4
  @import 'variables';
5
5
  @import 'v2/components/ui/tooltip';
6
- @import 'v2/main.scss'
6
+ @import 'v2/main.scss';
@@ -2,14 +2,12 @@
2
2
  &__wrapper {
3
3
  flex-wrap: wrap;
4
4
  display: flex;
5
- gap: 7px 15px;
6
- margin-top: 15px;
7
- margin-bottom: 15px;
5
+ gap: 18px 27px;
8
6
  label {
9
7
  display: inherit;
10
8
  margin-bottom: 5px;
11
- font-weight: 600;
12
- font-size: 16px;
9
+ font-weight: 700;
10
+ font-size: var(--filter-label-font-size);
13
11
  }
14
12
  }
15
13
 
@@ -20,6 +18,7 @@
20
18
 
21
19
  &__buttons {
22
20
  width: 100%;
21
+ font-size: var(--filter-buttons-font-size);
23
22
  .apply {
24
23
  margin-right: 10px;
25
24
  }
@@ -27,9 +26,9 @@
27
26
  }
28
27
 
29
28
  div.single-filters {
30
-
31
29
  label {
32
30
  width: 100%;
31
+ font-weight: 700;
33
32
  }
34
33
 
35
34
  &__tab-bar {
@@ -2,13 +2,14 @@
2
2
 
3
3
  .cove {
4
4
  margin: 0;
5
- font: 1em/1.6 system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, Ubuntu, Cantarell, Droid Sans, Helvetica Neue, Fira Sans, sans-serif;
5
+ font-family: var(--app-font-main);
6
+ font-size: 1em;
7
+ line-height: 1.5;
6
8
  font-weight: 400;
7
9
  font-style: normal;
8
10
  line-height: 1.4;
9
11
  color: $baseColor;
10
12
  text-rendering: optimizeLegibility;
11
- -webkit-font-smoothing: antialiased;
12
13
 
13
14
  small {
14
15
  display: block;
@@ -16,7 +16,6 @@
16
16
  position: relative;
17
17
  min-height: 2.125rem;
18
18
  padding: 0.375rem 0.75rem;
19
- font-size: 1rem;
20
19
  text-align: center;
21
20
  text-decoration: none;
22
21
  vertical-align: middle;
@@ -3,7 +3,6 @@
3
3
 
4
4
  .cove {
5
5
  @import 'base';
6
- color: $baseColor;
7
6
  font-size: 16px;
8
7
  line-height: 1.4;
9
8
 
@@ -13,12 +12,12 @@
13
12
  }
14
13
 
15
14
  margin: 0;
16
- font: 1em/1.6 system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, Ubuntu, Cantarell, Droid Sans, Helvetica Neue, Fira Sans, sans-serif;
15
+ font-family: var(--app-font-main);
16
+ font-size: 1em;
17
+ line-height: 1.5;
17
18
  font-weight: 400;
18
19
  font-style: normal;
19
20
  text-rendering: optimizeLegibility;
20
- -webkit-font-smoothing: antialiased;
21
- color: #111;
22
21
 
23
22
  strong {
24
23
  font-weight: 600;
@@ -6,4 +6,3 @@
6
6
  @import 'breakpoints';
7
7
  @import 'functions';
8
8
  @import 'grid';
9
- @import 'spacers';
package/types/BoxPlot.ts CHANGED
@@ -15,6 +15,7 @@ export type BoxPlot = {
15
15
  upperBounds: string
16
16
  }
17
17
  plotNonOutlierValues: boolean
18
+ plotOutlierValues: boolean
18
19
  plots: [{ columnOutliers: []; columnLowerBounds: number; columnUpperBounds: number }]
19
20
  categories: string[]
20
21
  geoType: string
package/types/Runtime.ts CHANGED
@@ -10,6 +10,7 @@ export type ForecastingSeriesKey = {
10
10
 
11
11
  export type Runtime = {
12
12
  barSeriesKeys?: string[]
13
+ areaSeriesKeys: object[]
13
14
  forecastingSeriesKeys?: ForecastingSeriesKey[]
14
15
  originalXAxis: {
15
16
  dataKey: string
package/types/Table.ts CHANGED
@@ -13,7 +13,6 @@ export type Table = {
13
13
  downloadPdfButton?: boolean
14
14
  excludeColumns?: string[]
15
15
  expanded?: boolean
16
- fontSize: 'small' | 'medium' | 'large'
17
16
  groupBy?: string
18
17
  height?: number
19
18
  indexLabel?: string
package/types/Version.ts CHANGED
@@ -1 +1 @@
1
- export type version = `${number}.${number}.${number}`
1
+ export type Version = `${number}.${number}.${number}` | `${number}.${number}.${number}-${string}`
@@ -1,4 +1,4 @@
1
- export type OrderBy = 'asc' | 'desc' | 'cust'
1
+ export type OrderBy = 'asc' | 'desc' | 'cust' | 'column'
2
2
 
3
3
  export type FilterBase = {
4
4
  columnName: string
@@ -23,6 +23,7 @@ export type GeneralFilter = FilterBase & {
23
23
  filterStyle: VizFilterStyle
24
24
  label: string
25
25
  order: OrderBy
26
+ orderColumn?: string
26
27
  orderedValues?: string[] // should only exist if the order is 'cust'
27
28
  queryParameter: string
28
29
  setByQueryParameter: string
@@ -1,31 +0,0 @@
1
- // Content Spacer Classes
2
- $cove-spacers-offset: 8;
3
- $cove-spacers-max: 64;
4
-
5
- @mixin spacers($className, $styleNameCollection) {
6
- $i: 0;
7
- @while ($i * $cove-spacers-offset) <= $cove-spacers-max {
8
- #{$className + $i} {
9
- @each $styleName in $styleNameCollection {
10
- #{$styleName}: #{($i * $cove-spacers-offset) + 'px'} !important;
11
- }
12
- }
13
- $i: $i + 1;
14
- }
15
- }
16
-
17
- @include spacers('.p-', 'padding');
18
- @include spacers('.pt-', 'padding-top');
19
- @include spacers('.pr-', 'padding-right');
20
- @include spacers('.pb-', 'padding-bottom');
21
- @include spacers('.pl-', 'padding-left');
22
- @include spacers('.px-', ('padding-left', 'padding-right'));
23
- @include spacers('.py-', ('padding-top', 'padding-bottom'));
24
-
25
- @include spacers('.m-', 'margin');
26
- @include spacers('.mt-', 'margin-top');
27
- @include spacers('.mr-', 'margin-right');
28
- @include spacers('.mb-', 'margin-bottom');
29
- @include spacers('.ml-', 'margin-left');
30
- @include spacers('.mx-', ('margin-left', 'margin-right'));
31
- @include spacers('.mx-', ('margin-top', 'margin-bottom'));