@cdc/chart 4.26.5 → 4.26.6

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 (91) hide show
  1. package/CONFIG.md +12 -8
  2. package/dist/{cdcchart-DQ00cQCm.es.js → cdcchart-BWVIUcAF.es.js} +5 -55
  3. package/dist/cdcchart.js +34093 -32767
  4. package/examples/feature/heatmap/average-age-categorical.json +1 -1
  5. package/examples/feature/heatmap/calendar-heatmap.json +1 -1
  6. package/examples/feature/heatmap/sparse-aggregation.json +1 -1
  7. package/examples/private/bad-y-axis.json +543 -0
  8. package/examples/private/bar-chart-negative-value.json +455 -0
  9. package/package.json +3 -3
  10. package/src/CdcChart.tsx +5 -4
  11. package/src/CdcChartComponent.tsx +32 -9
  12. package/src/_stories/Chart.SeriesColorAssignments.stories.tsx +183 -0
  13. package/src/_stories/Chart.YAxisAutoMaxStrategy.stories.tsx +52 -0
  14. package/src/_stories/Chart.YAxisFilterDomain.stories.tsx +90 -0
  15. package/src/_stories/ChartAnnotation.smoke.stories.tsx +10 -0
  16. package/src/_stories/_mock/annotation_event-line_mock.json +1064 -0
  17. package/src/_stories/_mock/heatmap-average-age-categorical.json +1 -1
  18. package/src/_stories/_mock/heatmap.json +1 -1
  19. package/src/components/Annotations/components/AnnotationDraggable.styles.css +22 -1
  20. package/src/components/Annotations/components/AnnotationDraggable.tsx +219 -119
  21. package/src/components/Annotations/tests/AnnotationDraggable.test.tsx +198 -0
  22. package/src/components/Axis/LeftAxis.tsx +3 -0
  23. package/src/components/Axis/LeftAxisGridlines.tsx +8 -1
  24. package/src/components/Axis/RightAxis.tsx +3 -0
  25. package/src/components/Axis/tests/AxisTickValues.test.tsx +86 -0
  26. package/src/components/EditorPanel/EditorPanel.tsx +367 -136
  27. package/src/components/EditorPanel/components/Panels/Panel.Annotate.tsx +101 -52
  28. package/src/components/EditorPanel/components/Panels/Panel.SmallMultiples.test.tsx +98 -0
  29. package/src/components/EditorPanel/components/Panels/Panel.SmallMultiples.tsx +10 -0
  30. package/src/components/EditorPanel/components/Panels/Panel.Visual.test.tsx +484 -0
  31. package/src/components/EditorPanel/components/Panels/Panel.Visual.tsx +3 -0
  32. package/src/components/EditorPanel/components/Panels/SeriesColorAssignments.tsx +262 -0
  33. package/src/components/EditorPanel/components/Panels/panelVisual.styles.css +32 -0
  34. package/src/components/EditorPanel/components/panels.scss +10 -0
  35. package/src/components/EditorPanel/editor-panel.scss +47 -0
  36. package/src/components/EditorPanel/helpers/getVisualizationTypeConfigUpdate.ts +6 -2
  37. package/src/components/EditorPanel/helpers/tests/getVisualizationTypeConfigUpdate.test.ts +20 -2
  38. package/src/components/EditorPanel/useEditorPermissions.test.tsx +256 -11
  39. package/src/components/EditorPanel/useEditorPermissions.ts +41 -5
  40. package/src/components/HeatMap/components/HeatMap.tsx +22 -17
  41. package/src/components/HeatMap/components/HeatMapGradientLegend.tsx +29 -15
  42. package/src/components/HeatMap/heatmap.css +15 -1
  43. package/src/components/HeatMap/tests/HeatMap.test.tsx +39 -7
  44. package/src/components/Legend/Legend.Component.tsx +2 -2
  45. package/src/components/Legend/helpers/createFormatLabels.test.ts +88 -0
  46. package/src/components/Legend/helpers/createFormatLabels.tsx +6 -1
  47. package/src/components/LineChart/helpers.test.ts +230 -1
  48. package/src/components/LineChart/helpers.ts +26 -13
  49. package/src/components/LineChart/index.tsx +21 -4
  50. package/src/components/LinearChart/tests/LinearChart.test.tsx +30 -0
  51. package/src/components/LinearChart.tsx +50 -15
  52. package/src/components/ScatterPlot/ScatterPlot.jsx +3 -3
  53. package/src/components/SmallMultiples/SmallMultipleTile.tsx +3 -0
  54. package/src/components/SmallMultiples/SmallMultiples.tsx +38 -9
  55. package/src/components/SmallMultiples/tests/SmallMultiples.test.tsx +170 -0
  56. package/src/data/initial-state.js +1 -0
  57. package/src/helpers/calculateLeftYAxisWidth.ts +9 -3
  58. package/src/helpers/colorAssignmentHelpers.ts +102 -0
  59. package/src/helpers/dataHelpers.ts +11 -1
  60. package/src/helpers/getAxisMaxOverride.ts +16 -0
  61. package/src/helpers/getCleanTopTickMax.ts +64 -0
  62. package/src/helpers/getColorScale.ts +18 -9
  63. package/src/helpers/getHasBoundarySuppression.ts +26 -0
  64. package/src/helpers/getMinMax.ts +24 -22
  65. package/src/helpers/getYAxisDomainData.ts +38 -0
  66. package/src/helpers/getYAxisFinalizationEligibility.ts +40 -0
  67. package/src/helpers/hasSpacedInlineLabel.ts +10 -0
  68. package/src/helpers/seriesColumnSettings.ts +5 -4
  69. package/src/helpers/smallMultiplesHelpers.ts +5 -0
  70. package/src/helpers/tests/calculateLeftYAxisWidth.test.ts +38 -0
  71. package/src/helpers/tests/dataHelpers.test.ts +135 -0
  72. package/src/helpers/tests/getAxisMaxOverride.test.ts +36 -0
  73. package/src/helpers/tests/getCleanTopTickMax.test.ts +165 -0
  74. package/src/helpers/tests/getColorScale.test.ts +197 -0
  75. package/src/helpers/tests/getMinMax.test.ts +211 -0
  76. package/src/helpers/tests/getYAxisDomainData.test.ts +119 -0
  77. package/src/helpers/tests/getYAxisFinalizationEligibility.test.ts +185 -0
  78. package/src/helpers/tests/{getYAxisAutoPaddingMode.test.ts → hasSpacedInlineLabel.test.ts} +17 -32
  79. package/src/helpers/tests/seriesColumnSettings.test.ts +16 -2
  80. package/src/helpers/tests/smallMultiplesHelpers.test.ts +99 -0
  81. package/src/hooks/tests/useRightAxis.test.tsx +127 -0
  82. package/src/hooks/tests/useScales.test.tsx +307 -29
  83. package/src/hooks/useRightAxis.ts +30 -13
  84. package/src/hooks/useScales.ts +45 -28
  85. package/src/hooks/useTooltip.tsx +3 -1
  86. package/src/test/CdcChart.dataTable.test.tsx +122 -0
  87. package/src/types/ChartConfig.ts +6 -1
  88. package/src/types/ChartContext.ts +3 -0
  89. package/src/helpers/getYAxisAutoPadding.ts +0 -55
  90. package/src/helpers/getYAxisAutoPaddingMode.ts +0 -17
  91. package/src/helpers/tests/getYAxisAutoPadding.test.ts +0 -37
