@cdc/core 4.26.1 → 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.
- package/.claude/agents/qa-test-developer.md +126 -0
- package/CLAUDE.local.md +67 -0
- package/LICENSE +201 -0
- package/_stories/Gallery.Charts.stories.tsx +35 -42
- package/_stories/Gallery.DataBite.stories.tsx +15 -8
- package/_stories/Gallery.Maps.stories.tsx +37 -28
- package/_stories/Gallery.WaffleChart.stories.tsx +1 -1
- package/_stories/PageART.stories.tsx +5 -4
- package/_stories/PageBRFSS.stories.tsx +21 -16
- package/_stories/PageCancerRegistries.stories.tsx +15 -15
- package/_stories/PageEasternEquineEncephalitis.stories.tsx +33 -19
- package/_stories/PageExcessiveAlcoholUse.stories.tsx +148 -143
- package/_stories/PageMaternalMortality.stories.tsx +5 -4
- package/_stories/PageOralHealth.stories.tsx +15 -10
- package/_stories/PageRespiratory.stories.tsx +4 -4
- package/_stories/PageSmokingTobacco.stories.tsx +15 -10
- package/_stories/PageStateDiabetesProfiles.stories.tsx +15 -10
- package/_stories/PageWastewater.stories.tsx +44 -30
- package/_stories/VegaImport.stories.tsx +401 -0
- package/_stories/vega-fixtures/bars-with-line.json +444 -0
- package/_stories/vega-fixtures/bars.json +58 -0
- package/_stories/vega-fixtures/combo-bar-rolling-mean.json +88 -0
- package/_stories/vega-fixtures/combo.json +68 -0
- package/_stories/vega-fixtures/grouped-horizontal-bars.json +83 -0
- package/_stories/vega-fixtures/grouped-horizontal-bars2.json +231 -0
- package/_stories/vega-fixtures/horizontal-bar.json +427 -0
- package/_stories/vega-fixtures/horizontal-bars-with-bad-colors.json +197 -0
- package/_stories/vega-fixtures/horizontal-bars2.json +58 -0
- package/_stories/vega-fixtures/lines.json +227 -0
- package/_stories/vega-fixtures/measles-bars.json +348 -0
- package/_stories/vega-fixtures/measles-map.json +11101 -0
- package/_stories/vega-fixtures/measles-stacked-bars.json +2147 -0
- package/_stories/vega-fixtures/multi-dataset.json +255 -0
- package/_stories/vega-fixtures/no-data.json +14 -0
- package/_stories/vega-fixtures/pie-chart.json +94 -0
- package/_stories/vega-fixtures/repeat-spec.json +47 -0
- package/_stories/vega-fixtures/stacked-area.json +222 -0
- package/_stories/vega-fixtures/stacked-bar-with-rect.json +3412 -0
- package/_stories/vega-fixtures/stacked-bars-with-line.json +364 -0
- package/_stories/vega-fixtures/stacked-bars.json +212 -0
- package/_stories/vega-fixtures/stacked-horizontal-bars.json +140 -0
- package/_stories/vega-fixtures/warning-combo.json +59 -0
- package/_stories/vega-fixtures/warning-scatter-and-line.json +1182 -0
- package/assets/callout-flag.svg +7 -0
- package/assets/icon-chart-area.svg +1 -0
- package/assets/icon-chart-radar.svg +23 -0
- package/assets/logo2.svg +31 -0
- package/components/AdvancedEditor/EmbedEditor.tsx +270 -38
- package/components/Alert/components/Alert.styles.css +2 -2
- package/components/ComboBox/combobox.styles.css +48 -48
- package/components/CustomColorsEditor/CustomColorsEditor.css +53 -53
- package/components/CustomColorsEditor/CustomColorsEditor.tsx +3 -10
- package/components/DataTable/DataTable.tsx +46 -18
- package/components/DataTable/DataTableStandAlone.tsx +1 -0
- package/components/DataTable/components/ChartHeader.tsx +21 -12
- package/components/DataTable/components/MapHeader.tsx +34 -28
- package/components/DataTable/components/SortIcon/sort-icon.css +5 -5
- package/components/DataTable/data-table.css +50 -52
- package/components/DataTable/helpers/applyCustomOrder.ts +17 -0
- package/components/DataTable/helpers/getChartCellValue.ts +10 -7
- package/components/DataTable/helpers/getMapDataTableColumnKeys.ts +22 -0
- package/components/DataTable/helpers/getSeriesName.ts +6 -0
- package/components/DataTable/helpers/mapCellMatrix.tsx +33 -23
- package/components/DataTable/helpers/tests/mapCellMatrix.test.ts +33 -0
- package/components/DownloadButton.tsx +14 -6
- package/components/EditorPanel/ColumnsEditor.tsx +38 -31
- package/components/EditorPanel/CustomSortOrder.tsx +94 -0
- package/components/EditorPanel/DataTableEditor.tsx +139 -23
- package/components/EditorPanel/EditorPanel.styles.css +71 -71
- package/components/EditorPanel/EditorPanel.tsx +3 -8
- package/components/EditorPanel/EditorPanelDispatch.tsx +4 -4
- package/components/EditorPanel/FootnotesEditor.tsx +2 -2
- package/components/EditorPanel/VizFilterEditor/NestedDropdownEditor.tsx +21 -12
- package/components/EditorPanel/VizFilterEditor/VizFilterEditor.tsx +16 -10
- package/components/EditorPanel/VizFilterEditor/components/FilterOrder.tsx +33 -29
- package/components/EditorPanel/components/MarkupVariablesEditor.tsx +160 -106
- package/components/EditorPanel/components/PanelMarkup.tsx +5 -1
- package/{styles/v2/components → components/EditorPanel}/editor.scss +76 -22
- package/components/EditorPanel/sections/StyleTreatmentSection.tsx +99 -0
- package/components/EditorPanel/sections/VisualSection.tsx +11 -0
- package/components/EditorWrapper/editor-wrapper.style.css +1 -1
- package/components/Filters/Filters.tsx +3 -5
- package/components/Filters/components/Tabs.tsx +19 -7
- package/{styles → components/Filters}/filters.scss +3 -3
- package/components/Footnotes/FootnotesStandAlone.tsx +4 -2
- package/components/HeaderThemeSelector/HeaderThemeSelector.css +61 -5
- package/components/Layout/components/Responsive.tsx +14 -6
- package/components/Layout/components/Sidebar/components/Sidebar.tsx +1 -1
- package/components/Layout/components/Sidebar/components/sidebar.styles.scss +14 -20
- package/components/Layout/components/Visualization/index.tsx +50 -38
- package/components/Layout/components/Visualization/visualizations.scss +232 -15
- package/components/Layout/components/VisualizationContainer.test.tsx +67 -0
- package/components/Layout/components/VisualizationContainer.tsx +37 -0
- package/components/Layout/components/VisualizationContent.test.tsx +182 -0
- package/components/Layout/components/VisualizationContent.tsx +75 -0
- package/components/Layout/index.tsx +5 -5
- package/components/Layout/styles/editor-utils.scss +3 -3
- package/components/Layout/styles/editor.scss +4 -4
- package/components/Legend/Legend.Gradient.tsx +7 -1
- package/components/Loader/loader.styles.css +2 -2
- package/components/Loading.jsx +1 -1
- package/components/MediaControls.tsx +10 -3
- package/components/MultiSelect/multiselect.styles.css +19 -19
- package/components/NestedDropdown/nesteddropdown.styles.css +15 -15
- package/components/PaletteSelector/PaletteSelector.css +15 -15
- package/components/RichTooltip/richTooltip.css +6 -6
- package/components/Table/table.styles.css +2 -2
- package/components/Waiting.tsx +1 -1
- package/components/_stories/CustomColorsEditor.stories.tsx +37 -0
- package/components/_stories/DataTable.stories.tsx +1 -0
- package/components/_stories/Filters.stories.tsx +1 -1
- package/components/_stories/styles.scss +0 -1
- package/components/elements/Button.jsx +1 -1
- package/components/elements/Card.jsx +1 -1
- package/{styles/v2/components → components/elements}/button.scss +9 -8
- package/components/inputs/InputCheckbox.jsx +1 -1
- package/components/inputs/InputSelect.tsx +1 -1
- package/components/inputs/InputText.jsx +1 -1
- package/components/inputs/InputToggle.tsx +1 -1
- package/{styles/v2/components/input → components/inputs}/_input-check-radio.scss +2 -2
- package/{styles/v2/components/input → components/inputs}/_input-group.scss +3 -3
- package/{styles/v2/components/input → components/inputs}/_input-slider.scss +2 -2
- package/{styles/v2/components/input → components/inputs}/_input.scss +5 -5
- package/{styles/v2/components/input → components/inputs}/index.scss +2 -2
- package/{styles → components}/loading.scss +1 -1
- package/components/managers/DataDesigner.tsx +1 -1
- package/{styles/v2/components → components/managers}/data-designer.scss +6 -7
- package/components/ui/Accordion.jsx +1 -1
- package/components/ui/Icon.tsx +1 -1
- package/components/ui/LoadSpin.jsx +1 -1
- package/components/ui/Modal.jsx +1 -1
- package/components/ui/Overlay.jsx +1 -1
- package/components/ui/Title/index.test.tsx +34 -0
- package/components/ui/Title/index.tsx +24 -7
- package/components/ui/Title/title.styles.css +119 -25
- package/components/ui/Tooltip.tsx +1 -1
- package/components/ui/_stories/Title.stories.tsx +1 -1
- package/{styles/v2/components → components/ui}/accordion.scss +3 -3
- package/components/ui/accordion.styles.css +11 -11
- package/{styles/v2/components → components/ui}/modal.scss +2 -2
- package/{styles/v2/components → components/ui}/overlay.scss +6 -6
- package/{styles/v2/components → components}/ui/tooltip.scss +1 -1
- package/{styles → components}/waiting.scss +9 -3
- package/data/colorPalettes.ts +18 -5
- package/data/mapColorPalettes.ts +10 -0
- package/devTemplate/dev.js +285 -0
- package/devTemplate/index.html +30 -0
- package/devTemplate/preview.html +1503 -0
- package/devTemplate/sidebar.css +151 -0
- package/dist/cove-main.css +2530 -3901
- package/dist/cove-main.css.map +1 -1
- package/generateViteConfig.js +111 -2
- package/helpers/DataTransform.ts +1 -5
- package/helpers/backfillDefaults.ts +35 -0
- package/helpers/constants.ts +12 -0
- package/helpers/cove/date.ts +64 -3
- package/helpers/cove/number.ts +29 -15
- package/helpers/cove/string.ts +29 -0
- package/helpers/coveUpdateWorker.ts +14 -8
- package/helpers/displayDataAsText.ts +1 -1
- package/helpers/embed/embedCodeGenerator.ts +80 -0
- package/helpers/embed/embedHelper.js +169 -0
- package/helpers/embed/filterUtils.ts +121 -0
- package/helpers/embed/index.ts +17 -0
- package/helpers/embed/urlValidation.ts +119 -0
- package/helpers/extractDataAndMetadata.ts +20 -0
- package/helpers/fetchRemoteData.ts +14 -8
- package/helpers/filterVizData.ts +6 -1
- package/helpers/getFileExtension.ts +0 -6
- package/helpers/labelHash.ts +9 -0
- package/helpers/markupProcessor.ts +56 -38
- package/helpers/metrics/types.ts +3 -0
- package/helpers/palettes/colorDistributions.ts +1 -1
- package/helpers/palettes/utils.ts +12 -12
- package/helpers/parseCsvWithQuotes.ts +15 -14
- package/helpers/prepareScreenshot.ts +33 -10
- package/helpers/testing.ts +44 -0
- package/helpers/tests/DataTransform.test.ts +125 -0
- package/helpers/tests/abbreviateNumber.test.ts +59 -0
- package/helpers/tests/backfillDefaults.test.ts +253 -0
- package/helpers/tests/date.test.ts +110 -0
- package/helpers/tests/extractDataAndMetadata.test.ts +93 -0
- package/helpers/tests/markupProcessor.test.ts +315 -124
- package/helpers/tests/number.test.ts +42 -0
- package/helpers/tests/prepareScreenshot.test.ts +28 -28
- package/helpers/tests/testStandaloneBuild.ts +36 -26
- package/helpers/tests/useDataVizClasses.test.ts +66 -0
- package/helpers/tests/visualizationWrapperUsage.test.ts +57 -0
- package/helpers/useDataVizClasses.ts +13 -7
- package/helpers/vegaConfig.ts +1 -1
- package/helpers/vegaConfigImport.ts +160 -0
- package/helpers/ver/4.24.4.ts +24 -0
- package/helpers/ver/4.26.1.ts +1 -1
- package/helpers/ver/4.26.2.ts +84 -0
- package/helpers/ver/4.26.3.ts +44 -0
- package/helpers/ver/4.26.4.ts +31 -0
- package/helpers/ver/tests/4.26.1.test.ts +105 -0
- package/helpers/ver/tests/4.26.2.test.ts +298 -0
- package/helpers/ver/tests/4.26.3.test.ts +168 -0
- package/helpers/ver/tests/4.26.4.test.ts +88 -0
- package/helpers/ver/tests/coveUpdateWorker.test.ts +57 -0
- package/helpers/viewports.ts +2 -0
- package/package.json +27 -32
- package/styles/_global.scss +7 -7
- package/styles/_reset.scss +2 -2
- package/styles/{v2/base → base}/_file-selector.scss +4 -4
- package/styles/{v2/base → base}/_general.scss +2 -4
- package/styles/{v2/base → base}/index.scss +1 -1
- package/styles/base.scss +107 -165
- package/styles/cove-main.scss +3 -6
- package/styles/layout/_component.scss +110 -0
- package/styles/{v2/layout → layout}/_data-table.scss +7 -7
- package/styles/layout/_wrapper-padding.scss +27 -0
- package/styles/{v2/main.scss → main.scss} +3 -1
- package/styles/{v2/themes → themes}/_color-definitions.scss +46 -41
- package/styles/{_accessibility.scss → utils/_accessibility.scss} +1 -1
- package/styles/{v2/utils → utils}/_grid.scss +8 -3
- package/styles/{_global-variables.scss → utils/_properties.scss} +133 -112
- package/styles/{v2/utils → utils}/index.scss +2 -1
- package/types/Annotation.ts +10 -11
- package/types/Axis.ts +2 -0
- package/types/ComponentStyles.ts +1 -0
- package/types/ConfigureData.ts +1 -0
- package/types/General.ts +2 -0
- package/types/MarkupInclude.ts +1 -0
- package/types/MarkupVariable.ts +2 -1
- package/types/Palette.ts +22 -0
- package/types/Table.ts +9 -0
- package/types/Visualization.ts +7 -0
- package/_stories/StoryRenderingTests.stories.tsx +0 -164
- package/helpers/embedCodeGenerator.ts +0 -109
- package/styles/_common-components.css +0 -73
- package/styles/_variables.scss +0 -63
- package/styles/v2/layout/_component.scss +0 -21
- package/styles/v2/utils/_variables.scss +0 -9
- package/{styles/v2/components/card.scss → components/elements/card.css} +2 -2
- /package/{styles/v2/components → components/ui}/icon.scss +0 -0
- /package/{styles/v2/components → components/ui}/loadspin.scss +0 -0
- /package/styles/{v2/base → base}/_heading.scss +0 -0
- /package/styles/{v2/base → base}/_reset.scss +0 -0
- /package/styles/{v2/layout → layout}/_alert.scss +0 -0
- /package/styles/{v2/layout → layout}/_progression.scss +0 -0
- /package/styles/{v2/layout → layout}/_tooltip.scss +0 -0
- /package/styles/{v2/layout → layout}/index.scss +0 -0
- /package/styles/{v2/themes → themes}/index.scss +0 -0
- /package/styles/{v2/utils → utils}/_align.scss +0 -0
- /package/styles/{v2/utils → utils}/_animations.scss +0 -0
- /package/styles/{v2/utils → utils}/_breakpoints.scss +0 -0
- /package/styles/{v2/utils → utils}/_mixins.scss +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
@import '../../../styles/
|
|
1
|
+
@import '../../../styles/utils/properties';
|
|
2
2
|
|
|
3
3
|
$editorAnimationTimer: 400ms;
|
|
4
4
|
$mediumGray: #e6e6e6;
|
|
@@ -81,7 +81,7 @@ $mediumGray: #e6e6e6;
|
|
|
81
81
|
|
|
82
82
|
@at-root {
|
|
83
83
|
.cove-editor {
|
|
84
|
-
width:
|
|
84
|
+
width: var(--editorWidth);
|
|
85
85
|
}
|
|
86
86
|
}
|
|
87
87
|
}
|
|
@@ -127,8 +127,8 @@ $mediumGray: #e6e6e6;
|
|
|
127
127
|
background-color: #e6e6e6;
|
|
128
128
|
transition: background-color 400ms cubic-bezier(0.16, 1, 0.3, 1);
|
|
129
129
|
overflow: hidden auto;
|
|
130
|
-
width: calc(100% -
|
|
131
|
-
left:
|
|
130
|
+
width: calc(100% - var(--editorWidth));
|
|
131
|
+
left: var(--editorWidth);
|
|
132
132
|
@at-root {
|
|
133
133
|
.cove-editor.panel-shown #{&} {
|
|
134
134
|
background-color: #e7e7e7;
|
|
@@ -99,7 +99,13 @@ const LegendGradient = ({
|
|
|
99
99
|
if (style === 'gradient') {
|
|
100
100
|
return (
|
|
101
101
|
// TODO: figure out why bootstrap 'overflow: visible' is not working consistently
|
|
102
|
-
<svg
|
|
102
|
+
<svg
|
|
103
|
+
className={'w-100 overflow-visible'}
|
|
104
|
+
height={newHeight}
|
|
105
|
+
style={{ display: 'block', maxWidth: '100%', overflow: 'visible' }}
|
|
106
|
+
viewBox={`0 0 ${width} ${newHeight}`}
|
|
107
|
+
width='100%'
|
|
108
|
+
>
|
|
103
109
|
{/* background border*/}
|
|
104
110
|
<rect x={0} y={0} width={legendWidth + MARGIN * 2} height={boxHeight + MARGIN * 2} fill={BORDER_COLOR} />
|
|
105
111
|
{/* Define the gradient */}
|
package/components/Loading.jsx
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
|
-
// import html2pdf from 'html2pdf.js'
|
|
3
2
|
import { publishAnalyticsEvent } from '@cdc/core/helpers/metrics/helpers'
|
|
4
3
|
import { getVizTitle, getVizSubType } from '@cdc/core/helpers/metrics/utils'
|
|
5
4
|
import { prepareScreenshotContainer } from '@cdc/core/helpers/prepareScreenshot'
|
|
@@ -162,6 +161,13 @@ const Button = ({
|
|
|
162
161
|
}) => {
|
|
163
162
|
const buttonClasses = ['btn', 'btn-primary']
|
|
164
163
|
|
|
164
|
+
const label =
|
|
165
|
+
type === 'csv'
|
|
166
|
+
? state?.table?.downloadDataLabel || buttonText[type]
|
|
167
|
+
: type === 'image'
|
|
168
|
+
? state?.table?.downloadImageLabel || buttonText[type]
|
|
169
|
+
: buttonText[type]
|
|
170
|
+
|
|
165
171
|
return (
|
|
166
172
|
<button
|
|
167
173
|
className={buttonClasses.join(' ')}
|
|
@@ -169,7 +175,7 @@ const Button = ({
|
|
|
169
175
|
onClick={() => generateMedia(state, type, elementToCapture, interactionLabel, includeContextInDownload)}
|
|
170
176
|
style={{ lineHeight: '1.4em' }}
|
|
171
177
|
>
|
|
172
|
-
{
|
|
178
|
+
{label}
|
|
173
179
|
</button>
|
|
174
180
|
)
|
|
175
181
|
}
|
|
@@ -185,7 +191,8 @@ const DownloadLink = ({
|
|
|
185
191
|
}) => {
|
|
186
192
|
const vizType = state?.type === 'map' ? 'Map' : 'Chart'
|
|
187
193
|
const format = type === 'pdf' ? 'PDF' : 'PNG'
|
|
188
|
-
const
|
|
194
|
+
const defaultLinkText = `Download ${vizType} (${format})`
|
|
195
|
+
const linkText = type === 'image' ? state?.table?.downloadImageLabel || defaultLinkText : defaultLinkText
|
|
189
196
|
|
|
190
197
|
return (
|
|
191
198
|
<a
|
|
@@ -3,45 +3,45 @@
|
|
|
3
3
|
display: block;
|
|
4
4
|
}
|
|
5
5
|
.wrapper {
|
|
6
|
-
display: inline-flex;
|
|
7
6
|
align-items: center;
|
|
7
|
+
display: inline-flex;
|
|
8
8
|
width: 100%;
|
|
9
9
|
.selected {
|
|
10
10
|
&[aria-disabled='true'] {
|
|
11
11
|
background: var(--lightestGray);
|
|
12
12
|
}
|
|
13
13
|
border: 1px solid var(--lightGray);
|
|
14
|
-
|
|
14
|
+
border-radius: 5px;
|
|
15
|
+
display: inline-block;
|
|
15
16
|
min-width: 200px;
|
|
17
|
+
padding: 7px;
|
|
16
18
|
width: 100%;
|
|
17
|
-
display: inline-block;
|
|
18
19
|
:is(button) {
|
|
19
|
-
border: none;
|
|
20
20
|
background: none;
|
|
21
|
+
border: none;
|
|
21
22
|
}
|
|
22
23
|
:is(div) {
|
|
23
|
-
display: inline-block;
|
|
24
|
-
padding: 0 0 0 5px;
|
|
25
|
-
margin-right: 5px;
|
|
26
|
-
margin-bottom: 2px;
|
|
27
24
|
background: var(--lightGray);
|
|
28
25
|
border-radius: 5px;
|
|
26
|
+
display: inline-block;
|
|
27
|
+
margin-bottom: 2px;
|
|
28
|
+
margin-right: 5px;
|
|
29
|
+
padding: 0 0 0 5px;
|
|
29
30
|
}
|
|
30
31
|
.expand {
|
|
31
|
-
|
|
32
|
-
margin-right: -6px;
|
|
32
|
+
color: var(--mediumGray);
|
|
33
33
|
float: right;
|
|
34
34
|
margin-bottom: -3px;
|
|
35
|
-
|
|
35
|
+
margin-right: -6px;
|
|
36
|
+
padding: 2px 0px;
|
|
36
37
|
&:focus {
|
|
37
38
|
outline: none;
|
|
38
39
|
}
|
|
39
40
|
}
|
|
40
|
-
border-radius: 5px;
|
|
41
41
|
}
|
|
42
42
|
.cove-tooltip__content {
|
|
43
|
-
position: absolute;
|
|
44
43
|
min-width: 120px;
|
|
44
|
+
position: absolute;
|
|
45
45
|
:is(p) {
|
|
46
46
|
margin-bottom: 0;
|
|
47
47
|
}
|
|
@@ -52,15 +52,15 @@
|
|
|
52
52
|
}
|
|
53
53
|
.dropdown {
|
|
54
54
|
background: white;
|
|
55
|
-
position: absolute;
|
|
56
|
-
top: var(--select-height);
|
|
57
|
-
margin-top: 0px;
|
|
58
55
|
border: 1px solid var(--lightGray);
|
|
59
|
-
|
|
60
|
-
min-height: 40px;
|
|
56
|
+
margin-top: 0px;
|
|
61
57
|
max-height: 200px;
|
|
62
|
-
|
|
58
|
+
min-height: 40px;
|
|
63
59
|
min-width: 200px;
|
|
60
|
+
overflow-y: scroll;
|
|
61
|
+
padding-left: 0;
|
|
62
|
+
position: absolute;
|
|
63
|
+
top: var(--select-height);
|
|
64
64
|
z-index: 4;
|
|
65
65
|
|
|
66
66
|
:is(li) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
.cdc-dashboard-inner-container.cove-
|
|
1
|
+
.cdc-dashboard-inner-container.cove-visualization__body.cove-dashboard-filters-container:has(
|
|
2
2
|
> .nested-dropdown.open-filter
|
|
3
3
|
)
|
|
4
4
|
:has(> .nested-dropdown-container) {
|
|
@@ -16,14 +16,14 @@
|
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
.search-input {
|
|
19
|
-
color: var(--cool-gray-90);
|
|
20
|
-
font-weight: 300;
|
|
21
19
|
|
|
22
20
|
border: none;
|
|
23
|
-
|
|
21
|
+
color: var(--cool-gray-90);
|
|
24
22
|
display: inline-block;
|
|
25
|
-
|
|
23
|
+
font-weight: 300;
|
|
26
24
|
padding: 0;
|
|
25
|
+
position: relative;
|
|
26
|
+
width: 100%;
|
|
27
27
|
&::placeholder {
|
|
28
28
|
color: var(--cool-gray-90);
|
|
29
29
|
}
|
|
@@ -36,21 +36,21 @@
|
|
|
36
36
|
[class^='main-nested-dropdown-container-'],
|
|
37
37
|
.nested-dropdown-input-container {
|
|
38
38
|
border: 1px solid var(--cool-gray-10);
|
|
39
|
+
font-size: 1em;
|
|
39
40
|
min-width: 200px;
|
|
40
41
|
padding: 0.4rem 0.75rem;
|
|
41
|
-
font-size: 1em;
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
[class^='selectable-item-'] {
|
|
45
|
+
font-weight: normal;
|
|
45
46
|
list-style: none;
|
|
46
47
|
padding-left: 20px;
|
|
47
48
|
position: relative;
|
|
48
|
-
font-weight: normal;
|
|
49
49
|
white-space: nowrap;
|
|
50
50
|
|
|
51
51
|
& .check-mark {
|
|
52
|
-
position: absolute;
|
|
53
52
|
left: 0px;
|
|
53
|
+
position: absolute;
|
|
54
54
|
}
|
|
55
55
|
|
|
56
56
|
&:hover {
|
|
@@ -59,16 +59,16 @@
|
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
.nested-dropdown-input-container {
|
|
62
|
-
display: block;
|
|
63
|
-
width: calc(100% + 7px);
|
|
64
62
|
border-radius: 0.25rem;
|
|
63
|
+
display: block;
|
|
65
64
|
position: relative;
|
|
65
|
+
width: calc(100% + 7px);
|
|
66
66
|
& > span.list-arrow {
|
|
67
|
-
position: absolute;
|
|
68
|
-
top: 9px;
|
|
69
|
-
right: 9px;
|
|
70
67
|
float: right;
|
|
71
68
|
pointer-events: none;
|
|
69
|
+
position: absolute;
|
|
70
|
+
right: 9px;
|
|
71
|
+
top: 9px;
|
|
72
72
|
}
|
|
73
73
|
|
|
74
74
|
&.disabled {
|
|
@@ -80,12 +80,12 @@
|
|
|
80
80
|
}
|
|
81
81
|
|
|
82
82
|
& [class^='main-nested-dropdown-container-'] {
|
|
83
|
+
background: white;
|
|
83
84
|
max-height: 375px;
|
|
85
|
+
min-width: 200px;
|
|
84
86
|
overflow-y: auto;
|
|
85
87
|
position: absolute;
|
|
86
88
|
z-index: 3;
|
|
87
|
-
min-width: 200px;
|
|
88
|
-
background: white;
|
|
89
89
|
}
|
|
90
90
|
|
|
91
91
|
.hide {
|
|
@@ -7,12 +7,12 @@
|
|
|
7
7
|
|
|
8
8
|
/* List item-based palette selector (used by maps) */
|
|
9
9
|
.color-palette li {
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
border: rgba(0, 0, 0, 0.3) 3px solid;
|
|
11
|
+
cursor: pointer;
|
|
12
12
|
display: inline-block;
|
|
13
|
+
height: 1.5em;
|
|
13
14
|
margin-right: 0.5em;
|
|
14
|
-
|
|
15
|
-
border: rgba(0, 0, 0, 0.3) 3px solid;
|
|
15
|
+
width: 1.5em;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
.color-palette li.active {
|
|
@@ -33,25 +33,25 @@
|
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
.color-palette a {
|
|
36
|
-
display: inline-block;
|
|
37
36
|
border-bottom: 1px solid rgba(0, 0, 0, 0.8);
|
|
37
|
+
display: inline-block;
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
/* Series list variant */
|
|
41
41
|
.color-palette.series-list {
|
|
42
|
+
border: none;
|
|
42
43
|
flex-direction: column;
|
|
43
44
|
padding: 0;
|
|
44
|
-
border: none;
|
|
45
45
|
}
|
|
46
46
|
|
|
47
47
|
.color-palette.series-list li {
|
|
48
|
-
padding: 0.3em 0.5em;
|
|
49
|
-
display: flex;
|
|
50
48
|
align-items: center;
|
|
49
|
+
border: 0;
|
|
50
|
+
display: flex;
|
|
51
|
+
height: auto;
|
|
51
52
|
justify-content: space-between;
|
|
53
|
+
padding: 0.3em 0.5em;
|
|
52
54
|
width: auto;
|
|
53
|
-
height: auto;
|
|
54
|
-
border: 0;
|
|
55
55
|
}
|
|
56
56
|
|
|
57
57
|
.color-palette.series-list li:not(:last-child) {
|
|
@@ -60,18 +60,18 @@
|
|
|
60
60
|
|
|
61
61
|
/* Header variant */
|
|
62
62
|
.header .color-palette li {
|
|
63
|
-
width: 1.5em;
|
|
64
|
-
height: 1.5em;
|
|
65
63
|
display: inline-block;
|
|
64
|
+
height: 1.5em;
|
|
65
|
+
width: 1.5em;
|
|
66
66
|
}
|
|
67
67
|
|
|
68
68
|
/* Developer rollback component styles */
|
|
69
69
|
.developer-palette-rollback {
|
|
70
|
-
|
|
71
|
-
padding: 8px;
|
|
70
|
+
background-color: #fffbf0;
|
|
72
71
|
border: 1px dashed #ffc107;
|
|
73
72
|
border-radius: 4px;
|
|
74
|
-
|
|
73
|
+
margin: 8px 0;
|
|
74
|
+
padding: 8px;
|
|
75
75
|
}
|
|
76
76
|
|
|
77
77
|
.developer-palette-rollback .rollback-info {
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
.tooltip-link {
|
|
2
|
+
color: var(--cool-gray-90);
|
|
3
|
+
cursor: pointer;
|
|
4
|
+
font-family: var(--app-font-main);
|
|
5
|
+
font-size: 0.833rem !important;
|
|
6
|
+
position: relative;
|
|
2
7
|
text-decoration: underline;
|
|
3
8
|
text-decoration-color: var(--cool-gray-90);
|
|
4
9
|
text-decoration-style: dotted;
|
|
5
10
|
text-decoration-thickness: 2px;
|
|
6
11
|
text-underline-offset: 0.25rem;
|
|
7
|
-
position: relative;
|
|
8
|
-
cursor: pointer;
|
|
9
|
-
color: var(--cool-gray-90);
|
|
10
|
-
font-family: var(--app-font-main);
|
|
11
|
-
font-size: 0.833rem !important;
|
|
12
12
|
}
|
|
13
13
|
.tooltip-link:hover {
|
|
14
|
-
text-decoration-color: #009ec1;
|
|
15
14
|
color: var(--cool-gray-90);
|
|
15
|
+
text-decoration-color: #009ec1;
|
|
16
16
|
}
|
package/components/Waiting.tsx
CHANGED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import React, { useState } from 'react'
|
|
2
|
+
import type { Meta, StoryObj } from '@storybook/react-vite'
|
|
3
|
+
import CustomColorsEditor from '../CustomColorsEditor/CustomColorsEditor'
|
|
4
|
+
|
|
5
|
+
const meta: Meta<typeof CustomColorsEditor> = {
|
|
6
|
+
title: 'Components/Atoms/CustomColorsEditor',
|
|
7
|
+
component: CustomColorsEditor
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export default meta
|
|
11
|
+
type Story = StoryObj<typeof CustomColorsEditor>
|
|
12
|
+
|
|
13
|
+
const fiftyColors = [
|
|
14
|
+
'#e6194b', '#3cb44b', '#ffe119', '#4363d8', '#f58231',
|
|
15
|
+
'#911eb4', '#42d4f4', '#f032e6', '#bfef45', '#fabed4',
|
|
16
|
+
'#469990', '#dcbeff', '#9a6324', '#fffac8', '#800000',
|
|
17
|
+
'#aaffc3', '#808000', '#ffd8b1', '#000075', '#a9a9a9',
|
|
18
|
+
'#e6194b', '#3cb44b', '#ffe119', '#4363d8', '#f58231',
|
|
19
|
+
'#911eb4', '#42d4f4', '#f032e6', '#bfef45', '#fabed4',
|
|
20
|
+
'#469990', '#dcbeff', '#9a6324', '#fffac8', '#800000',
|
|
21
|
+
'#aaffc3', '#808000', '#ffd8b1', '#000075', '#a9a9a9',
|
|
22
|
+
'#e41a1c', '#377eb8', '#4daf4a', '#984ea3', '#ff7f00',
|
|
23
|
+
'#ffff33', '#a65628', '#f781bf', '#999999', '#66c2a5'
|
|
24
|
+
]
|
|
25
|
+
|
|
26
|
+
const Wrapper = ({ initialColors }: { initialColors: string[] }) => {
|
|
27
|
+
const [colors, setColors] = useState(initialColors)
|
|
28
|
+
return <CustomColorsEditor colors={colors} onChange={setColors} label='Custom Color Order' />
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export const Default: Story = {
|
|
32
|
+
render: () => <Wrapper initialColors={['#3366cc', '#dc3912', '#ff9900']} />
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export const FiftyColors: Story = {
|
|
36
|
+
render: () => <Wrapper initialColors={fiftyColors} />
|
|
37
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
@use 'sass:color';
|
|
2
|
-
@import '
|
|
3
|
-
@import '
|
|
2
|
+
@import '../../styles/utils/properties';
|
|
3
|
+
@import '../../styles/themes/index';
|
|
4
4
|
|
|
5
5
|
:root {
|
|
6
6
|
--cove-button-primary: var(--colors-blue-vivid-60);
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
-
.
|
|
32
|
+
.cove-visualization button.cove-button {
|
|
33
33
|
display: inline-block;
|
|
34
34
|
position: relative;
|
|
35
35
|
min-height: 2.125rem;
|
|
@@ -42,8 +42,8 @@
|
|
|
42
42
|
border-radius: 6px;
|
|
43
43
|
border: 0;
|
|
44
44
|
outline: none;
|
|
45
|
-
transition: background-color 500ms
|
|
46
|
-
border-color 500ms
|
|
45
|
+
transition: background-color 500ms var(--transition-expo-out), color 500ms var(--transition-expo-out),
|
|
46
|
+
border-color 500ms var(--transition-expo-out);
|
|
47
47
|
|
|
48
48
|
&.secondary {
|
|
49
49
|
background-color: var(--cove-button-secondary);
|
|
@@ -70,6 +70,7 @@
|
|
|
70
70
|
&:disabled {
|
|
71
71
|
background-color: var(--cove-button-primary-disabled);
|
|
72
72
|
color: var(--cove-button-primary-disabled-font-color);
|
|
73
|
+
border: none;
|
|
73
74
|
cursor: not-allowed;
|
|
74
75
|
}
|
|
75
76
|
|
|
@@ -140,7 +141,7 @@
|
|
|
140
141
|
|
|
141
142
|
.cove-button__text {
|
|
142
143
|
position: relative;
|
|
143
|
-
transition: width 500ms
|
|
144
|
+
transition: width 500ms var(--transition-expo-out);
|
|
144
145
|
align-self: stretch;
|
|
145
146
|
|
|
146
147
|
.cove-button__text--loading {
|
|
@@ -157,7 +158,7 @@
|
|
|
157
158
|
top: 0;
|
|
158
159
|
left: 0;
|
|
159
160
|
white-space: nowrap;
|
|
160
|
-
transition: all 500ms
|
|
161
|
+
transition: all 500ms var(--transition-expo-out);
|
|
161
162
|
}
|
|
162
163
|
}
|
|
163
164
|
|
|
@@ -170,6 +171,6 @@
|
|
|
170
171
|
.cove-button__text--loading,
|
|
171
172
|
.cove-button__load-spin {
|
|
172
173
|
white-space: nowrap;
|
|
173
|
-
transition: all 500ms
|
|
174
|
+
transition: all 500ms var(--transition-expo-out);
|
|
174
175
|
opacity: 0;
|
|
175
176
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { useState, useEffect, memo } from 'react'
|
|
2
2
|
import { useDebounce } from 'use-debounce'
|
|
3
3
|
|
|
4
|
-
import '
|
|
4
|
+
import './index.scss'
|
|
5
5
|
|
|
6
6
|
const InputText = memo(({ label, section = null, subsection = null, fieldName, updateField, value: stateValue, type = 'input', tooltip, placeholder, i = null, min = null, max = null, className, ...attributes }) => {
|
|
7
7
|
const [value, setValue] = useState(stateValue)
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
background-color: #f4f4f4;
|
|
80
80
|
border-radius: 3px;
|
|
81
81
|
box-shadow: inset 0 0 0 1px #c4c4c4;
|
|
82
|
-
transition: all 150ms
|
|
82
|
+
transition: all 150ms var(--transition-expo-out);
|
|
83
83
|
}
|
|
84
84
|
|
|
85
85
|
.cove-input__checkbox-check {
|
|
@@ -92,6 +92,6 @@
|
|
|
92
92
|
fill: #fff;
|
|
93
93
|
pointer-events: none;
|
|
94
94
|
transform: translateY(-1px);
|
|
95
|
-
transition: all 250ms
|
|
95
|
+
transition: all 250ms var(--transition-expo-out);
|
|
96
96
|
opacity: 0;
|
|
97
97
|
}
|
|
@@ -65,10 +65,10 @@
|
|
|
65
65
|
font-size: 1rem;
|
|
66
66
|
font-weight: 400;
|
|
67
67
|
line-height: 1.5;
|
|
68
|
-
color:
|
|
68
|
+
color: var(--baseColor);
|
|
69
69
|
text-align: center;
|
|
70
70
|
white-space: nowrap;
|
|
71
|
-
background-color:
|
|
72
|
-
border: 1px solid
|
|
71
|
+
background-color: var(--lightestGray);
|
|
72
|
+
border: 1px solid var(--lightGray);
|
|
73
73
|
border-radius: 0.1875rem;
|
|
74
74
|
}
|
|
@@ -167,7 +167,7 @@
|
|
|
167
167
|
background-color: #fff;
|
|
168
168
|
box-shadow: -2px 4px 10px -7px rgb(0 0 0);
|
|
169
169
|
border-radius: 100%;
|
|
170
|
-
transition: all 200ms
|
|
170
|
+
transition: all 200ms var(--transition-expo-out);
|
|
171
171
|
z-index: 2;
|
|
172
172
|
}
|
|
173
173
|
|
|
@@ -179,5 +179,5 @@
|
|
|
179
179
|
height: 100%;
|
|
180
180
|
background-color: #ccc;
|
|
181
181
|
border-radius: 999px;
|
|
182
|
-
transition: all 200ms
|
|
182
|
+
transition: all 200ms var(--transition-expo-out);
|
|
183
183
|
}
|
|
@@ -6,14 +6,14 @@
|
|
|
6
6
|
border-style: solid !important; // intentional use of !important for CDC
|
|
7
7
|
border-color: #cbcbcb !important; // intentional use of !important for CDC
|
|
8
8
|
border-radius: 0.1875rem;
|
|
9
|
-
transition: border-color 200ms
|
|
9
|
+
transition: border-color 200ms var(--transition-expo-out);
|
|
10
10
|
font-family: sans-serif;
|
|
11
|
-
color:
|
|
11
|
+
color: var(--baseColor);
|
|
12
12
|
width: 100%;
|
|
13
13
|
max-width: 100%;
|
|
14
14
|
|
|
15
15
|
&::placeholder {
|
|
16
|
-
transition: opacity 400ms
|
|
16
|
+
transition: opacity 400ms var(--transition-expo-out);
|
|
17
17
|
color: #b3b3b3;
|
|
18
18
|
opacity: 1;
|
|
19
19
|
}
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
display: inline-block;
|
|
43
43
|
margin-bottom: 0.5rem;
|
|
44
44
|
font-size: 0.75rem;
|
|
45
|
-
color:
|
|
45
|
+
color: var(--baseColor);
|
|
46
46
|
text-transform: uppercase;
|
|
47
47
|
user-select: none;
|
|
48
48
|
}
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
min-height: 140px;
|
|
53
53
|
max-width: 100%;
|
|
54
54
|
line-height: 1.5em;
|
|
55
|
-
color:
|
|
55
|
+
color: var(--baseColor);
|
|
56
56
|
}
|
|
57
57
|
|
|
58
58
|
.cove-input--hidden {
|