@guardian/interactive-component-library 0.3.1 → 0.3.2-rc1
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 +74 -74
- 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
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
const container = "_container_6u92g_1";
|
|
2
|
+
const button = "_button_6u92g_5";
|
|
3
|
+
const icon = "_icon_6u92g_22";
|
|
4
|
+
const title = "_title_6u92g_27";
|
|
5
|
+
const clearFix = "_clearFix_6u92g_34";
|
|
6
|
+
const popout = "_popout_6u92g_38";
|
|
7
|
+
const hint = "_hint_6u92g_55";
|
|
8
|
+
const groupHeader = "_groupHeader_6u92g_62";
|
|
9
|
+
const option = "_option_6u92g_69";
|
|
10
|
+
const selected = "_selected_6u92g_85";
|
|
11
|
+
const optionIcon = "_optionIcon_6u92g_94";
|
|
12
|
+
const optionTitle = "_optionTitle_6u92g_99";
|
|
13
|
+
const optionDescription = "_optionDescription_6u92g_107";
|
|
14
|
+
const checkmark = "_checkmark_6u92g_114";
|
|
15
|
+
const checkmarkPath = "_checkmarkPath_6u92g_120";
|
|
16
|
+
const defaultStyles = {
|
|
17
|
+
container,
|
|
18
|
+
button,
|
|
19
|
+
icon,
|
|
20
|
+
title,
|
|
21
|
+
clearFix,
|
|
22
|
+
popout,
|
|
23
|
+
hint,
|
|
24
|
+
groupHeader,
|
|
25
|
+
option,
|
|
26
|
+
selected,
|
|
27
|
+
optionIcon,
|
|
28
|
+
optionTitle,
|
|
29
|
+
optionDescription,
|
|
30
|
+
checkmark,
|
|
31
|
+
checkmarkPath
|
|
32
|
+
};
|
|
33
|
+
export {
|
|
34
|
+
button,
|
|
35
|
+
checkmark,
|
|
36
|
+
checkmarkPath,
|
|
37
|
+
clearFix,
|
|
38
|
+
container,
|
|
39
|
+
defaultStyles as default,
|
|
40
|
+
groupHeader,
|
|
41
|
+
hint,
|
|
42
|
+
icon,
|
|
43
|
+
option,
|
|
44
|
+
optionDescription,
|
|
45
|
+
optionIcon,
|
|
46
|
+
optionTitle,
|
|
47
|
+
popout,
|
|
48
|
+
selected,
|
|
49
|
+
title
|
|
50
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { jsxs, jsx } from "preact/jsx-runtime";
|
|
2
|
+
import defaultStyles from "./style.module.css.js";
|
|
3
|
+
import { mergeStyles } from "../../../styles/helpers/mergeStyles.js";
|
|
4
|
+
const FirstPastThePostWaffle = ({ styles, children, lineOverHang }) => {
|
|
5
|
+
styles = mergeStyles(defaultStyles, styles);
|
|
6
|
+
return /* @__PURE__ */ jsxs("div", { className: styles.wrapper, children: [
|
|
7
|
+
/* @__PURE__ */ jsx("p", { style: { height: lineOverHang + 20 }, className: styles.halfLineText, children: children.halfLineText }),
|
|
8
|
+
/* @__PURE__ */ jsx("div", { className: styles.line, children: " " }),
|
|
9
|
+
children.waffle
|
|
10
|
+
] });
|
|
11
|
+
};
|
|
12
|
+
export {
|
|
13
|
+
FirstPastThePostWaffle
|
|
14
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
const wrapper = "_wrapper_kh25l_1";
|
|
2
|
+
const line = "_line_kh25l_5";
|
|
3
|
+
const halfLineText = "_halfLineText_kh25l_15";
|
|
4
|
+
const defaultStyles = {
|
|
5
|
+
wrapper,
|
|
6
|
+
line,
|
|
7
|
+
halfLineText
|
|
8
|
+
};
|
|
9
|
+
export {
|
|
10
|
+
defaultStyles as default,
|
|
11
|
+
halfLineText,
|
|
12
|
+
line,
|
|
13
|
+
wrapper
|
|
14
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export * from './table';
|
|
2
|
+
export * from './slope-chart';
|
|
3
|
+
export * from './tooltip';
|
|
4
|
+
export * from './control-change';
|
|
5
|
+
export * from './first-past-the-post-waffle';
|
|
6
|
+
export * from './topline-result';
|
|
7
|
+
export * from './page-section';
|
|
8
|
+
export * from './column-chart';
|
|
9
|
+
export * from './party-profile';
|
|
10
|
+
export * from './result-summary';
|
|
11
|
+
export * from './search-input';
|
|
12
|
+
export * from './refresh-indicator';
|
|
13
|
+
export * from './responsive-grid';
|
|
14
|
+
export * from './modal';
|
|
15
|
+
export * from './dropdown';
|
|
16
|
+
export * from './svg-map';
|
|
17
|
+
export * from './canvas-map';
|
|
18
|
+
export * from './option-picker';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export function Modal({ visible, blurBackground, alwaysMounted, styles, children, onClickOutside, }: {
|
|
2
|
+
visible?: boolean;
|
|
3
|
+
blurBackground?: boolean;
|
|
4
|
+
alwaysMounted?: boolean;
|
|
5
|
+
styles: any;
|
|
6
|
+
children: any;
|
|
7
|
+
onClickOutside: any;
|
|
8
|
+
}): import("preact").JSX.Element;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { jsx } from "preact/jsx-runtime";
|
|
2
|
+
import { useRef, useCallback, useEffect } from "preact/hooks";
|
|
3
|
+
import { CSSTransition } from "preact-transitioning";
|
|
4
|
+
import defaultStyles from "./style.module.css.js";
|
|
5
|
+
import { mergeStyles } from "../../../styles/helpers/mergeStyles.js";
|
|
6
|
+
function Modal({
|
|
7
|
+
visible = false,
|
|
8
|
+
blurBackground = true,
|
|
9
|
+
alwaysMounted = false,
|
|
10
|
+
styles,
|
|
11
|
+
children,
|
|
12
|
+
onClickOutside
|
|
13
|
+
}) {
|
|
14
|
+
styles = mergeStyles(defaultStyles, styles);
|
|
15
|
+
const modalBoxRef = useRef();
|
|
16
|
+
const onClick = useCallback(
|
|
17
|
+
(event) => {
|
|
18
|
+
if (!modalBoxRef.current.contains(event.target)) {
|
|
19
|
+
if (onClickOutside && visible) onClickOutside(event);
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
[onClickOutside, visible]
|
|
23
|
+
);
|
|
24
|
+
useEffect(() => {
|
|
25
|
+
if (visible) {
|
|
26
|
+
window.addEventListener("scroll", onClick, { once: true });
|
|
27
|
+
}
|
|
28
|
+
return () => {
|
|
29
|
+
if (visible) {
|
|
30
|
+
window.removeEventListener("scroll", onClick);
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
}, [onClick, visible]);
|
|
34
|
+
if (typeof document === "undefined") return;
|
|
35
|
+
return /* @__PURE__ */ jsx(
|
|
36
|
+
CSSTransition,
|
|
37
|
+
{
|
|
38
|
+
in: visible,
|
|
39
|
+
duration: 300,
|
|
40
|
+
classNames: styles,
|
|
41
|
+
alwaysMounted,
|
|
42
|
+
children: /* @__PURE__ */ jsx(
|
|
43
|
+
"div",
|
|
44
|
+
{
|
|
45
|
+
className: [
|
|
46
|
+
styles.transitionContainer,
|
|
47
|
+
blurBackground && styles.blur,
|
|
48
|
+
visible && styles.visible
|
|
49
|
+
].join(" "),
|
|
50
|
+
onClick,
|
|
51
|
+
children: /* @__PURE__ */ jsx("div", { ref: modalBoxRef, className: styles.modalBox, children })
|
|
52
|
+
}
|
|
53
|
+
)
|
|
54
|
+
}
|
|
55
|
+
);
|
|
56
|
+
}
|
|
57
|
+
export {
|
|
58
|
+
Modal
|
|
59
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
const transitionContainer = "_transitionContainer_11twd_1";
|
|
2
|
+
const blur = "_blur_11twd_11";
|
|
3
|
+
const modalBox = "_modalBox_11twd_16";
|
|
4
|
+
const enter = "_enter_11twd_25";
|
|
5
|
+
const exitDone = "_exitDone_11twd_26";
|
|
6
|
+
const enterActive = "_enterActive_11twd_37";
|
|
7
|
+
const exit = "_exit_11twd_26";
|
|
8
|
+
const defaultStyles = {
|
|
9
|
+
transitionContainer,
|
|
10
|
+
blur,
|
|
11
|
+
modalBox,
|
|
12
|
+
enter,
|
|
13
|
+
exitDone,
|
|
14
|
+
enterActive,
|
|
15
|
+
exit
|
|
16
|
+
};
|
|
17
|
+
export {
|
|
18
|
+
blur,
|
|
19
|
+
defaultStyles as default,
|
|
20
|
+
enter,
|
|
21
|
+
enterActive,
|
|
22
|
+
exit,
|
|
23
|
+
exitDone,
|
|
24
|
+
modalBox,
|
|
25
|
+
transitionContainer
|
|
26
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/** @typedef { ("vertical" | "horizontal") } OptionLayoutDirection */
|
|
2
|
+
/**
|
|
3
|
+
* OptionPicker component
|
|
4
|
+
*
|
|
5
|
+
* @param {Object} props
|
|
6
|
+
* @param {string} props.title
|
|
7
|
+
* @param {Array<{ title: string, description: string, icon: string | JSX.Element }>} props.options
|
|
8
|
+
* @param {OptionLayoutDirection} [props.layoutDirection="horizontal"]
|
|
9
|
+
* @param {number} [props.initialSelectedIndex=0]
|
|
10
|
+
* @param {(index: number, option: Object) => void} [props.onSelect]
|
|
11
|
+
* @param {Object} [props.styles]
|
|
12
|
+
* @returns
|
|
13
|
+
*/
|
|
14
|
+
export function OptionPicker({ title, options, layoutDirection, initialSelectedIndex, onSelect, styles, }: {
|
|
15
|
+
title: string;
|
|
16
|
+
options: Array<{
|
|
17
|
+
title: string;
|
|
18
|
+
description: string;
|
|
19
|
+
icon: string | JSX.Element;
|
|
20
|
+
}>;
|
|
21
|
+
layoutDirection?: OptionLayoutDirection;
|
|
22
|
+
initialSelectedIndex?: number;
|
|
23
|
+
onSelect?: (index: number, option: any) => void;
|
|
24
|
+
styles?: any;
|
|
25
|
+
}): import("preact").JSX.Element;
|
|
26
|
+
export type OptionLayoutDirection = ("vertical" | "horizontal");
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { jsxs, jsx } from "preact/jsx-runtime";
|
|
2
|
+
import { useState, useCallback } from "preact/hooks";
|
|
3
|
+
import { mergeStyles } from "../../../styles/helpers/mergeStyles.js";
|
|
4
|
+
import defaultStyles from "./style.module.css.js";
|
|
5
|
+
function OptionPicker({
|
|
6
|
+
title,
|
|
7
|
+
options,
|
|
8
|
+
layoutDirection = "horizontal",
|
|
9
|
+
initialSelectedIndex = 0,
|
|
10
|
+
onSelect,
|
|
11
|
+
styles
|
|
12
|
+
}) {
|
|
13
|
+
styles = mergeStyles(defaultStyles, styles);
|
|
14
|
+
const [selectedIndex, setSelectedIndex] = useState(initialSelectedIndex);
|
|
15
|
+
const onOptionClick = useCallback(
|
|
16
|
+
(option, index) => {
|
|
17
|
+
if (index === selectedIndex) return;
|
|
18
|
+
setSelectedIndex(index);
|
|
19
|
+
if (onSelect) onSelect(index, option);
|
|
20
|
+
},
|
|
21
|
+
[selectedIndex, onSelect]
|
|
22
|
+
);
|
|
23
|
+
return /* @__PURE__ */ jsxs("div", { className: styles.optionPicker, children: [
|
|
24
|
+
title && /* @__PURE__ */ jsx("span", { className: styles.title, children: title }),
|
|
25
|
+
/* @__PURE__ */ jsx(
|
|
26
|
+
"div",
|
|
27
|
+
{
|
|
28
|
+
className: [styles.options, layoutDirection].join(" "),
|
|
29
|
+
role: "listbox",
|
|
30
|
+
"aria-orientation": layoutDirection,
|
|
31
|
+
"aria-activedescendant": `option-${selectedIndex}`,
|
|
32
|
+
children: options.map((option, index) => {
|
|
33
|
+
const isSelected = index === selectedIndex;
|
|
34
|
+
const optionId = `option-${index}`;
|
|
35
|
+
return /* @__PURE__ */ jsxs(
|
|
36
|
+
"button",
|
|
37
|
+
{
|
|
38
|
+
id: optionId,
|
|
39
|
+
className: [
|
|
40
|
+
styles.option,
|
|
41
|
+
isSelected ? styles.selected : ""
|
|
42
|
+
].join(" "),
|
|
43
|
+
onClick: () => onOptionClick(option, index),
|
|
44
|
+
role: "option",
|
|
45
|
+
"aria-selected": isSelected,
|
|
46
|
+
children: [
|
|
47
|
+
/* @__PURE__ */ jsxs("div", { className: styles.optionIconContainer, children: [
|
|
48
|
+
typeof option.icon === "string" ? /* @__PURE__ */ jsx(
|
|
49
|
+
"img",
|
|
50
|
+
{
|
|
51
|
+
src: option.icon,
|
|
52
|
+
className: styles.optionIcon,
|
|
53
|
+
role: "presentation"
|
|
54
|
+
}
|
|
55
|
+
) : option.icon,
|
|
56
|
+
isSelected && /* @__PURE__ */ jsx("div", { className: styles.checkmark, children: /* @__PURE__ */ jsx(Checkmark, {}) })
|
|
57
|
+
] }),
|
|
58
|
+
/* @__PURE__ */ jsxs("div", { className: styles.optionText, children: [
|
|
59
|
+
/* @__PURE__ */ jsx("h4", { className: styles.optionTitle, children: option.title }),
|
|
60
|
+
/* @__PURE__ */ jsx("p", { className: styles.optionDescription, children: option.description })
|
|
61
|
+
] })
|
|
62
|
+
]
|
|
63
|
+
},
|
|
64
|
+
optionId
|
|
65
|
+
);
|
|
66
|
+
})
|
|
67
|
+
}
|
|
68
|
+
)
|
|
69
|
+
] });
|
|
70
|
+
}
|
|
71
|
+
function Checkmark() {
|
|
72
|
+
return /* @__PURE__ */ jsx(
|
|
73
|
+
"svg",
|
|
74
|
+
{
|
|
75
|
+
width: "11",
|
|
76
|
+
height: "9",
|
|
77
|
+
viewBox: "0 0 11 9",
|
|
78
|
+
fill: "none",
|
|
79
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
80
|
+
children: /* @__PURE__ */ jsx(
|
|
81
|
+
"path",
|
|
82
|
+
{
|
|
83
|
+
fillRule: "evenodd",
|
|
84
|
+
clipRule: "evenodd",
|
|
85
|
+
d: "M0.631814 4.43687L0.0839844 4.9847L2.82313 8.8195H3.08335L10.9173 0.711624L10.3695 0.17749L3.08335 6.77884L0.631814 4.43687Z",
|
|
86
|
+
className: defaultStyles.checkmarkPath
|
|
87
|
+
}
|
|
88
|
+
)
|
|
89
|
+
}
|
|
90
|
+
);
|
|
91
|
+
}
|
|
92
|
+
export {
|
|
93
|
+
OptionPicker
|
|
94
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
const optionPicker = "_optionPicker_1b561_1";
|
|
2
|
+
const title = "_title_1b561_13";
|
|
3
|
+
const options = "_options_1b561_20";
|
|
4
|
+
const option = "_option_1b561_1";
|
|
5
|
+
const selected = "_selected_1b561_46";
|
|
6
|
+
const optionIconContainer = "_optionIconContainer_1b561_55";
|
|
7
|
+
const optionIcon = "_optionIcon_1b561_55";
|
|
8
|
+
const optionTitle = "_optionTitle_1b561_67";
|
|
9
|
+
const checkmark = "_checkmark_1b561_78";
|
|
10
|
+
const checkmarkPath = "_checkmarkPath_1b561_82";
|
|
11
|
+
const defaultStyles = {
|
|
12
|
+
optionPicker,
|
|
13
|
+
title,
|
|
14
|
+
options,
|
|
15
|
+
option,
|
|
16
|
+
selected,
|
|
17
|
+
optionIconContainer,
|
|
18
|
+
optionIcon,
|
|
19
|
+
optionTitle,
|
|
20
|
+
checkmark,
|
|
21
|
+
checkmarkPath
|
|
22
|
+
};
|
|
23
|
+
export {
|
|
24
|
+
checkmark,
|
|
25
|
+
checkmarkPath,
|
|
26
|
+
defaultStyles as default,
|
|
27
|
+
option,
|
|
28
|
+
optionIcon,
|
|
29
|
+
optionIconContainer,
|
|
30
|
+
optionPicker,
|
|
31
|
+
optionTitle,
|
|
32
|
+
options,
|
|
33
|
+
selected,
|
|
34
|
+
title
|
|
35
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export namespace SectionLayout {
|
|
2
|
+
let _default: string;
|
|
3
|
+
export { _default as default };
|
|
4
|
+
export let fullWidth: string;
|
|
5
|
+
}
|
|
6
|
+
export const PageSection: import('preact').FunctionalComponent<import('preact/compat').PropsWithoutRef<{}> & {
|
|
7
|
+
ref?: import('preact').Ref<any>;
|
|
8
|
+
}>;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { jsxs, jsx } from "preact/jsx-runtime";
|
|
2
|
+
import { forwardRef } from "preact/compat";
|
|
3
|
+
import { useState, useRef, useLayoutEffect } from "preact/hooks";
|
|
4
|
+
import { mergeStyles } from "../../../styles/helpers/mergeStyles.js";
|
|
5
|
+
import defaultStyles from "./style.module.scss.js";
|
|
6
|
+
const SectionLayout = {
|
|
7
|
+
default: "default",
|
|
8
|
+
fullWidth: "fullWidth"
|
|
9
|
+
};
|
|
10
|
+
const PageSection = forwardRef(
|
|
11
|
+
({
|
|
12
|
+
id,
|
|
13
|
+
children,
|
|
14
|
+
layout = SectionLayout.default,
|
|
15
|
+
styles,
|
|
16
|
+
borderTop = false,
|
|
17
|
+
backgroundColor = "transparent"
|
|
18
|
+
}, ref) => {
|
|
19
|
+
styles = mergeStyles({ ...defaultStyles }, styles);
|
|
20
|
+
const [minHeight, setMinHeight] = useState("auto");
|
|
21
|
+
const headerRef = useRef();
|
|
22
|
+
useLayoutEffect(() => {
|
|
23
|
+
const headerElement = headerRef.current;
|
|
24
|
+
setMinHeight(headerElement.offsetHeight);
|
|
25
|
+
}, [children]);
|
|
26
|
+
return /* @__PURE__ */ jsxs(
|
|
27
|
+
"section",
|
|
28
|
+
{
|
|
29
|
+
id,
|
|
30
|
+
ref,
|
|
31
|
+
className: [styles.section, styles[layout]].join(" "),
|
|
32
|
+
style: { "--background-color": backgroundColor, minHeight },
|
|
33
|
+
children: [
|
|
34
|
+
borderTop && /* @__PURE__ */ jsx("div", { className: styles.borderTop }),
|
|
35
|
+
/* @__PURE__ */ jsx(
|
|
36
|
+
"div",
|
|
37
|
+
{
|
|
38
|
+
className: [styles.header, styles[layout]].join(" "),
|
|
39
|
+
ref: headerRef,
|
|
40
|
+
children: children.header
|
|
41
|
+
}
|
|
42
|
+
),
|
|
43
|
+
/* @__PURE__ */ jsx("div", { className: [styles.content, styles[layout]].join(" "), children: children.content })
|
|
44
|
+
]
|
|
45
|
+
}
|
|
46
|
+
);
|
|
47
|
+
}
|
|
48
|
+
);
|
|
49
|
+
export {
|
|
50
|
+
PageSection,
|
|
51
|
+
SectionLayout
|
|
52
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
const borderTop = "_borderTop_1xpz0_9";
|
|
2
|
+
const section = "_section_1xpz0_39";
|
|
3
|
+
const fullWidth = "_fullWidth_1xpz0_39";
|
|
4
|
+
const header = "_header_1xpz0_150";
|
|
5
|
+
const content = "_content_1xpz0_187";
|
|
6
|
+
const defaultStyles = {
|
|
7
|
+
borderTop,
|
|
8
|
+
section,
|
|
9
|
+
fullWidth,
|
|
10
|
+
header,
|
|
11
|
+
content
|
|
12
|
+
};
|
|
13
|
+
export {
|
|
14
|
+
borderTop,
|
|
15
|
+
content,
|
|
16
|
+
defaultStyles as default,
|
|
17
|
+
fullWidth,
|
|
18
|
+
header,
|
|
19
|
+
section
|
|
20
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export function PartyProfile({ title, subtitle, subtitleStyle, blurb, footnote, imgSrc, imgAltText, styles, }: {
|
|
2
|
+
title: any;
|
|
3
|
+
subtitle: any;
|
|
4
|
+
subtitleStyle?: string;
|
|
5
|
+
blurb: any;
|
|
6
|
+
footnote: any;
|
|
7
|
+
imgSrc: any;
|
|
8
|
+
imgAltText: any;
|
|
9
|
+
styles: any;
|
|
10
|
+
}): import("preact").JSX.Element;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { jsxs, jsx } from "preact/jsx-runtime";
|
|
2
|
+
import defaultStyles from "./style.module.css.js";
|
|
3
|
+
import { mergeStyles } from "../../../styles/helpers/mergeStyles.js";
|
|
4
|
+
const SubtitleStyle = {
|
|
5
|
+
small: "small",
|
|
6
|
+
large: "large"
|
|
7
|
+
};
|
|
8
|
+
const PartyProfile = ({
|
|
9
|
+
title,
|
|
10
|
+
subtitle,
|
|
11
|
+
subtitleStyle = SubtitleStyle.large,
|
|
12
|
+
blurb,
|
|
13
|
+
footnote,
|
|
14
|
+
imgSrc,
|
|
15
|
+
imgAltText,
|
|
16
|
+
styles
|
|
17
|
+
}) => {
|
|
18
|
+
styles = mergeStyles({ ...defaultStyles }, styles);
|
|
19
|
+
return /* @__PURE__ */ jsxs("div", { className: styles.container, children: [
|
|
20
|
+
/* @__PURE__ */ jsx("img", { src: imgSrc, className: styles.img, alt: imgAltText }),
|
|
21
|
+
/* @__PURE__ */ jsx("h3", { className: styles.title, children: title }),
|
|
22
|
+
/* @__PURE__ */ jsx("div", { className: [styles.subtitle, styles[subtitleStyle]].join(" "), children: subtitle }),
|
|
23
|
+
/* @__PURE__ */ jsx("div", { className: styles.blurb, children: blurb }),
|
|
24
|
+
/* @__PURE__ */ jsx("div", { className: styles.footnote, children: footnote })
|
|
25
|
+
] });
|
|
26
|
+
};
|
|
27
|
+
export {
|
|
28
|
+
PartyProfile
|
|
29
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
const container = "_container_hbk39_1";
|
|
2
|
+
const img = "_img_hbk39_5";
|
|
3
|
+
const title = "_title_hbk39_13";
|
|
4
|
+
const subtitle = "_subtitle_hbk39_29";
|
|
5
|
+
const small = "_small_hbk39_39";
|
|
6
|
+
const blurb = "_blurb_hbk39_49";
|
|
7
|
+
const footnote = "_footnote_hbk39_57";
|
|
8
|
+
const defaultStyles = {
|
|
9
|
+
container,
|
|
10
|
+
img,
|
|
11
|
+
title,
|
|
12
|
+
subtitle,
|
|
13
|
+
small,
|
|
14
|
+
blurb,
|
|
15
|
+
footnote
|
|
16
|
+
};
|
|
17
|
+
export {
|
|
18
|
+
blurb,
|
|
19
|
+
container,
|
|
20
|
+
defaultStyles as default,
|
|
21
|
+
footnote,
|
|
22
|
+
img,
|
|
23
|
+
small,
|
|
24
|
+
subtitle,
|
|
25
|
+
title
|
|
26
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { jsxs, jsx } from "preact/jsx-runtime";
|
|
2
|
+
import { mergeStyles } from "../../../styles/helpers/mergeStyles.js";
|
|
3
|
+
import "preact/hooks";
|
|
4
|
+
import "../../particles/info-button/index.js";
|
|
5
|
+
import { CircleIcon } from "../../particles/circle-icon/index.js";
|
|
6
|
+
import "../../particles/relative-time-sentence/index.js";
|
|
7
|
+
import defaultStyles from "./style.module.scss.js";
|
|
8
|
+
function RefreshIndicator({ text, styles }) {
|
|
9
|
+
styles = mergeStyles(defaultStyles, styles);
|
|
10
|
+
return /* @__PURE__ */ jsxs("div", { className: styles.refreshIndicator, children: [
|
|
11
|
+
/* @__PURE__ */ jsx("span", { className: styles.icon, children: /* @__PURE__ */ jsx(CircleIcon, { pulse: true }) }),
|
|
12
|
+
/* @__PURE__ */ jsx("span", { className: styles.liveText, children: "LIVE" }),
|
|
13
|
+
/* @__PURE__ */ jsx("span", { className: styles.refreshText, children: text })
|
|
14
|
+
] });
|
|
15
|
+
}
|
|
16
|
+
export {
|
|
17
|
+
RefreshIndicator
|
|
18
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
const refreshIndicator = "_refreshIndicator_3z0ji_9";
|
|
2
|
+
const icon = "_icon_3z0ji_17";
|
|
3
|
+
const liveText = "_liveText_3z0ji_26";
|
|
4
|
+
const refreshText = "_refreshText_3z0ji_27";
|
|
5
|
+
const defaultStyles = {
|
|
6
|
+
refreshIndicator,
|
|
7
|
+
icon,
|
|
8
|
+
liveText,
|
|
9
|
+
refreshText
|
|
10
|
+
};
|
|
11
|
+
export {
|
|
12
|
+
defaultStyles as default,
|
|
13
|
+
icon,
|
|
14
|
+
liveText,
|
|
15
|
+
refreshIndicator,
|
|
16
|
+
refreshText
|
|
17
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { jsx } from "preact/jsx-runtime";
|
|
2
|
+
import { toChildArray } from "preact";
|
|
3
|
+
import defaultStyles from "./style.module.scss.js";
|
|
4
|
+
import { mergeStyles } from "../../../styles/helpers/mergeStyles.js";
|
|
5
|
+
const GridType = {
|
|
6
|
+
small: "small",
|
|
7
|
+
medium: "medium",
|
|
8
|
+
large: "large"
|
|
9
|
+
};
|
|
10
|
+
function ResponsiveGrid({ type = GridType.medium, children, styles }) {
|
|
11
|
+
styles = mergeStyles({ ...defaultStyles }, styles);
|
|
12
|
+
return /* @__PURE__ */ jsx("div", { className: styles.grid, "data-grid-type": type, children: toChildArray(children).map((child, index) => {
|
|
13
|
+
return /* @__PURE__ */ jsx("div", { className: styles.gridItem, children: child }, index);
|
|
14
|
+
}) });
|
|
15
|
+
}
|
|
16
|
+
export {
|
|
17
|
+
GridType,
|
|
18
|
+
ResponsiveGrid
|
|
19
|
+
};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { jsxs, jsx } from "preact/jsx-runtime";
|
|
2
|
+
import "preact/hooks";
|
|
3
|
+
import { mergeStyles } from "../../../styles/helpers/mergeStyles.js";
|
|
4
|
+
import "preact/compat";
|
|
5
|
+
import { ControlChange } from "../control-change/index.js";
|
|
6
|
+
import "../topline-result/index.js";
|
|
7
|
+
import "../page-section/index.js";
|
|
8
|
+
import "d3-scale";
|
|
9
|
+
import "../../particles/info-button/index.js";
|
|
10
|
+
import { RelativeTimeSentence } from "../../particles/relative-time-sentence/index.js";
|
|
11
|
+
import defaultStyles from "./style.module.css.js";
|
|
12
|
+
import "preact";
|
|
13
|
+
import "preact-transitioning";
|
|
14
|
+
import "../svg-map/index.js";
|
|
15
|
+
import "../canvas-map/lib/Map.js";
|
|
16
|
+
import "d3-polygon";
|
|
17
|
+
import "../canvas-map/lib/projection/index.js";
|
|
18
|
+
import "d3-geo";
|
|
19
|
+
import "rbush";
|
|
20
|
+
import "rbush-knn";
|
|
21
|
+
import "../canvas-map/context/MapContext.js";
|
|
22
|
+
import "../canvas-map/Map.js";
|
|
23
|
+
function ResultSummary({
|
|
24
|
+
previous,
|
|
25
|
+
next,
|
|
26
|
+
title,
|
|
27
|
+
text,
|
|
28
|
+
timestamp,
|
|
29
|
+
styles
|
|
30
|
+
}) {
|
|
31
|
+
styles = mergeStyles({ ...defaultStyles }, styles);
|
|
32
|
+
return /* @__PURE__ */ jsxs("div", { className: styles.container, children: [
|
|
33
|
+
/* @__PURE__ */ jsx(ControlChange, { previous, next, text: title }),
|
|
34
|
+
/* @__PURE__ */ jsx("p", { className: styles.paragraph, children: text }),
|
|
35
|
+
/* @__PURE__ */ jsx(RelativeTimeSentence, { timeStamp: timestamp })
|
|
36
|
+
] });
|
|
37
|
+
}
|
|
38
|
+
export {
|
|
39
|
+
ResultSummary
|
|
40
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export function SearchIcon(): import("preact").JSX.Element;
|