package/CONFIG.md CHANGED
@@ -55,7 +55,7 @@ Dashboard flows can also select data from `datasets` with `dataKey`.
55
55
  | `visualizationSubType` | `string` | No | `regular` | Selects the sub-mode within a chart family. | Current authorable values are `regular` and `stacked`; `stacked` is used by bar, combo, and stacked area flows. Older saved configs may contain `horizontal`; use `orientation: "horizontal"` for current horizontal charts. |
56
56
  | `orientation` | `vertical \| horizontal` | No | `vertical` | Controls the primary chart orientation. | `Bar` and `Box Plot` support both directions; `Deviation Bar` is horizontal only. |
57
57
  | `xAxis` | `object` | Conditionally | Package-initialized defaults | X-axis / category-axis configuration. | Required for most chart types and for pie category wiring. See `Axis: xAxis and yAxis` below. |
58
- | `yAxis` | `object` | Conditionally | Package-initialized defaults | Y-axis / measure-axis configuration. | Required for `Pie` charts and shared with multi-axis chart flows. See `Axis: xAxis and yAxis` below. In charts, `yAxis.titlePlacement` controls whether the title stays on the side or moves above the plot. Visible top titles also keep the chart's y-axis auto-padding behavior enabled, including small-multiple titles hidden only by tile layout. |
58
+ | `yAxis` | `object` | Conditionally | Package-initialized defaults | Y-axis / measure-axis configuration. | Required for `Pie` charts and shared with multi-axis chart flows. See `Axis: xAxis and yAxis` below. In charts, `yAxis.titlePlacement` controls whether the title stays on the side or moves above the plot. |
59
59
  | `series` | `Series[]` | Conditionally | Package-initialized defaults | Measure series to render. | Required for most non-pie charts. See `Series: series[]` below. Dynamic-category series still start from an authored `series[]` entry. For HeatMap, each selected series becomes one heatmap row. |
