@guardian/interactive-component-library 0.3.1 → 0.3.2
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/dist/components/index.d.ts +3 -0
- package/dist/components/molecules/canvas-map/Map.d.ts +8 -0
- package/dist/components/molecules/canvas-map/Map.js +90 -0
- package/dist/components/molecules/canvas-map/context/MapContext.d.ts +19 -0
- package/dist/components/molecules/canvas-map/context/MapContext.js +20 -0
- package/dist/components/molecules/canvas-map/controls/ZoomControl.d.ts +6 -0
- package/dist/components/molecules/canvas-map/controls/ZoomControl.js +40 -0
- package/dist/components/molecules/canvas-map/controls/icons/index.d.ts +3 -0
- package/dist/components/molecules/canvas-map/controls/icons/minus.d.ts +1 -0
- package/dist/components/molecules/canvas-map/controls/icons/minus.js +25 -0
- package/dist/components/molecules/canvas-map/controls/icons/plus.d.ts +1 -0
- package/dist/components/molecules/canvas-map/controls/icons/plus.js +25 -0
- package/dist/components/molecules/canvas-map/controls/icons/reset.d.ts +3 -0
- package/dist/components/molecules/canvas-map/controls/icons/reset.js +25 -0
- package/dist/components/molecules/canvas-map/controls/index.d.ts +1 -0
- package/dist/components/molecules/canvas-map/controls/style.module.css.js +11 -0
- package/dist/components/molecules/canvas-map/index.d.ts +12 -0
- package/dist/components/molecules/canvas-map/lib/Feature.d.ts +44 -0
- package/dist/components/molecules/canvas-map/lib/Feature.js +113 -0
- package/dist/components/molecules/canvas-map/lib/FeatureCollection.d.ts +21 -0
- package/dist/components/molecules/canvas-map/lib/FeatureCollection.js +24 -0
- package/dist/components/molecules/canvas-map/lib/Map.d.ts +82 -0
- package/dist/components/molecules/canvas-map/lib/Map.js +267 -0
- package/dist/components/molecules/canvas-map/lib/View.d.ts +222 -0
- package/dist/components/molecules/canvas-map/lib/View.js +208 -0
- package/dist/components/molecules/canvas-map/lib/events/Dispatcher.d.ts +8 -0
- package/dist/components/molecules/canvas-map/lib/events/Dispatcher.js +35 -0
- package/dist/components/molecules/canvas-map/lib/events/MapEvent.d.ts +6 -0
- package/dist/components/molecules/canvas-map/lib/events/MapEvent.js +9 -0
- package/dist/components/molecules/canvas-map/lib/events/index.d.ts +2 -0
- package/dist/components/molecules/canvas-map/lib/formats/GeoJSON.d.ts +63 -0
- package/dist/components/molecules/canvas-map/lib/formats/GeoJSON.js +122 -0
- package/dist/components/molecules/canvas-map/lib/geometry/Geometry.d.ts +32 -0
- package/dist/components/molecules/canvas-map/lib/geometry/Geometry.js +41 -0
- package/dist/components/molecules/canvas-map/lib/geometry/LineString.d.ts +12 -0
- package/dist/components/molecules/canvas-map/lib/geometry/LineString.js +19 -0
- package/dist/components/molecules/canvas-map/lib/geometry/Point.d.ts +11 -0
- package/dist/components/molecules/canvas-map/lib/geometry/Point.js +22 -0
- package/dist/components/molecules/canvas-map/lib/geometry/Polygon.d.ts +16 -0
- package/dist/components/molecules/canvas-map/lib/geometry/Polygon.js +46 -0
- package/dist/components/molecules/canvas-map/lib/geometry/index.d.ts +4 -0
- package/dist/components/molecules/canvas-map/lib/interpolators/index.d.ts +2 -0
- package/dist/components/molecules/canvas-map/lib/interpolators/interpolateFeatures.d.ts +5 -0
- package/dist/components/molecules/canvas-map/lib/interpolators/interpolateFeatures.js +95 -0
- package/dist/components/molecules/canvas-map/lib/interpolators/interpolateStyles.d.ts +4 -0
- package/dist/components/molecules/canvas-map/lib/interpolators/interpolateStyles.js +65 -0
- package/dist/components/molecules/canvas-map/lib/layers/TextLayer.d.ts +52 -0
- package/dist/components/molecules/canvas-map/lib/layers/TextLayer.js +118 -0
- package/dist/components/molecules/canvas-map/lib/layers/VectorLayer.d.ts +57 -0
- package/dist/components/molecules/canvas-map/lib/layers/VectorLayer.js +136 -0
- package/dist/components/molecules/canvas-map/lib/layers/index.d.ts +3 -0
- package/dist/components/molecules/canvas-map/lib/projection/index.d.ts +27 -0
- package/dist/components/molecules/canvas-map/lib/projection/index.js +12 -0
- package/dist/components/molecules/canvas-map/lib/renderers/FeatureRenderer.d.ts +16 -0
- package/dist/components/molecules/canvas-map/lib/renderers/FeatureRenderer.js +90 -0
- package/dist/components/molecules/canvas-map/lib/renderers/MapRenderer.d.ts +6 -0
- package/dist/components/molecules/canvas-map/lib/renderers/MapRenderer.js +53 -0
- package/dist/components/molecules/canvas-map/lib/renderers/TextLayerRenderer.d.ts +21 -0
- package/dist/components/molecules/canvas-map/lib/renderers/TextLayerRenderer.js +133 -0
- package/dist/components/molecules/canvas-map/lib/renderers/VectorLayerRenderer.d.ts +10 -0
- package/dist/components/molecules/canvas-map/lib/renderers/VectorLayerRenderer.js +79 -0
- package/dist/components/molecules/canvas-map/lib/sources/VectorSource.d.ts +15 -0
- package/dist/components/molecules/canvas-map/lib/sources/VectorSource.js +53 -0
- package/dist/components/molecules/canvas-map/lib/styles/Fill.d.ts +7 -0
- package/dist/components/molecules/canvas-map/lib/styles/Fill.js +15 -0
- package/dist/components/molecules/canvas-map/lib/styles/Stroke.d.ts +24 -0
- package/dist/components/molecules/canvas-map/lib/styles/Stroke.js +22 -0
- package/dist/components/molecules/canvas-map/lib/styles/Style.d.ts +24 -0
- package/dist/components/molecules/canvas-map/lib/styles/Style.js +17 -0
- package/dist/components/molecules/canvas-map/lib/styles/Text.d.ts +146 -0
- package/dist/components/molecules/canvas-map/lib/styles/Text.js +116 -0
- package/dist/components/molecules/canvas-map/lib/styles/index.d.ts +4 -0
- package/dist/components/molecules/canvas-map/lib/util/array.d.ts +6 -0
- package/dist/components/molecules/canvas-map/lib/util/array.js +15 -0
- package/dist/components/molecules/canvas-map/lib/util/bboxFeature.d.ts +8 -0
- package/dist/components/molecules/canvas-map/lib/util/bboxFeature.js +24 -0
- package/dist/components/molecules/canvas-map/lib/util/bounds.d.ts +47 -0
- package/dist/components/molecules/canvas-map/lib/util/bounds.js +61 -0
- package/dist/components/molecules/canvas-map/lib/util/coordinate.d.ts +26 -0
- package/dist/components/molecules/canvas-map/lib/util/coordinate.js +35 -0
- package/dist/components/molecules/canvas-map/lib/util/debug.d.ts +11 -0
- package/dist/components/molecules/canvas-map/lib/util/debug.js +27 -0
- package/dist/components/molecules/canvas-map/lib/util/deflate.d.ts +36 -0
- package/dist/components/molecules/canvas-map/lib/util/distance.d.ts +1 -0
- package/dist/components/molecules/canvas-map/lib/util/distance.js +12 -0
- package/dist/components/molecules/canvas-map/lib/util/dom.d.ts +9 -0
- package/dist/components/molecules/canvas-map/lib/util/dom.js +28 -0
- package/dist/components/molecules/canvas-map/lib/util/extent.d.ts +98 -0
- package/dist/components/molecules/canvas-map/lib/util/extent.js +118 -0
- package/dist/components/molecules/canvas-map/lib/util/index.d.ts +6 -0
- package/dist/components/molecules/canvas-map/lib/util/memoise.d.ts +10 -0
- package/dist/components/molecules/canvas-map/lib/util/memoise.js +20 -0
- package/dist/components/molecules/canvas-map/lib/util/resolution.d.ts +9 -0
- package/dist/components/molecules/canvas-map/lib/util/resolution.js +11 -0
- package/dist/components/molecules/canvas-map/lib/util/simplify.d.ts +114 -0
- package/dist/components/molecules/canvas-map/lib/util/size.d.ts +32 -0
- package/dist/components/molecules/canvas-map/lib/util/size.js +53 -0
- package/dist/components/molecules/canvas-map/lib/util/toRgba.d.ts +1 -0
- package/dist/components/molecules/canvas-map/lib/util/toRgba.js +25 -0
- package/dist/components/molecules/canvas-map/lib/util/uid.d.ts +5 -0
- package/dist/components/molecules/canvas-map/lib/util/uid.js +7 -0
- package/dist/components/molecules/canvas-map/lib/util/zoomLevel.d.ts +2 -0
- package/dist/components/molecules/canvas-map/lib/util/zoomLevel.js +14 -0
- package/dist/components/molecules/canvas-map/style.module.scss.js +20 -0
- package/dist/components/molecules/column-chart/column-chart-example.d.ts +35 -0
- package/dist/components/molecules/column-chart/column-chart-util.d.ts +1 -0
- package/dist/components/molecules/column-chart/index.d.ts +11 -0
- package/dist/components/molecules/column-chart/index.js +63 -0
- package/dist/components/molecules/column-chart/style.module.css.js +14 -0
- package/dist/components/molecules/control-change/index.d.ts +6 -0
- package/dist/components/molecules/control-change/index.js +29 -0
- package/dist/components/molecules/control-change/style.module.css.js +11 -0
- package/dist/components/molecules/dropdown/index.d.ts +11 -0
- package/dist/components/molecules/dropdown/index.js +191 -0
- package/dist/components/molecules/dropdown/style.module.css.js +50 -0
- package/dist/components/molecules/first-past-the-post-waffle/index.d.ts +5 -0
- package/dist/components/molecules/first-past-the-post-waffle/index.js +14 -0
- package/dist/components/molecules/first-past-the-post-waffle/style.module.css.js +14 -0
- package/dist/components/molecules/index.d.ts +18 -0
- package/dist/components/molecules/modal/index.d.ts +8 -0
- package/dist/components/molecules/modal/index.js +59 -0
- package/dist/components/molecules/modal/style.module.css.js +26 -0
- package/dist/components/molecules/option-picker/index.d.ts +26 -0
- package/dist/components/molecules/option-picker/index.js +94 -0
- package/dist/components/molecules/option-picker/style.module.css.js +35 -0
- package/dist/components/molecules/page-section/index.d.ts +8 -0
- package/dist/components/molecules/page-section/index.js +52 -0
- package/dist/components/molecules/page-section/style.module.scss.js +20 -0
- package/dist/components/molecules/party-profile/index.d.ts +10 -0
- package/dist/components/molecules/party-profile/index.js +29 -0
- package/dist/components/molecules/party-profile/style.module.css.js +26 -0
- package/dist/components/molecules/refresh-indicator/index.d.ts +4 -0
- package/dist/components/molecules/refresh-indicator/index.js +18 -0
- package/dist/components/molecules/refresh-indicator/style.module.scss.js +17 -0
- package/dist/components/molecules/responsive-grid/index.d.ts +10 -0
- package/dist/components/molecules/responsive-grid/index.js +19 -0
- package/dist/components/molecules/responsive-grid/style.module.scss.js +8 -0
- package/dist/components/molecules/result-summary/index.d.ts +8 -0
- package/dist/components/molecules/result-summary/index.js +40 -0
- package/dist/components/molecules/result-summary/style.module.css.js +11 -0
- package/dist/components/molecules/search-input/icons/search.d.ts +1 -0
- package/dist/components/molecules/search-input/icons/search.js +24 -0
- package/dist/components/molecules/search-input/icons/search.module.css.js +11 -0
- package/dist/components/molecules/search-input/index.d.ts +11 -0
- package/dist/components/molecules/search-input/index.js +165 -0
- package/dist/components/molecules/search-input/style.module.css.js +32 -0
- package/dist/components/molecules/slope-chart/index.d.ts +16 -0
- package/dist/components/molecules/slope-chart/index.js +139 -0
- package/dist/components/molecules/slope-chart/style.module.css.js +35 -0
- package/dist/components/molecules/svg-map/context/MapContext.d.ts +1 -0
- package/dist/components/molecules/svg-map/context/MapContext.js +5 -0
- package/dist/components/molecules/svg-map/context/SVGMapProvider.d.ts +10 -0
- package/dist/components/molecules/svg-map/context/SVGMapProvider.js +88 -0
- package/dist/components/molecules/svg-map/helpers/bboxFeature.d.ts +8 -0
- package/dist/components/molecules/svg-map/helpers/bboxFeature.js +26 -0
- package/dist/components/molecules/svg-map/helpers/dynamicPropValue.d.ts +1 -0
- package/dist/components/molecules/svg-map/helpers/dynamicPropValue.js +9 -0
- package/dist/components/molecules/svg-map/helpers/geoMath.d.ts +4 -0
- package/dist/components/molecules/svg-map/helpers/saveSVG.d.ts +1 -0
- package/dist/components/molecules/svg-map/hooks/useCamera.d.ts +0 -0
- package/dist/components/molecules/svg-map/hooks/useThrowIfNonLayerChildren.d.ts +4 -0
- package/dist/components/molecules/svg-map/hooks/useThrowIfNonLayerChildren.js +19 -0
- package/dist/components/molecules/svg-map/index.d.ts +38 -0
- package/dist/components/molecules/svg-map/index.js +121 -0
- package/dist/components/molecules/svg-map/layers/CompositionBorders.d.ts +3 -0
- package/dist/components/molecules/svg-map/layers/CompositionBorders.js +14 -0
- package/dist/components/molecules/svg-map/layers/Line.d.ts +7 -0
- package/dist/components/molecules/svg-map/layers/Line.js +48 -0
- package/dist/components/molecules/svg-map/layers/Point.d.ts +10 -0
- package/dist/components/molecules/svg-map/layers/Point.js +59 -0
- package/dist/components/molecules/svg-map/layers/Polygon.d.ts +9 -0
- package/dist/components/molecules/svg-map/layers/Polygon.js +75 -0
- package/dist/components/molecules/svg-map/layers/Prerendered.d.ts +3 -0
- package/dist/components/molecules/svg-map/layers/Prerendered.js +11 -0
- package/dist/components/molecules/svg-map/layers/compositionBorders.module.scss.js +8 -0
- package/dist/components/molecules/svg-map/layers/index.d.ts +5 -0
- package/dist/components/molecules/svg-map/layers/index.js +12 -0
- package/dist/components/molecules/svg-map/renderers/SVGRenderer.d.ts +3 -0
- package/dist/components/molecules/svg-map/renderers/SVGRenderer.js +32 -0
- package/dist/components/molecules/svg-map/style.module.css.js +11 -0
- package/dist/components/molecules/table/index.d.ts +7 -0
- package/dist/components/molecules/table/index.js +90 -0
- package/dist/components/molecules/table/style.module.scss.js +29 -0
- package/dist/components/molecules/table/useTable.d.ts +8 -0
- package/dist/components/molecules/table/useTable.js +128 -0
- package/dist/components/molecules/tooltip/index.d.ts +82 -0
- package/dist/components/molecules/tooltip/index.js +117 -0
- package/dist/components/molecules/tooltip/style.module.css.js +8 -0
- package/dist/components/molecules/topline-result/index.d.ts +3 -0
- package/dist/components/molecules/topline-result/index.js +61 -0
- package/dist/components/molecules/topline-result/style.module.scss.js +38 -0
- package/dist/components/organisms/coalitions-tracker/index.d.ts +16 -0
- package/dist/components/organisms/coalitions-tracker/index.js +151 -0
- package/dist/components/organisms/coalitions-tracker/style.module.scss.js +32 -0
- package/dist/components/organisms/index.d.ts +2 -0
- package/dist/components/organisms/ticker/gradient/index.d.ts +1 -0
- package/dist/components/organisms/ticker/gradient/index.js +35 -0
- package/dist/components/organisms/ticker/gradient/style.module.scss.js +14 -0
- package/dist/components/organisms/ticker/index.d.ts +5 -0
- package/dist/components/organisms/ticker/index.js +102 -0
- package/dist/components/organisms/ticker/style.module.scss.js +32 -0
- package/dist/components/particles/ad-slot/index.d.ts +40 -0
- package/dist/components/particles/ad-slot/index.js +34 -0
- package/dist/components/particles/ad-slot/style.module.css.js +11 -0
- package/dist/components/particles/arrow-button/index.d.ts +6 -0
- package/dist/components/particles/arrow-button/index.js +32 -0
- package/dist/components/particles/arrow-button/style.module.css.js +11 -0
- package/dist/components/particles/aspect-ratio-box/index.d.ts +4 -0
- package/dist/components/particles/aspect-ratio-box/index.js +15 -0
- package/dist/components/particles/aspect-ratio-box/style.module.css.js +6 -0
- package/dist/components/particles/button/index.d.ts +6 -0
- package/dist/components/particles/button/index.js +10 -0
- package/dist/components/particles/button/style.module.css.js +11 -0
- package/dist/components/particles/change-bar/index.d.ts +8 -0
- package/dist/components/particles/change-bar/index.js +27 -0
- package/dist/components/particles/change-bar/style.module.scss.js +14 -0
- package/dist/components/particles/chevron/index.d.ts +6 -0
- package/dist/components/particles/chevron/index.js +78 -0
- package/dist/components/particles/chevron/style.module.css.js +20 -0
- package/dist/components/particles/circle-icon/index.d.ts +6 -0
- package/dist/components/particles/circle-icon/index.js +32 -0
- package/dist/components/particles/circle-icon/style.module.css.js +14 -0
- package/dist/components/particles/close-button/index.d.ts +5 -0
- package/dist/components/particles/close-button/index.js +35 -0
- package/dist/components/particles/close-button/style.module.css.js +17 -0
- package/dist/components/particles/container/index.d.ts +5 -0
- package/dist/components/particles/container/index.js +13 -0
- package/dist/components/particles/container/style.module.scss.js +11 -0
- package/dist/components/particles/gradient-icon/index.d.ts +1 -0
- package/dist/components/particles/gradient-icon/index.js +46 -0
- package/dist/components/particles/gradient-icon/style.module.css.js +14 -0
- package/dist/components/particles/index.d.ts +18 -0
- package/dist/components/particles/info-button/index.d.ts +3 -0
- package/dist/components/particles/info-button/index.js +19 -0
- package/dist/components/particles/info-button/style.module.css.js +11 -0
- package/dist/components/particles/legend-item/index.d.ts +6 -0
- package/dist/components/particles/legend-item/index.js +26 -0
- package/dist/components/particles/legend-item/style.module.css.js +17 -0
- package/dist/components/particles/relative-time-sentence/index.d.ts +4 -0
- package/dist/components/particles/relative-time-sentence/index.js +14 -0
- package/dist/components/particles/relative-time-sentence/style.module.css.js +8 -0
- package/dist/components/particles/square-cut-corner-icon/index.d.ts +6 -0
- package/dist/components/particles/square-cut-corner-icon/index.js +56 -0
- package/dist/components/particles/square-cut-corner-icon/style.module.scss.js +17 -0
- package/dist/components/particles/square-icon/index.d.ts +5 -0
- package/dist/components/particles/square-icon/index.js +28 -0
- package/dist/components/particles/square-icon/style.module.scss.js +11 -0
- package/dist/components/particles/stacked-bar/index.d.ts +23 -0
- package/dist/components/particles/stacked-bar/index.js +140 -0
- package/dist/components/particles/stacked-bar/style.module.css.js +17 -0
- package/dist/components/particles/stacked-grid/index.d.ts +6 -0
- package/dist/components/particles/stacked-grid/index.js +35 -0
- package/dist/components/particles/stacked-grid/style.module.css.js +20 -0
- package/dist/components/particles/waffle/index.d.ts +14 -0
- package/dist/components/particles/waffle/index.js +76 -0
- package/dist/components/particles/waffle/style.module.css.js +11 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +147 -0
- package/dist/shared/colors/index.d.ts +2 -0
- package/dist/shared/helpers/createStore.d.ts +1 -0
- package/dist/shared/helpers/geometry.d.ts +3 -0
- package/dist/shared/helpers/geometry.js +16 -0
- package/dist/shared/helpers/geometry.test.d.ts +1 -0
- package/dist/shared/helpers/labelsUtil.d.ts +54 -0
- package/dist/shared/helpers/labelsUtil.js +58 -0
- package/dist/shared/helpers/labelsUtils.test.d.ts +1 -0
- package/dist/shared/helpers/shouldUpdate.d.ts +7 -0
- package/dist/shared/hooks/index.d.ts +3 -0
- package/dist/shared/hooks/useContainerSize.d.ts +1 -0
- package/dist/shared/hooks/useContainerSize.js +24 -0
- package/dist/shared/hooks/useTouchOrHover.d.ts +7 -0
- package/dist/shared/hooks/useTouchOrHover.js +103 -0
- package/dist/shared/hooks/useWindowSize.d.ts +4 -0
- package/dist/shared/hooks/useWindowSize.js +27 -0
- package/dist/style.css +170 -82
- package/dist/styles/helpers/mergeStyles.d.ts +1 -0
- package/dist/styles/helpers/mergeStyles.js +22 -0
- package/dist/styles/helpers/mergeStyles.test.d.ts +1 -0
- package/dist/styles/theme.config.d.ts +124 -0
- package/package.json +19 -10
- package/dist/interactive-component-library.js +0 -8370
- package/dist/interactive-component-library.js.map +0 -1
- package/dist/interactive-component-library.umd.cjs +0 -8365
- package/dist/interactive-component-library.umd.cjs.map +0 -1
package/dist/style.css
CHANGED
|
@@ -1078,6 +1078,18 @@ button {
|
|
|
1078
1078
|
.bg-color--oth {
|
|
1079
1079
|
background-color: var(--oth) !important;
|
|
1080
1080
|
}
|
|
1081
|
+
.bg-color--ind-dem {
|
|
1082
|
+
background-color: var(--ind-dem) !important;
|
|
1083
|
+
}
|
|
1084
|
+
.bg-color--lib {
|
|
1085
|
+
background-color: var(--lib) !important;
|
|
1086
|
+
}
|
|
1087
|
+
.bg-color--grn {
|
|
1088
|
+
background-color: var(--grn) !important;
|
|
1089
|
+
}
|
|
1090
|
+
.bg-color--ken {
|
|
1091
|
+
background-color: var(--ken) !important;
|
|
1092
|
+
}
|
|
1081
1093
|
.bg-color--dem-2 {
|
|
1082
1094
|
background-color: var(--dem-2) !important;
|
|
1083
1095
|
}
|
|
@@ -1087,6 +1099,18 @@ button {
|
|
|
1087
1099
|
.bg-color--oth-2 {
|
|
1088
1100
|
background-color: var(--oth-2) !important;
|
|
1089
1101
|
}
|
|
1102
|
+
.bg-color--ind-dem-2 {
|
|
1103
|
+
background-color: var(--ind-dem-2) !important;
|
|
1104
|
+
}
|
|
1105
|
+
.bg-color--lib-2 {
|
|
1106
|
+
background-color: var(--lib-2) !important;
|
|
1107
|
+
}
|
|
1108
|
+
.bg-color--grn-2 {
|
|
1109
|
+
background-color: var(--grn-2) !important;
|
|
1110
|
+
}
|
|
1111
|
+
.bg-color--ken-2 {
|
|
1112
|
+
background-color: var(--ken-2) !important;
|
|
1113
|
+
}
|
|
1090
1114
|
.bg-color--undeclared {
|
|
1091
1115
|
background-color: var(--undeclared) !important;
|
|
1092
1116
|
}
|
|
@@ -1101,6 +1125,18 @@ button {
|
|
|
1101
1125
|
.fill-color--oth {
|
|
1102
1126
|
fill: var(--oth) !important;
|
|
1103
1127
|
}
|
|
1128
|
+
.fill-color--ind-dem {
|
|
1129
|
+
fill: var(--ind-dem) !important;
|
|
1130
|
+
}
|
|
1131
|
+
.fill-color--lib {
|
|
1132
|
+
fill: var(--lib) !important;
|
|
1133
|
+
}
|
|
1134
|
+
.fill-color--grn {
|
|
1135
|
+
fill: var(--grn) !important;
|
|
1136
|
+
}
|
|
1137
|
+
.fill-color--ken {
|
|
1138
|
+
fill: var(--ken) !important;
|
|
1139
|
+
}
|
|
1104
1140
|
.fill-color--dem-2 {
|
|
1105
1141
|
fill: var(--dem-2) !important;
|
|
1106
1142
|
}
|
|
@@ -1110,6 +1146,18 @@ button {
|
|
|
1110
1146
|
.fill-color--oth-2 {
|
|
1111
1147
|
fill: var(--oth-2) !important;
|
|
1112
1148
|
}
|
|
1149
|
+
.fill-color--ind-dem-2 {
|
|
1150
|
+
fill: var(--ind-dem-2) !important;
|
|
1151
|
+
}
|
|
1152
|
+
.fill-color--lib-2 {
|
|
1153
|
+
fill: var(--lib-2) !important;
|
|
1154
|
+
}
|
|
1155
|
+
.fill-color--grn-2 {
|
|
1156
|
+
fill: var(--grn-2) !important;
|
|
1157
|
+
}
|
|
1158
|
+
.fill-color--ken-2 {
|
|
1159
|
+
fill: var(--ken-2) !important;
|
|
1160
|
+
}
|
|
1113
1161
|
.fill-color--undeclared {
|
|
1114
1162
|
fill: var(--undeclared) !important;
|
|
1115
1163
|
}
|
|
@@ -1123,6 +1171,18 @@ button {
|
|
|
1123
1171
|
.stop-color--oth {
|
|
1124
1172
|
stop-color: var(--oth) !important;
|
|
1125
1173
|
}
|
|
1174
|
+
.stop-color--ind-dem {
|
|
1175
|
+
stop-color: var(--ind-dem) !important;
|
|
1176
|
+
}
|
|
1177
|
+
.stop-color--lib {
|
|
1178
|
+
stop-color: var(--lib) !important;
|
|
1179
|
+
}
|
|
1180
|
+
.stop-color--grn {
|
|
1181
|
+
stop-color: var(--grn) !important;
|
|
1182
|
+
}
|
|
1183
|
+
.stop-color--ken {
|
|
1184
|
+
stop-color: var(--ken) !important;
|
|
1185
|
+
}
|
|
1126
1186
|
.stop-color--undeclared {
|
|
1127
1187
|
stop-color: var(--undeclared) !important;
|
|
1128
1188
|
}
|
|
@@ -1136,6 +1196,18 @@ button {
|
|
|
1136
1196
|
.stroke-color--oth {
|
|
1137
1197
|
stroke: var(--oth) !important;
|
|
1138
1198
|
}
|
|
1199
|
+
.stroke-color--ind-dem {
|
|
1200
|
+
stroke: var(--ind-dem) !important;
|
|
1201
|
+
}
|
|
1202
|
+
.stroke-color--lib {
|
|
1203
|
+
stroke: var(--lib) !important;
|
|
1204
|
+
}
|
|
1205
|
+
.stroke-color--grn {
|
|
1206
|
+
stroke: var(--grn) !important;
|
|
1207
|
+
}
|
|
1208
|
+
.stroke-color--ken {
|
|
1209
|
+
stroke: var(--ken) !important;
|
|
1210
|
+
}
|
|
1139
1211
|
.stroke-color--undeclared {
|
|
1140
1212
|
stroke: var(--undeclared) !important;
|
|
1141
1213
|
}
|
|
@@ -1273,12 +1345,20 @@ body {
|
|
|
1273
1345
|
--undeclared: #ededed;
|
|
1274
1346
|
--declared: #fff;
|
|
1275
1347
|
--new-group-01: #333333;
|
|
1276
|
-
--dem: #
|
|
1348
|
+
--dem: #093ca3;
|
|
1277
1349
|
--gop: #c70000;
|
|
1278
|
-
--oth: #
|
|
1279
|
-
--dem
|
|
1350
|
+
--oth: #707070;
|
|
1351
|
+
--ind-dem: #7378d8;
|
|
1352
|
+
--lib: #c6b716;
|
|
1353
|
+
--grn: #0da498;
|
|
1354
|
+
--ken: #ef6f07;
|
|
1355
|
+
--dem-2: #dad7f5;
|
|
1280
1356
|
--gop-2: #ffdbd4;
|
|
1281
|
-
--oth-2: #
|
|
1357
|
+
--oth-2: #e7e7e7;
|
|
1358
|
+
--ind-dem-2: #dad7f5;
|
|
1359
|
+
--lib-2: #f4eac2;
|
|
1360
|
+
--grn-2: #cfedea;
|
|
1361
|
+
--ken-2: #ffe2cd;
|
|
1282
1362
|
--undeclared: #e7e7e7;
|
|
1283
1363
|
}
|
|
1284
1364
|
@media (prefers-color-scheme: dark) {
|
|
@@ -1377,12 +1457,20 @@ body {
|
|
|
1377
1457
|
--undeclared: #ededed;
|
|
1378
1458
|
--declared: #bababa;
|
|
1379
1459
|
--new-group-01: #cccccc;
|
|
1380
|
-
--dem: #
|
|
1381
|
-
--gop: #
|
|
1460
|
+
--dem: #3261db;
|
|
1461
|
+
--gop: #c70000;
|
|
1382
1462
|
--oth: #707070;
|
|
1383
|
-
--dem
|
|
1384
|
-
--
|
|
1463
|
+
--ind-dem: #7389d8;
|
|
1464
|
+
--lib: #c6b716;
|
|
1465
|
+
--grn: #23b4a9;
|
|
1466
|
+
--ken: #ef6f07;
|
|
1467
|
+
--dem-2: #20366d;
|
|
1468
|
+
--gop-2: #5a0b0b;
|
|
1385
1469
|
--oth-2: #333333;
|
|
1470
|
+
--ind-dem-2: #394261;
|
|
1471
|
+
--lib-2: #524d13;
|
|
1472
|
+
--grn-2: #19524e;
|
|
1473
|
+
--ken-2: #6a370e;
|
|
1386
1474
|
--undeclared: #494949;
|
|
1387
1475
|
}
|
|
1388
1476
|
}._svg_b5io0_1 {
|
|
@@ -2372,7 +2460,79 @@ body ._header_1xpz0_150._fullWidth_1xpz0_39 {
|
|
|
2372
2460
|
line-height: var(--sans-line-height);
|
|
2373
2461
|
color: var(--primary-text-color);
|
|
2374
2462
|
}
|
|
2375
|
-
|
|
2463
|
+
body {
|
|
2464
|
+
--top-inset: 0;
|
|
2465
|
+
}
|
|
2466
|
+
|
|
2467
|
+
body.android {
|
|
2468
|
+
--top-inset: 58px;
|
|
2469
|
+
}
|
|
2470
|
+
|
|
2471
|
+
._path_1cwd5_9 {
|
|
2472
|
+
stroke: var(--secondary-line-color);
|
|
2473
|
+
fill: none;
|
|
2474
|
+
}._container_9pdyv_1 {
|
|
2475
|
+
width: 100%;
|
|
2476
|
+
height: 100%;
|
|
2477
|
+
position: relative;
|
|
2478
|
+
}
|
|
2479
|
+
|
|
2480
|
+
._svg_9pdyv_7 {
|
|
2481
|
+
fill: none;
|
|
2482
|
+
stroke: #121212;
|
|
2483
|
+
stroke-width: 1;
|
|
2484
|
+
}
|
|
2485
|
+
body {
|
|
2486
|
+
--top-inset: 0;
|
|
2487
|
+
}
|
|
2488
|
+
|
|
2489
|
+
body.android {
|
|
2490
|
+
--top-inset: 58px;
|
|
2491
|
+
}
|
|
2492
|
+
|
|
2493
|
+
._mapContainer_1ogf3_9 {
|
|
2494
|
+
position: relative;
|
|
2495
|
+
width: 100%;
|
|
2496
|
+
height: 100%;
|
|
2497
|
+
}
|
|
2498
|
+
|
|
2499
|
+
._helpTextContainer_1ogf3_15 {
|
|
2500
|
+
position: absolute;
|
|
2501
|
+
width: 100%;
|
|
2502
|
+
height: 100%;
|
|
2503
|
+
top: 0;
|
|
2504
|
+
left: 0;
|
|
2505
|
+
z-index: 1;
|
|
2506
|
+
pointer-events: none;
|
|
2507
|
+
background-color: rgba(18, 18, 18, 0.4);
|
|
2508
|
+
display: flex;
|
|
2509
|
+
justify-content: center;
|
|
2510
|
+
align-items: center;
|
|
2511
|
+
transition: opacity 0.2s linear;
|
|
2512
|
+
}
|
|
2513
|
+
|
|
2514
|
+
._helpText_1ogf3_15 {
|
|
2515
|
+
margin-top: var(--space-5);
|
|
2516
|
+
font-family: var(--text-sans);
|
|
2517
|
+
font-weight: 700;
|
|
2518
|
+
font-size: var(--sans-large);
|
|
2519
|
+
line-height: var(--sans-line-height);
|
|
2520
|
+
color: #fff !important;
|
|
2521
|
+
margin-bottom: var(--space-3);
|
|
2522
|
+
}
|
|
2523
|
+
|
|
2524
|
+
._desktopHelpText_1ogf3_40 {
|
|
2525
|
+
display: none;
|
|
2526
|
+
}
|
|
2527
|
+
|
|
2528
|
+
@media (any-hover: hover) {
|
|
2529
|
+
._desktopHelpText_1ogf3_40 {
|
|
2530
|
+
display: block;
|
|
2531
|
+
}
|
|
2532
|
+
._mobileHelpText_1ogf3_48 {
|
|
2533
|
+
display: none;
|
|
2534
|
+
}
|
|
2535
|
+
}._svg_1dms8_1 {
|
|
2376
2536
|
width: 100%;
|
|
2377
2537
|
height: 100%;
|
|
2378
2538
|
fill: var(--primary-text-color);
|
|
@@ -2817,28 +2977,6 @@ body.android {
|
|
|
2817
2977
|
._checkmarkPath_6u92g_120 {
|
|
2818
2978
|
fill: var(--primary-text-color);
|
|
2819
2979
|
}
|
|
2820
|
-
body {
|
|
2821
|
-
--top-inset: 0;
|
|
2822
|
-
}
|
|
2823
|
-
|
|
2824
|
-
body.android {
|
|
2825
|
-
--top-inset: 58px;
|
|
2826
|
-
}
|
|
2827
|
-
|
|
2828
|
-
._path_1cwd5_9 {
|
|
2829
|
-
stroke: var(--secondary-line-color);
|
|
2830
|
-
fill: none;
|
|
2831
|
-
}._container_9pdyv_1 {
|
|
2832
|
-
width: 100%;
|
|
2833
|
-
height: 100%;
|
|
2834
|
-
position: relative;
|
|
2835
|
-
}
|
|
2836
|
-
|
|
2837
|
-
._svg_9pdyv_7 {
|
|
2838
|
-
fill: none;
|
|
2839
|
-
stroke: #121212;
|
|
2840
|
-
stroke-width: 1;
|
|
2841
|
-
}
|
|
2842
2980
|
._zoomControl_13wd1_1 {
|
|
2843
2981
|
display: inline-flex;
|
|
2844
2982
|
flex-direction: column;
|
|
@@ -2871,57 +3009,7 @@ body.android {
|
|
|
2871
3009
|
cursor: auto;
|
|
2872
3010
|
background-color: var(--tertiary-bg-color);
|
|
2873
3011
|
}
|
|
2874
|
-
|
|
2875
|
-
--top-inset: 0;
|
|
2876
|
-
}
|
|
2877
|
-
|
|
2878
|
-
body.android {
|
|
2879
|
-
--top-inset: 58px;
|
|
2880
|
-
}
|
|
2881
|
-
|
|
2882
|
-
._mapContainer_1ogf3_9 {
|
|
2883
|
-
position: relative;
|
|
2884
|
-
width: 100%;
|
|
2885
|
-
height: 100%;
|
|
2886
|
-
}
|
|
2887
|
-
|
|
2888
|
-
._helpTextContainer_1ogf3_15 {
|
|
2889
|
-
position: absolute;
|
|
2890
|
-
width: 100%;
|
|
2891
|
-
height: 100%;
|
|
2892
|
-
top: 0;
|
|
2893
|
-
left: 0;
|
|
2894
|
-
z-index: 1;
|
|
2895
|
-
pointer-events: none;
|
|
2896
|
-
background-color: rgba(18, 18, 18, 0.4);
|
|
2897
|
-
display: flex;
|
|
2898
|
-
justify-content: center;
|
|
2899
|
-
align-items: center;
|
|
2900
|
-
transition: opacity 0.2s linear;
|
|
2901
|
-
}
|
|
2902
|
-
|
|
2903
|
-
._helpText_1ogf3_15 {
|
|
2904
|
-
margin-top: var(--space-5);
|
|
2905
|
-
font-family: var(--text-sans);
|
|
2906
|
-
font-weight: 700;
|
|
2907
|
-
font-size: var(--sans-large);
|
|
2908
|
-
line-height: var(--sans-line-height);
|
|
2909
|
-
color: #fff !important;
|
|
2910
|
-
margin-bottom: var(--space-3);
|
|
2911
|
-
}
|
|
2912
|
-
|
|
2913
|
-
._desktopHelpText_1ogf3_40 {
|
|
2914
|
-
display: none;
|
|
2915
|
-
}
|
|
2916
|
-
|
|
2917
|
-
@media (any-hover: hover) {
|
|
2918
|
-
._desktopHelpText_1ogf3_40 {
|
|
2919
|
-
display: block;
|
|
2920
|
-
}
|
|
2921
|
-
._mobileHelpText_1ogf3_48 {
|
|
2922
|
-
display: none;
|
|
2923
|
-
}
|
|
2924
|
-
}._optionPicker_1b561_1 {
|
|
3012
|
+
._optionPicker_1b561_1 {
|
|
2925
3013
|
background-color: rgba(255, 255, 255, 0.6);
|
|
2926
3014
|
border: 1px solid var(--border-divider-color);
|
|
2927
3015
|
border-radius: 8px;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export function mergeStyles(firstStyle: any, secondStyle: any): any;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
function mergeStyles(firstStyle, secondStyle) {
|
|
2
|
+
if (!firstStyle) return secondStyle;
|
|
3
|
+
if (!secondStyle) return firstStyle;
|
|
4
|
+
if (typeof firstStyle === "string") {
|
|
5
|
+
if (typeof secondStyle !== "string") {
|
|
6
|
+
throw new Error("Styles to merge must be of the same type");
|
|
7
|
+
}
|
|
8
|
+
return firstStyle.concat(" ", secondStyle);
|
|
9
|
+
}
|
|
10
|
+
const allKeys = /* @__PURE__ */ new Set([
|
|
11
|
+
...Object.keys(firstStyle),
|
|
12
|
+
...Object.keys(secondStyle)
|
|
13
|
+
]);
|
|
14
|
+
const merged = Array.from(allKeys).reduce((result, key) => {
|
|
15
|
+
result[key] = mergeStyles(firstStyle[key], secondStyle[key]);
|
|
16
|
+
return result;
|
|
17
|
+
}, {});
|
|
18
|
+
return merged;
|
|
19
|
+
}
|
|
20
|
+
export {
|
|
21
|
+
mergeStyles
|
|
22
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
declare namespace _default {
|
|
2
|
+
let resets: string;
|
|
3
|
+
let breakpoints: {
|
|
4
|
+
readonly mobile: 320;
|
|
5
|
+
readonly mobileMedium: 375;
|
|
6
|
+
readonly mobileLandscape: 480;
|
|
7
|
+
readonly phablet: 660;
|
|
8
|
+
readonly tablet: 740;
|
|
9
|
+
readonly desktop: 980;
|
|
10
|
+
readonly leftCol: 1140;
|
|
11
|
+
readonly wide: 1300;
|
|
12
|
+
};
|
|
13
|
+
let space: {
|
|
14
|
+
readonly 0: 2;
|
|
15
|
+
readonly 1: 4;
|
|
16
|
+
readonly 2: 8;
|
|
17
|
+
readonly 3: 12;
|
|
18
|
+
readonly 4: 16;
|
|
19
|
+
readonly 5: 20;
|
|
20
|
+
readonly 6: 24;
|
|
21
|
+
readonly 8: 32;
|
|
22
|
+
readonly 9: 36;
|
|
23
|
+
readonly 10: 40;
|
|
24
|
+
readonly 12: 48;
|
|
25
|
+
readonly 14: 56;
|
|
26
|
+
readonly 16: 64;
|
|
27
|
+
readonly 18: 72;
|
|
28
|
+
readonly 24: 96;
|
|
29
|
+
};
|
|
30
|
+
namespace fontFamily {
|
|
31
|
+
let sans: string[];
|
|
32
|
+
let serif: string[];
|
|
33
|
+
let headline: string[];
|
|
34
|
+
let titlepiece: string[];
|
|
35
|
+
}
|
|
36
|
+
namespace textSizes {
|
|
37
|
+
let headline_1: {
|
|
38
|
+
readonly xxxsmall: 17;
|
|
39
|
+
readonly xxsmall: 20;
|
|
40
|
+
readonly xsmall: 24;
|
|
41
|
+
readonly small: 28;
|
|
42
|
+
readonly medium: 34;
|
|
43
|
+
readonly large: 42;
|
|
44
|
+
readonly xlarge: 50;
|
|
45
|
+
};
|
|
46
|
+
export { headline_1 as headline };
|
|
47
|
+
let sans_1: {
|
|
48
|
+
readonly xxsmall: 12;
|
|
49
|
+
readonly xsmall: 14;
|
|
50
|
+
readonly small: 15;
|
|
51
|
+
readonly medium: 17;
|
|
52
|
+
readonly large: 20;
|
|
53
|
+
readonly xlarge: 24;
|
|
54
|
+
readonly xxlarge: 28;
|
|
55
|
+
readonly xxxlarge: 34;
|
|
56
|
+
};
|
|
57
|
+
export { sans_1 as sans };
|
|
58
|
+
let titlepiece_1: {
|
|
59
|
+
readonly small: 42;
|
|
60
|
+
readonly medium: 50;
|
|
61
|
+
readonly large: 70;
|
|
62
|
+
};
|
|
63
|
+
export { titlepiece_1 as titlepiece };
|
|
64
|
+
export let body: {
|
|
65
|
+
readonly xsmall: 14;
|
|
66
|
+
readonly small: 15;
|
|
67
|
+
readonly medium: 17;
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
namespace lineHeights {
|
|
71
|
+
let tight: number;
|
|
72
|
+
let regular: number;
|
|
73
|
+
let loose: number;
|
|
74
|
+
}
|
|
75
|
+
namespace defaultLineHeights {
|
|
76
|
+
let headline_2: string;
|
|
77
|
+
export { headline_2 as headline };
|
|
78
|
+
let sans_2: string;
|
|
79
|
+
export { sans_2 as sans };
|
|
80
|
+
let titlepiece_2: string;
|
|
81
|
+
export { titlepiece_2 as titlepiece };
|
|
82
|
+
let body_1: string;
|
|
83
|
+
export { body_1 as body };
|
|
84
|
+
}
|
|
85
|
+
namespace colors {
|
|
86
|
+
let transparent: string;
|
|
87
|
+
let current: string;
|
|
88
|
+
let white: string;
|
|
89
|
+
let neutral: {
|
|
90
|
+
7: string;
|
|
91
|
+
10: string;
|
|
92
|
+
20: string;
|
|
93
|
+
38: string;
|
|
94
|
+
46: string;
|
|
95
|
+
60: string;
|
|
96
|
+
86: string;
|
|
97
|
+
93: string;
|
|
98
|
+
97: string;
|
|
99
|
+
100: string;
|
|
100
|
+
};
|
|
101
|
+
namespace party {
|
|
102
|
+
let con: string;
|
|
103
|
+
let lab: string;
|
|
104
|
+
let ld: string;
|
|
105
|
+
let ukip: string;
|
|
106
|
+
let ind: string;
|
|
107
|
+
let snp: string;
|
|
108
|
+
let sdlp: string;
|
|
109
|
+
let pc: string;
|
|
110
|
+
let sf: string;
|
|
111
|
+
let dup: string;
|
|
112
|
+
let green: string;
|
|
113
|
+
let alliance: string;
|
|
114
|
+
let uup: string;
|
|
115
|
+
let reform: string;
|
|
116
|
+
let other: string;
|
|
117
|
+
}
|
|
118
|
+
namespace elex {
|
|
119
|
+
let nocontrol: string;
|
|
120
|
+
let undeclared: string;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
export default _default;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@guardian/interactive-component-library",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.3.
|
|
4
|
+
"version": "0.3.2",
|
|
5
5
|
"packageManager": "pnpm@8.4.0",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -11,13 +11,10 @@
|
|
|
11
11
|
"files": [
|
|
12
12
|
"dist"
|
|
13
13
|
],
|
|
14
|
-
"
|
|
15
|
-
"
|
|
14
|
+
"module": "./dist/index.js",
|
|
15
|
+
"types": "./dist/index.d.ts",
|
|
16
16
|
"exports": {
|
|
17
|
-
".":
|
|
18
|
-
"import": "./dist/interactive-component-library.js",
|
|
19
|
-
"require": "./dist/interactive-component-library.umd.cjs"
|
|
20
|
-
},
|
|
17
|
+
".": "./dist/index.js",
|
|
21
18
|
"./dist/style.css": "./dist/style.css"
|
|
22
19
|
},
|
|
23
20
|
"engines": {
|
|
@@ -27,17 +24,29 @@
|
|
|
27
24
|
"scripts": {
|
|
28
25
|
"dev": "storybook dev -p 6006",
|
|
29
26
|
"build": "storybook build",
|
|
30
|
-
"build:lib": "vite build",
|
|
31
|
-
"build:lib:watch": "vite build --watch",
|
|
27
|
+
"build:lib": "vite build --mode lib",
|
|
28
|
+
"build:lib:watch": "vite build --mode lib --watch",
|
|
32
29
|
"lint": "eslint .",
|
|
33
30
|
"format": "prettier . --write",
|
|
34
31
|
"format:check": "prettier . --check",
|
|
35
32
|
"test": "vitest",
|
|
36
33
|
"test:cov": "vitest run --coverage",
|
|
37
|
-
"prepack": "json -f package.json -I -e \"delete this.devDependencies
|
|
34
|
+
"prepack": "json -f package.json -I -e \"delete this.devDependencies\"",
|
|
38
35
|
"generate:styles": "node scripts/generateStyles.js",
|
|
39
36
|
"prepare": "husky"
|
|
40
37
|
},
|
|
38
|
+
"dependencies": {
|
|
39
|
+
"@guardian/source": "^6.1.0",
|
|
40
|
+
"d3-composite-projections": "^1.4.0",
|
|
41
|
+
"d3-timer": "^3.0.1",
|
|
42
|
+
"d3-transition": "^3.0.1",
|
|
43
|
+
"dayjs": "^1.11.12",
|
|
44
|
+
"flatbush": "^4.4.0",
|
|
45
|
+
"preact-transitioning": "^1.4.2",
|
|
46
|
+
"rbush": "^4.0.0",
|
|
47
|
+
"rbush-knn": "^4.0.0",
|
|
48
|
+
"remark-gfm": "^4.0.0"
|
|
49
|
+
},
|
|
41
50
|
"peerDependencies": {
|
|
42
51
|
"d3-geo": "^3.1.1",
|
|
43
52
|
"d3-scale": "^4.0.2",
|