60
60
  | `columns` | `Record<string, Column>` | No | `{}` | Column-level display and formatting overrides. | Column configs drive labels, prefixes, suffixes, and table visibility. |
61
61
  | `dynamicSeries` | `boolean` | No | `false` | Legacy/paused dynamic-series flag. | Current runtime can regenerate generated series during filter updates, but initial rendering still depends on authored `series[]` or `series[].dynamicCategory`. |
@@ -81,10 +81,12 @@ Axis settings are chart-owned because their meaning depends on chart family, ori
81
81
  | `xAxis.dataKey`, `yAxis.dataKey` | `string` | Conditionally | `''` | Source field used by the axis. | Required for visible/category axes and most value-axis chart wiring. |
82
82
  | `xAxis.type`, `yAxis.type` | `string` | No | Package defaults | Axis scale mode. | Category/date axes commonly use `categorical`, `date`, or `date-time`; Scatter Plot x-axes can use `continuous`; current numeric value axes use `linear` or `logarithmic`. |
83
83
  | `xAxis.label`, `yAxis.label` | `string` | No | `''` | Axis title shown near the axis. | Optional display label. |
84
- | `yAxis.titlePlacement` | `side \| top` | No | `top` for new configs; older configs missing this field migrate to `side` | Chooses where the y-axis title renders. | `top` renders the title above the plot and participates in y-axis auto-padding behavior. |
84
+ | `yAxis.titlePlacement` | `side \| top` | No | `top` for new configs; older configs missing this field migrate to `side` | Chooses where the y-axis title renders. | `top` renders the title above the plot. |
85
85
  | `*.hideAxis`, `*.hideTicks`, `*.hideLabel` | `boolean` | No | `false` | Hides axis line, tick marks, or label. | Supported per axis where the renderer exposes these controls. |
86
86
  | `*.labelColor`, `*.tickLabelColor`, `*.tickColor` | CSS color string | No | Package defaults | Axis label, tick-label, and tick-mark colors. | Preserved in saved configs and used by the rendered axes. |
87
87
  | `yAxis.gridLines`, `yAxis.enablePadding`, `yAxis.scalePadding`, `yAxis.displayNumbersOnBar`, `xAxis.showYearsOnce` | `boolean`, `number` | No | Package defaults | Axis grid, padding, bar-label, and date-label display controls. | Supported where the chart family and orientation use the related rendering behavior. |
88
+ | `yAxis.filterDomainBehavior` | `dynamic \| stable` | No | `dynamic` when omitted | Controls which rows automatic value-axis domains use when filters are active. | `dynamic` rescales to the currently filtered rows. `stable` uses the full eligible chart dataset while rendering filtered rows; it still respects hard exclusions and chart dataset scope. Applies to the horizontal value axis for horizontal charts and to the right axis for Combo charts. Brush behavior remains controlled by `xAxis.brushDynamicYAxis`. |
89
+ | `yAxis.autoMaxStrategy` | `default \| clean-top-tick` | No | `default` when omitted; new chart configs default to `clean-top-tick` | Controls how automatic value-axis maximums are chosen before padding. | Applies only when the relevant value-axis max is not explicitly set (`yAxis.max` for vertical charts, `xAxis.max` for horizontal charts, `yAxis.rightMax` for Combo right axes). `clean-top-tick` rounds automatic max values up to a cleaner mantissa step such as `1.2`, `1.5`, `2`, `2.5`, `3`, `4`, `5`, `6`, `8`, or `10` times the current order-of-magnitude step. After tick count is known, runtime may finalize the automatic max to the highest generated tick or the next tick interval so the visible top tick clears the data. |
88
90
  | `*.dateParseFormat`, `*.dateDisplayFormat` | `string` | No | Package defaults | Input and output date formatting hints. | Used by date-based axes and table/tooltip formatting. |
89
91
  | `*.numTicks`, `*.tickRotation`, `*.maxTickRotation` | `number` | No | Package defaults | Tick density and tick-label rotation controls. | Runtime may still adjust ticks for available space. |
90
92
  | `*.max`, `*.min` | `string` | No | None | Explicit axis bounds. | Stored as strings in saved configs. |
@@ -94,7 +96,7 @@ Axis settings are chart-owned because their meaning depends on chart family, ori
94
96
  | `*.categories` | `object[]` | No | `[]` | Category metadata for specialized axis rendering. | Mostly used by advanced chart flows. |
95
97
  | `*.anchors` | `object[]` | No | `[]` | Target-line or anchor metadata. | Each anchor stores `value`, `color`, and `lineStyle`. |
96
98
  | `xAxis.target`, `xAxis.targetLabel`, `xAxis.showTargetLabel`, `yAxis.target`, `yAxis.targetLabel`, `yAxis.showTargetLabel` | `number \| string`, `string`, `boolean` | No | Package defaults | Target line and label controls. | Deviation Bar uses the x-axis target fields; renderer support varies by chart family. |
97
- | `yAxis.inlineLabel`, `yAxis.labelPlacement`, `yAxis.labelsAboveGridlines` | `string`, `string`, `boolean` | No | None, package defaults, `false` | Inline suffix/label controls for the left Y axis. | Used by line and bar axis-label rendering and auto-padding helpers. |
99
+ | `yAxis.inlineLabel`, `yAxis.labelPlacement`, `yAxis.labelsAboveGridlines` | `string`, `string`, `boolean` | No | None, package defaults, `false` | Inline suffix/label controls for the left Y axis. | Used by line and bar axis-label rendering. For non-Combo charts, when `inlineLabel` contains a space, runtime treats the primary automatic Y-axis max as effectively clean-top-tick even if `autoMaxStrategy` is `default`; if the raw max is within one quarter of a tick interval from the top generated tick, runtime adds one more interval for label headroom. Valid explicit max values bypass this automatic finalization. Combo charts do not use this automatic inline-label headroom, so manual Y-axis padding remains available. |
98
100
  | `yAxis.rightLabel`, `yAxis.rightNumTicks`, `yAxis.rightAxisSize`, `yAxis.rightLabelOffsetSize` | `string`, `number`, `number`, `number` | No | `''`, package defaults | Right-axis label, tick, width, and offset controls. | Used by combo and line-capable dual-axis charts. |
99
101
  | `yAxis.rightAxisLabelColor`, `yAxis.rightAxisTickLabelColor`, `yAxis.rightAxisTickColor` | CSS color string | No | Package defaults | Right-axis label, tick-label, and tick-mark colors. | Only meaningful when right-axis series are configured. |
100
102
  | `yAxis.rightHideAxis`, `yAxis.rightHideLabel`, `yAxis.rightHideTicks` | `boolean` | No | `false` | Hides the right-axis line, label, or ticks. | Only meaningful when right-axis series are configured. |
@@ -200,13 +202,15 @@ Axis settings are chart-owned because their meaning depends on chart family, ori
200
202
  | `twoColor.palette` | `string` | No | `monochrome-1` | Palette used for two-color chart variants. | Used when the chart switches to a paired/deviation bar color treatment. |
201
203
  | `twoColor.isPaletteReversed` | `boolean` | No | `false` | Reverses the two-color palette variant. | Current active reversal flag for two-color palettes. |
202
204
  | `general.palette.isReversed` | `boolean` | No | `true` for current chart defaults | Reverses the active palette order. | Current active reversal flag for the main palette. The top-level `isPaletteReversed` field is legacy. |
205
+ | `general.palette.colorAssignmentMode` | `ordered \| by-value` | No | `ordered` when omitted | Enables authored by-series color assignment. | `by-value` is required before `colorAssignments` affects chart colors; assignment presence alone does not activate it. |
206
+ | `general.palette.colorAssignments` | `{ key: string; color: string }[]` | No | `[]` | Assigns colors to stable authored chart series keys. | Supported for regular Line, Bar, Combo, Area Chart, Scatter Plot, and by-series Small Multiples. `key` should match `series[].dataKey`; stale keys are ignored and may be removed by editor updates. |
203
207
  | `pieType` | `Regular \| Donut` | No | `Regular` | Chooses between a full pie and a donut chart. | Only meaningful for `Pie` charts. |
204
208
  | `showAreaUnderLine` | `boolean` | No | `false` | Fills the area below line series. | Primarily used by line and small-multiple line charts. |
205
209
  | `showLineSeriesLabels` | `boolean` | No | `false` | Appends the series name at the end of line and combo series. | Only meaningful for line-capable charts. |
206
210
  | `colorMatchLineSeriesLabels` | `boolean` | No | `false` | Matches end labels to the series color. | Only relevant when `showLineSeriesLabels` is enabled. |
207
211
  | `stackedAreaChartLineType` | `string` | No | `Linear` | Chooses the curve used by stacked area charts. | Mapped to the supported curve set in the editor. |
208
212
  | `hideXAxisLabel` | `boolean` | No | `false` | Hides the rendered x-axis label. | Mostly used by small multiples and compact layouts. |
209
- | `hideYAxisLabel` | `boolean` | No | `false` | Hides the rendered y-axis label. | Mostly used by small multiples and compact layouts. Hidden top-positioned Y-axis titles do not trigger top-title auto-padding, except small multiples still preserve padding for titles hidden only by repeated-tile layout. In small multiples, the leading tile in each row keeps the y-axis title visible while the other tiles hide it, including when `yAxis.titlePlacement` is `top`. |
213
+ | `hideYAxisLabel` | `boolean` | No | `false` | Hides the rendered y-axis label. | Mostly used by small multiples and compact layouts. In small multiples, the leading tile in each row keeps the y-axis title visible while the other tiles hide it, including when `yAxis.titlePlacement` is `top`. |
210
214
 
211
215
  ### Number Formatting: `dataFormat.*`
212
216
 
@@ -218,7 +222,7 @@ These fields are chart-owned. They are applied by chart number-format helpers fo
218
222
  | `dataFormat.abbreviated` | `boolean` | No | `false` | Abbreviates large or small left/value-axis numbers. | Only applied when the formatter decides the value should be abbreviated. |
219
223
  | `dataFormat.roundTo` | `number` | No | `0` when omitted | Decimal precision for left/value-axis numbers and many chart values. | Ignored for a value when `preserveOriginalDecimals` is true. |
220
224
  | `dataFormat.preserveOriginalDecimals` | `boolean` | No | `false` | Preserves each value's original decimal places. | Bypasses the configured decimal precision for left, right, and bottom formatting. |
221
- | `dataFormat.prefix`, `dataFormat.suffix` | `string` | No | `''` | Text added before or after left/value-axis numbers. | Examples: `$`, `%`. Column-level prefixes and suffixes can override these for table/additional-column output. |
225
+ | `dataFormat.prefix`, `dataFormat.suffix` | `string` | No | `''` | Text added before or after left/value-axis numbers. | Examples: `$`, `%`. Non-empty column-level prefixes and suffixes can override these for table/additional-column output; blank column values fall back to these fields. |
222
226
  | `dataFormat.rightCommas` | `boolean` | No | `false` | Adds grouping to right-axis numbers. | Used by dual-axis charts. |
223
227
  | `dataFormat.rightRoundTo` | `number` | No | `0` when omitted | Decimal precision for right-axis numbers. | Used by dual-axis charts. |
224
228
  | `dataFormat.rightPrefix`, `dataFormat.rightSuffix` | `string` | No | `''` | Text added before or after right-axis numbers. | Used by dual-axis charts. |
@@ -249,7 +253,7 @@ These fields are chart-owned. They are applied by chart number-format helpers fo
249
253
  | `legend.style` | `circles \| boxes \| gradient \| lines` | No | `circles` | Chooses marker style for legend items. | `gradient` is used by gradient/warming-stripes-style legends. |
250
254
  | `legend.subStyle` | `linear blocks \| smooth` | No | `linear blocks` | Chooses gradient legend treatment. | Only meaningful for gradient-style legends. |
251
255
  | `legend.shape`, `legend.hasShape` | `string`, `boolean` | No | `circle`, package defaults | Shape metadata for shape-based legend entries. | Used by pattern and specialized legend rendering. |
252
- | `legend.tickRotation` | `number \| string` | No | `''` | Rotates gradient legend tick labels. | Saved configs may store a numeric string. |
256
+ | `legend.tickRotation` | `number \| string` | No | `''` | Rotates gradient legend tick labels. | Saved configs may store a numeric string. Ignored by HeatMap block gradient legends. |
253
257
  | `legend.groupBy` | `string` | No | `''` | Groups legend items by a source field. | Advanced legend layout option. |
254
258
  | `legend.order` | `dataColumn \| asc \| desc` | No | `dataColumn` | Controls legend item ordering. | `dataColumn` follows the data/config order. |
255
259
  | `legend.orderedValues` | `{ label?: string; value?: string }[]` | No | `[]` | Explicit legend order/labels. | Used when custom ordering is needed. |
@@ -310,8 +314,8 @@ HeatMap-specific behavior:
310
314
  | --- | --- |
311
315
  | Aggregation | If multiple source rows share the same x-axis value and series key, their numeric values are summed into one cell. |
312
316
  | Tooltips | HeatMap cells use the shared chart tooltip markup. `series[].tooltip: false` hides that series row/value from cell tooltips. Column configs with `tooltips: true` can add extra rows unless they refer to the x-axis column or one of the heatmap series columns. Aggregated cells show an aggregated-row count and show `Multiple values` for extra tooltip columns that disagree across source rows. |
313
- | Palette and legend | HeatMap colors come from `general.palette` or the chart fallback palette. `heatmap.colorBucketCount` quantizes the scale into 1-9 colors. `legend.style: "gradient"` or an omitted style renders a block-based gradient legend. Non-gradient legend styles render generated value ranges. |
314
- | Axis labels | `xAxis.tickRotation` or `xAxis.maxTickRotation` rotates column labels and contributes to x-axis title spacing. `yAxis.tickRotation` rotates row labels. HeatMap defaults `yAxis.titlePlacement` to `side` when it is not explicitly authored. `yAxis.titlePlacement: "top"` renders the row-axis title above the row labels, aligned with the top x-axis title when one is visible; side placement renders the rotated side title centered beside the row labels. `hideXAxisLabel` and `hideYAxisLabel` hide the axis titles; `xAxis.hideLabel` and `yAxis.hideLabel` hide tick labels. |
317
+ | Palette and legend | HeatMap colors come from `general.palette` or the chart fallback palette. `heatmap.colorBucketCount` quantizes the scale into 1-9 colors. `legend.style: "gradient"` or an omitted style renders a block-based gradient legend with one value-range label per block; HeatMap normalizes `legend.subStyle: "smooth"` to `linear blocks` and ignores `legend.tickRotation`. Non-gradient legend styles render generated value ranges. |
318
+ | Axis labels | `xAxis.tickRotation` or `xAxis.maxTickRotation` rotates column labels and contributes to x-axis title spacing. `yAxis.tickRotation` rotates row labels. HeatMap defaults `yAxis.titlePlacement` to `side` when it is not explicitly authored. `yAxis.titlePlacement: "top"` renders the row-axis title above the row labels, aligned with the top x-axis title when one is visible; side placement renders the rotated side title centered beside the row labels. `xAxis.hideAxis` and `xAxis.hideTicks` hide the Date/Category axis line and tick marks. `hideXAxisLabel` and `hideYAxisLabel` hide the axis titles; `xAxis.hideLabel` and `yAxis.hideLabel` hide tick labels. |
315
319
 
316
320
  ### Small Multiples: `smallMultiples.*`
317
321
 
@@ -845,8 +845,6 @@ var yn = "KwAAAAAAAAAACA4AUD0AADAgAAACAAAAAAAIABAAGABAAEgAUABYAGAAaABgAGgAYgBqAF
845
845
  case "rem":
846
846
  case "em":
847
847
  return 16 * e.number;
848
- // TODO use correct font-size
849
- case "px":
850
848
  default:
851
849
  return e.number;
852
850
  }
@@ -1529,7 +1527,6 @@ var SB = {
1529
1527
  case "repeat-y":
1530
1528
  case "no-repeat repeat":
1531
1529
  return 3;
1532
- case "repeat":
1533
1530
  default:
1534
1531
  return 0;
1535
1532
  }
@@ -1609,13 +1606,7 @@ var Ca = {
1609
1606
  prefix: !1,
1610
1607
  type: 2,
1611
1608
  parse: function(e, A) {
1612
- switch (A) {
1613
- case "rtl":
1614
- return 1;
1615
- case "ltr":
1616
- default:
1617
- return 0;
1618
- }
1609
+ return A === "rtl" ? 1 : 0;
1619
1610
  }
1620
1611
  }, Ta = {
1621
1612
  name: "display",
@@ -1732,13 +1723,7 @@ var Ga = {
1732
1723
  prefix: !1,
1733
1724
  type: 2,
1734
1725
  parse: function(e, A) {
1735
- switch (A) {
1736
- case "strict":
1737
- return Je.STRICT;
1738
- case "normal":
1739
- default:
1740
- return Je.NORMAL;
1741
- }
1726
+ return A === "strict" ? Je.STRICT : Je.NORMAL;
1742
1727
  }
1743
1728
  }, Ra = {
1744
1729
  name: "line-height",
@@ -1762,13 +1747,7 @@ var Ga = {
1762
1747
  prefix: !1,
1763
1748
  type: 2,
1764
1749
  parse: function(e, A) {
1765
- switch (A) {
1766
- case "inside":
1767
- return 0;
1768
- case "outside":
1769
- default:
1770
- return 1;
1771
- }
1750
+ return A === "inside" ? 0 : 1;
1772
1751
  }
1773
1752
  }, _r = {
1774
1753
  name: "list-style-type",
@@ -1883,7 +1862,6 @@ var Ga = {
1883
1862
  return 50;
1884
1863
  case "disclosure-closed":
1885
1864
  return 51;
1886
- case "none":
1887
1865
  default:
1888
1866
  return -1;
1889
1867
  }
@@ -1912,7 +1890,6 @@ var Ga = {
1912
1890
  return 3;
1913
1891
  case "auto":
1914
1892
  return 4;
1915
- case "visible":
1916
1893
  default:
1917
1894
  return 0;
1918
1895
  }
@@ -1924,13 +1901,7 @@ var Ga = {
1924
1901
  prefix: !1,
1925
1902
  type: 2,
1926
1903
  parse: function(e, A) {
1927
- switch (A) {
1928
- case "break-word":
1929
- return "break-word";
1930
- case "normal":
1931
- default:
1932
- return "normal";
1933
- }
1904
+ return A === "break-word" ? "break-word" : "normal";
1934
1905
  }
1935
1906
  }, ar = function(e) {
1936
1907
  return {
@@ -1952,7 +1923,6 @@ var Ga = {
1952
1923
  case "center":
1953
1924
  case "justify":
1954
1925
  return 1;
1955
- case "left":
1956
1926
  default:
1957
1927
  return 0;
1958
1928
  }
@@ -2071,7 +2041,6 @@ var Ga = {
2071
2041
  return 1;
2072
2042
  case "collapse":
2073
2043
  return 2;
2074
- case "visible":
2075
2044
  default:
2076
2045
  return 0;
2077
2046
  }
@@ -2091,7 +2060,6 @@ var oi = {
2091
2060
  return ae.BREAK_ALL;
2092
2061
  case "keep-all":
2093
2062
  return ae.KEEP_ALL;
2094
- case "normal":
2095
2063
  default:
2096
2064
  return ae.NORMAL;
2097
2065
  }
@@ -2192,17 +2160,7 @@ var oi = {
2192
2160
  type: 0,
2193
2161
  prefix: !1,
2194
2162
  parse: function(e, A) {
2195
- if (kA(A))
2196
- return A.number;
2197
- if (D(A))
2198
- switch (A.value) {
2199
- case "bold":
2200
- return 700;
2201
- case "normal":
2202
- default:
2203
- return 400;
2204
- }
2205
- return 400;
2163
+ return kA(A) ? A.number : D(A) && A.value === "bold" ? 700 : 400;
2206
2164
  }
2207
2165
  }, fi = {
2208
2166
  name: "font-variant",
@@ -2225,7 +2183,6 @@ var oi = {
2225
2183
  return "oblique";
2226
2184
  case "italic":
2227
2185
  return "italic";
2228
- case "normal":
2229
2186
  default:
2230
2187
  return "normal";
2231
2188
  }
@@ -3439,7 +3396,6 @@ var qi = 1, Ur = 2, Fr = 3, Tt = 4, St = 5, ji = 7, Ot = 8, hr = 9, dr = 10, Mt
3439
3396
  return T(e, 3664, 3673, !0, r);
3440
3397
  case 46:
3441
3398
  return T(e, 3872, 3881, !0, r);
3442
- case 3:
3443
3399
  default:
3444
3400
  return T(e, 48, 57, !0, r);
3445
3401
  }
@@ -4049,7 +4005,6 @@ var x = function(e, A, t, r, B) {
4049
4005
  return eA(e.topRightBorderBox, e.topRightPaddingBox, e.bottomRightBorderBox, e.bottomRightPaddingBox);
4050
4006
  case 2:
4051
4007
  return eA(e.bottomRightBorderBox, e.bottomRightPaddingBox, e.bottomLeftBorderBox, e.bottomLeftPaddingBox);
4052
- case 3:
4053
4008
  default:
4054
4009
  return eA(e.bottomLeftBorderBox, e.bottomLeftPaddingBox, e.topLeftBorderBox, e.topLeftPaddingBox);
4055
4010
  }
@@ -4061,7 +4016,6 @@ var x = function(e, A, t, r, B) {
4061
4016
  return eA(e.topRightBorderBox, e.topRightBorderDoubleOuterBox, e.bottomRightBorderBox, e.bottomRightBorderDoubleOuterBox);
4062
4017
  case 2:
4063
4018
  return eA(e.bottomRightBorderBox, e.bottomRightBorderDoubleOuterBox, e.bottomLeftBorderBox, e.bottomLeftBorderDoubleOuterBox);
4064
- case 3:
4065
4019
  default:
4066
4020
  return eA(e.bottomLeftBorderBox, e.bottomLeftBorderDoubleOuterBox, e.topLeftBorderBox, e.topLeftBorderDoubleOuterBox);
4067
4021
  }
@@ -4073,7 +4027,6 @@ var x = function(e, A, t, r, B) {
4073
4027
  return eA(e.topRightBorderDoubleInnerBox, e.topRightPaddingBox, e.bottomRightBorderDoubleInnerBox, e.bottomRightPaddingBox);
4074
4028
  case 2:
4075
4029
  return eA(e.bottomRightBorderDoubleInnerBox, e.bottomRightPaddingBox, e.bottomLeftBorderDoubleInnerBox, e.bottomLeftPaddingBox);
4076
- case 3:
4077
4030
  default:
4078
4031
  return eA(e.bottomLeftBorderDoubleInnerBox, e.bottomLeftPaddingBox, e.topLeftBorderDoubleInnerBox, e.topLeftPaddingBox);
4079
4032
  }
@@ -4085,7 +4038,6 @@ var x = function(e, A, t, r, B) {
4085
4038
  return Oe(e.topRightBorderStroke, e.bottomRightBorderStroke);
4086
4039
  case 2:
4087
4040
  return Oe(e.bottomRightBorderStroke, e.bottomLeftBorderStroke);
4088
- case 3:
4089
4041
  default:
4090
4042
  return Oe(e.bottomLeftBorderStroke, e.topLeftBorderStroke);
4091
4043
  }
@@ -4706,7 +4658,6 @@ var x = function(e, A, t, r, B) {
4706
4658
  return Ze(A);
4707
4659
  case 2:
4708
4660
  return BQ(A);
4709
- case 1:
4710
4661
  default:
4711
4662
  return qe(A);
4712
4663
  }
@@ -4716,7 +4667,6 @@ var x = function(e, A, t, r, B) {
4716
4667
  return "center";
4717
4668
  case 2:
4718
4669
  return "right";
4719
- case 0:
4720
4670
  default:
4721
4671
  return "left";
4722
4672
  }