@guardian/interactive-component-library 0.2.0-rc4 → 0.2.0
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/interactive-component-library.js +8338 -0
- package/dist/interactive-component-library.js.map +1 -0
- package/dist/interactive-component-library.umd.cjs +8333 -0
- package/dist/interactive-component-library.umd.cjs.map +1 -0
- package/dist/style.css +157 -73
- package/package.json +11 -19
- package/dist/components/index.d.ts +0 -3
- package/dist/components/molecules/canvas-map/Map.d.ts +0 -17
- package/dist/components/molecules/canvas-map/Map.js +0 -89
- package/dist/components/molecules/canvas-map/context/MapContext.d.ts +0 -19
- package/dist/components/molecules/canvas-map/context/MapContext.js +0 -20
- package/dist/components/molecules/canvas-map/controls/ZoomControl.d.ts +0 -6
- package/dist/components/molecules/canvas-map/controls/ZoomControl.js +0 -40
- package/dist/components/molecules/canvas-map/controls/icons/index.d.ts +0 -3
- package/dist/components/molecules/canvas-map/controls/icons/minus.d.ts +0 -1
- package/dist/components/molecules/canvas-map/controls/icons/minus.js +0 -25
- package/dist/components/molecules/canvas-map/controls/icons/plus.d.ts +0 -1
- package/dist/components/molecules/canvas-map/controls/icons/plus.js +0 -25
- package/dist/components/molecules/canvas-map/controls/icons/reset.d.ts +0 -3
- package/dist/components/molecules/canvas-map/controls/icons/reset.js +0 -25
- package/dist/components/molecules/canvas-map/controls/index.d.ts +0 -1
- package/dist/components/molecules/canvas-map/controls/style.module.css.js +0 -11
- package/dist/components/molecules/canvas-map/index.d.ts +0 -12
- package/dist/components/molecules/canvas-map/lib/Feature.d.ts +0 -38
- package/dist/components/molecules/canvas-map/lib/Feature.js +0 -104
- package/dist/components/molecules/canvas-map/lib/FeatureCollection.d.ts +0 -20
- package/dist/components/molecules/canvas-map/lib/FeatureCollection.js +0 -23
- package/dist/components/molecules/canvas-map/lib/Map.d.ts +0 -69
- package/dist/components/molecules/canvas-map/lib/Map.js +0 -254
- package/dist/components/molecules/canvas-map/lib/View.d.ts +0 -136
- package/dist/components/molecules/canvas-map/lib/View.js +0 -179
- package/dist/components/molecules/canvas-map/lib/events/Dispatcher.d.ts +0 -8
- package/dist/components/molecules/canvas-map/lib/events/Dispatcher.js +0 -35
- package/dist/components/molecules/canvas-map/lib/events/MapEvent.d.ts +0 -6
- package/dist/components/molecules/canvas-map/lib/events/MapEvent.js +0 -9
- package/dist/components/molecules/canvas-map/lib/events/index.d.ts +0 -2
- package/dist/components/molecules/canvas-map/lib/formats/GeoJSON.d.ts +0 -10
- package/dist/components/molecules/canvas-map/lib/formats/GeoJSON.js +0 -96
- package/dist/components/molecules/canvas-map/lib/geometry/Geometry.d.ts +0 -32
- package/dist/components/molecules/canvas-map/lib/geometry/Geometry.js +0 -41
- package/dist/components/molecules/canvas-map/lib/geometry/LineString.d.ts +0 -12
- package/dist/components/molecules/canvas-map/lib/geometry/LineString.js +0 -19
- package/dist/components/molecules/canvas-map/lib/geometry/Point.d.ts +0 -11
- package/dist/components/molecules/canvas-map/lib/geometry/Point.js +0 -16
- package/dist/components/molecules/canvas-map/lib/geometry/Polygon.d.ts +0 -16
- package/dist/components/molecules/canvas-map/lib/geometry/Polygon.js +0 -46
- package/dist/components/molecules/canvas-map/lib/geometry/index.d.ts +0 -4
- package/dist/components/molecules/canvas-map/lib/interpolators/index.d.ts +0 -2
- package/dist/components/molecules/canvas-map/lib/interpolators/interpolateFeatures.d.ts +0 -5
- package/dist/components/molecules/canvas-map/lib/interpolators/interpolateFeatures.js +0 -95
- package/dist/components/molecules/canvas-map/lib/interpolators/interpolateStyles.d.ts +0 -4
- package/dist/components/molecules/canvas-map/lib/interpolators/interpolateStyles.js +0 -65
- package/dist/components/molecules/canvas-map/lib/layers/TextLayer.d.ts +0 -52
- package/dist/components/molecules/canvas-map/lib/layers/TextLayer.js +0 -111
- package/dist/components/molecules/canvas-map/lib/layers/VectorLayer.d.ts +0 -53
- package/dist/components/molecules/canvas-map/lib/layers/VectorLayer.js +0 -132
- package/dist/components/molecules/canvas-map/lib/layers/index.d.ts +0 -3
- package/dist/components/molecules/canvas-map/lib/projection/index.d.ts +0 -22
- package/dist/components/molecules/canvas-map/lib/projection/index.js +0 -12
- package/dist/components/molecules/canvas-map/lib/renderers/FeatureRenderer.d.ts +0 -6
- package/dist/components/molecules/canvas-map/lib/renderers/FeatureRenderer.js +0 -46
- package/dist/components/molecules/canvas-map/lib/renderers/MapRenderer.d.ts +0 -6
- package/dist/components/molecules/canvas-map/lib/renderers/MapRenderer.js +0 -53
- package/dist/components/molecules/canvas-map/lib/renderers/TextLayerRenderer.d.ts +0 -17
- package/dist/components/molecules/canvas-map/lib/renderers/TextLayerRenderer.js +0 -119
- package/dist/components/molecules/canvas-map/lib/renderers/VectorLayerRenderer.d.ts +0 -10
- package/dist/components/molecules/canvas-map/lib/renderers/VectorLayerRenderer.js +0 -78
- package/dist/components/molecules/canvas-map/lib/sources/VectorSource.d.ts +0 -15
- package/dist/components/molecules/canvas-map/lib/sources/VectorSource.js +0 -56
- package/dist/components/molecules/canvas-map/lib/styles/Fill.d.ts +0 -7
- package/dist/components/molecules/canvas-map/lib/styles/Fill.js +0 -15
- package/dist/components/molecules/canvas-map/lib/styles/Stroke.d.ts +0 -8
- package/dist/components/molecules/canvas-map/lib/styles/Stroke.js +0 -16
- package/dist/components/molecules/canvas-map/lib/styles/Style.d.ts +0 -24
- package/dist/components/molecules/canvas-map/lib/styles/Style.js +0 -17
- package/dist/components/molecules/canvas-map/lib/styles/Text.d.ts +0 -10
- package/dist/components/molecules/canvas-map/lib/styles/Text.js +0 -14
- package/dist/components/molecules/canvas-map/lib/styles/index.d.ts +0 -4
- package/dist/components/molecules/canvas-map/lib/util/array.d.ts +0 -6
- package/dist/components/molecules/canvas-map/lib/util/array.js +0 -15
- package/dist/components/molecules/canvas-map/lib/util/bboxFeature.d.ts +0 -8
- package/dist/components/molecules/canvas-map/lib/util/bboxFeature.js +0 -26
- package/dist/components/molecules/canvas-map/lib/util/debug.d.ts +0 -11
- package/dist/components/molecules/canvas-map/lib/util/debug.js +0 -27
- package/dist/components/molecules/canvas-map/lib/util/deflate.d.ts +0 -36
- package/dist/components/molecules/canvas-map/lib/util/distance.d.ts +0 -1
- package/dist/components/molecules/canvas-map/lib/util/distance.js +0 -12
- package/dist/components/molecules/canvas-map/lib/util/dom.d.ts +0 -9
- package/dist/components/molecules/canvas-map/lib/util/dom.js +0 -28
- package/dist/components/molecules/canvas-map/lib/util/extent.d.ts +0 -21
- package/dist/components/molecules/canvas-map/lib/util/extent.js +0 -38
- package/dist/components/molecules/canvas-map/lib/util/memoise.d.ts +0 -10
- package/dist/components/molecules/canvas-map/lib/util/memoise.js +0 -20
- package/dist/components/molecules/canvas-map/lib/util/resolution.d.ts +0 -9
- package/dist/components/molecules/canvas-map/lib/util/resolution.js +0 -11
- package/dist/components/molecules/canvas-map/lib/util/simplify.d.ts +0 -114
- package/dist/components/molecules/canvas-map/lib/util/size.d.ts +0 -32
- package/dist/components/molecules/canvas-map/lib/util/size.js +0 -53
- package/dist/components/molecules/canvas-map/lib/util/toRgba.d.ts +0 -1
- package/dist/components/molecules/canvas-map/lib/util/toRgba.js +0 -25
- package/dist/components/molecules/canvas-map/lib/util/uid.d.ts +0 -5
- package/dist/components/molecules/canvas-map/lib/util/uid.js +0 -7
- package/dist/components/molecules/canvas-map/lib/util/zoomLevel.d.ts +0 -2
- package/dist/components/molecules/canvas-map/lib/util/zoomLevel.js +0 -14
- package/dist/components/molecules/canvas-map/style.module.scss.js +0 -20
- package/dist/components/molecules/column-chart/column-chart-example.d.ts +0 -35
- package/dist/components/molecules/column-chart/column-chart-util.d.ts +0 -1
- package/dist/components/molecules/column-chart/index.d.ts +0 -11
- package/dist/components/molecules/column-chart/index.js +0 -63
- package/dist/components/molecules/column-chart/style.module.css.js +0 -14
- package/dist/components/molecules/control-change/index.d.ts +0 -6
- package/dist/components/molecules/control-change/index.js +0 -29
- package/dist/components/molecules/control-change/style.module.css.js +0 -11
- package/dist/components/molecules/dropdown/index.d.ts +0 -11
- package/dist/components/molecules/dropdown/index.js +0 -191
- package/dist/components/molecules/dropdown/style.module.css.js +0 -50
- package/dist/components/molecules/first-past-the-post-waffle/index.d.ts +0 -5
- package/dist/components/molecules/first-past-the-post-waffle/index.js +0 -14
- package/dist/components/molecules/first-past-the-post-waffle/style.module.css.js +0 -14
- package/dist/components/molecules/index.d.ts +0 -17
- package/dist/components/molecules/modal/index.d.ts +0 -8
- package/dist/components/molecules/modal/index.js +0 -59
- package/dist/components/molecules/modal/style.module.css.js +0 -26
- package/dist/components/molecules/page-section/index.d.ts +0 -8
- package/dist/components/molecules/page-section/index.js +0 -52
- package/dist/components/molecules/page-section/style.module.scss.js +0 -20
- package/dist/components/molecules/party-profile/index.d.ts +0 -10
- package/dist/components/molecules/party-profile/index.js +0 -29
- package/dist/components/molecules/party-profile/style.module.css.js +0 -26
- package/dist/components/molecules/refresh-indicator/index.d.ts +0 -4
- package/dist/components/molecules/refresh-indicator/index.js +0 -18
- package/dist/components/molecules/refresh-indicator/style.module.scss.js +0 -17
- package/dist/components/molecules/responsive-grid/index.d.ts +0 -10
- package/dist/components/molecules/responsive-grid/index.js +0 -19
- package/dist/components/molecules/responsive-grid/style.module.scss.js +0 -8
- package/dist/components/molecules/result-summary/index.d.ts +0 -8
- package/dist/components/molecules/result-summary/index.js +0 -38
- package/dist/components/molecules/result-summary/style.module.css.js +0 -11
- package/dist/components/molecules/search-input/icons/search.d.ts +0 -1
- package/dist/components/molecules/search-input/icons/search.js +0 -24
- package/dist/components/molecules/search-input/icons/search.module.css.js +0 -11
- package/dist/components/molecules/search-input/index.d.ts +0 -11
- package/dist/components/molecules/search-input/index.js +0 -164
- package/dist/components/molecules/search-input/style.module.css.js +0 -32
- package/dist/components/molecules/slope-chart/index.d.ts +0 -16
- package/dist/components/molecules/slope-chart/index.js +0 -139
- package/dist/components/molecules/slope-chart/style.module.css.js +0 -35
- package/dist/components/molecules/svg-map/context/MapContext.d.ts +0 -1
- package/dist/components/molecules/svg-map/context/MapContext.js +0 -5
- package/dist/components/molecules/svg-map/context/SVGMapProvider.d.ts +0 -10
- package/dist/components/molecules/svg-map/context/SVGMapProvider.js +0 -88
- package/dist/components/molecules/svg-map/helpers/bboxFeature.d.ts +0 -8
- package/dist/components/molecules/svg-map/helpers/bboxFeature.js +0 -26
- package/dist/components/molecules/svg-map/helpers/dynamicPropValue.d.ts +0 -1
- package/dist/components/molecules/svg-map/helpers/dynamicPropValue.js +0 -9
- package/dist/components/molecules/svg-map/helpers/geoMath.d.ts +0 -4
- package/dist/components/molecules/svg-map/helpers/saveSVG.d.ts +0 -1
- package/dist/components/molecules/svg-map/hooks/useCamera.d.ts +0 -0
- package/dist/components/molecules/svg-map/hooks/useThrowIfNonLayerChildren.d.ts +0 -4
- package/dist/components/molecules/svg-map/hooks/useThrowIfNonLayerChildren.js +0 -19
- package/dist/components/molecules/svg-map/index.d.ts +0 -38
- package/dist/components/molecules/svg-map/index.js +0 -121
- package/dist/components/molecules/svg-map/layers/CompositionBorders.d.ts +0 -3
- package/dist/components/molecules/svg-map/layers/CompositionBorders.js +0 -14
- package/dist/components/molecules/svg-map/layers/Line.d.ts +0 -7
- package/dist/components/molecules/svg-map/layers/Line.js +0 -48
- package/dist/components/molecules/svg-map/layers/Point.d.ts +0 -10
- package/dist/components/molecules/svg-map/layers/Point.js +0 -59
- package/dist/components/molecules/svg-map/layers/Polygon.d.ts +0 -9
- package/dist/components/molecules/svg-map/layers/Polygon.js +0 -75
- package/dist/components/molecules/svg-map/layers/Prerendered.d.ts +0 -3
- package/dist/components/molecules/svg-map/layers/Prerendered.js +0 -11
- package/dist/components/molecules/svg-map/layers/compositionBorders.module.scss.js +0 -8
- package/dist/components/molecules/svg-map/layers/index.d.ts +0 -5
- package/dist/components/molecules/svg-map/layers/index.js +0 -12
- package/dist/components/molecules/svg-map/renderers/SVGRenderer.d.ts +0 -3
- package/dist/components/molecules/svg-map/renderers/SVGRenderer.js +0 -32
- package/dist/components/molecules/svg-map/style.module.css.js +0 -11
- package/dist/components/molecules/table/index.d.ts +0 -7
- package/dist/components/molecules/table/index.js +0 -90
- package/dist/components/molecules/table/style.module.scss.js +0 -29
- package/dist/components/molecules/table/useTable.d.ts +0 -8
- package/dist/components/molecules/table/useTable.js +0 -128
- package/dist/components/molecules/tooltip/index.d.ts +0 -82
- package/dist/components/molecules/tooltip/index.js +0 -117
- package/dist/components/molecules/tooltip/style.module.css.js +0 -8
- package/dist/components/molecules/topline-result/index.d.ts +0 -3
- package/dist/components/molecules/topline-result/index.js +0 -61
- package/dist/components/molecules/topline-result/style.module.scss.js +0 -38
- package/dist/components/organisms/coalitions-tracker/index.d.ts +0 -16
- package/dist/components/organisms/coalitions-tracker/index.js +0 -151
- package/dist/components/organisms/coalitions-tracker/style.module.scss.js +0 -32
- package/dist/components/organisms/index.d.ts +0 -2
- package/dist/components/organisms/ticker/gradient/index.d.ts +0 -1
- package/dist/components/organisms/ticker/gradient/index.js +0 -35
- package/dist/components/organisms/ticker/gradient/style.module.scss.js +0 -14
- package/dist/components/organisms/ticker/index.d.ts +0 -5
- package/dist/components/organisms/ticker/index.js +0 -102
- package/dist/components/organisms/ticker/style.module.scss.js +0 -32
- package/dist/components/particles/ad-slot/index.d.ts +0 -40
- package/dist/components/particles/ad-slot/index.js +0 -34
- package/dist/components/particles/ad-slot/style.module.css.js +0 -11
- package/dist/components/particles/arrow-button/index.d.ts +0 -6
- package/dist/components/particles/arrow-button/index.js +0 -32
- package/dist/components/particles/arrow-button/style.module.css.js +0 -11
- package/dist/components/particles/aspect-ratio-box/index.d.ts +0 -4
- package/dist/components/particles/aspect-ratio-box/index.js +0 -15
- package/dist/components/particles/aspect-ratio-box/style.module.css.js +0 -6
- package/dist/components/particles/button/index.d.ts +0 -6
- package/dist/components/particles/button/index.js +0 -10
- package/dist/components/particles/button/style.module.css.js +0 -11
- package/dist/components/particles/change-bar/index.d.ts +0 -8
- package/dist/components/particles/change-bar/index.js +0 -27
- package/dist/components/particles/change-bar/style.module.scss.js +0 -14
- package/dist/components/particles/chevron/index.d.ts +0 -6
- package/dist/components/particles/chevron/index.js +0 -78
- package/dist/components/particles/chevron/style.module.css.js +0 -20
- package/dist/components/particles/circle-icon/index.d.ts +0 -6
- package/dist/components/particles/circle-icon/index.js +0 -32
- package/dist/components/particles/circle-icon/style.module.css.js +0 -14
- package/dist/components/particles/close-button/index.d.ts +0 -5
- package/dist/components/particles/close-button/index.js +0 -35
- package/dist/components/particles/close-button/style.module.css.js +0 -17
- package/dist/components/particles/container/index.d.ts +0 -5
- package/dist/components/particles/container/index.js +0 -13
- package/dist/components/particles/container/style.module.scss.js +0 -11
- package/dist/components/particles/gradient-icon/index.d.ts +0 -1
- package/dist/components/particles/gradient-icon/index.js +0 -46
- package/dist/components/particles/gradient-icon/style.module.css.js +0 -14
- package/dist/components/particles/index.d.ts +0 -18
- package/dist/components/particles/info-button/index.d.ts +0 -3
- package/dist/components/particles/info-button/index.js +0 -19
- package/dist/components/particles/info-button/style.module.css.js +0 -11
- package/dist/components/particles/legend-item/index.d.ts +0 -6
- package/dist/components/particles/legend-item/index.js +0 -26
- package/dist/components/particles/legend-item/style.module.css.js +0 -17
- package/dist/components/particles/relative-time-sentence/index.d.ts +0 -4
- package/dist/components/particles/relative-time-sentence/index.js +0 -14
- package/dist/components/particles/relative-time-sentence/style.module.css.js +0 -8
- package/dist/components/particles/square-cut-corner-icon/index.d.ts +0 -6
- package/dist/components/particles/square-cut-corner-icon/index.js +0 -56
- package/dist/components/particles/square-cut-corner-icon/style.module.scss.js +0 -17
- package/dist/components/particles/square-icon/index.d.ts +0 -5
- package/dist/components/particles/square-icon/index.js +0 -28
- package/dist/components/particles/square-icon/style.module.scss.js +0 -11
- package/dist/components/particles/stacked-bar/index.d.ts +0 -23
- package/dist/components/particles/stacked-bar/index.js +0 -140
- package/dist/components/particles/stacked-bar/style.module.css.js +0 -17
- package/dist/components/particles/stacked-grid/index.d.ts +0 -6
- package/dist/components/particles/stacked-grid/index.js +0 -35
- package/dist/components/particles/stacked-grid/style.module.css.js +0 -20
- package/dist/components/particles/waffle/index.d.ts +0 -14
- package/dist/components/particles/waffle/index.js +0 -76
- package/dist/components/particles/waffle/style.module.css.js +0 -11
- package/dist/index.d.ts +0 -2
- package/dist/index.js +0 -128
- package/dist/shared/colors/index.d.ts +0 -2
- package/dist/shared/helpers/createStore.d.ts +0 -1
- package/dist/shared/helpers/geometry.d.ts +0 -3
- package/dist/shared/helpers/geometry.js +0 -16
- package/dist/shared/helpers/geometry.test.d.ts +0 -1
- package/dist/shared/helpers/labelsUtil.d.ts +0 -54
- package/dist/shared/helpers/labelsUtil.js +0 -58
- package/dist/shared/helpers/labelsUtils.test.d.ts +0 -1
- package/dist/shared/helpers/shouldUpdate.d.ts +0 -7
- package/dist/shared/hooks/index.d.ts +0 -3
- package/dist/shared/hooks/useContainerSize.d.ts +0 -1
- package/dist/shared/hooks/useContainerSize.js +0 -24
- package/dist/shared/hooks/useTouchOrHover.d.ts +0 -6
- package/dist/shared/hooks/useTouchOrHover.js +0 -95
- package/dist/shared/hooks/useWindowSize.d.ts +0 -4
- package/dist/shared/hooks/useWindowSize.js +0 -27
- package/dist/styles/helpers/mergeStyles.d.ts +0 -1
- package/dist/styles/helpers/mergeStyles.js +0 -22
- package/dist/styles/helpers/mergeStyles.test.d.ts +0 -1
- package/dist/styles/theme.config.d.ts +0 -124
package/dist/style.css
CHANGED
|
@@ -2372,79 +2372,7 @@ body ._header_1xpz0_150._fullWidth_1xpz0_39 {
|
|
|
2372
2372
|
line-height: var(--sans-line-height);
|
|
2373
2373
|
color: var(--primary-text-color);
|
|
2374
2374
|
}
|
|
2375
|
-
|
|
2376
|
-
--top-inset: 0;
|
|
2377
|
-
}
|
|
2378
|
-
|
|
2379
|
-
body.android {
|
|
2380
|
-
--top-inset: 58px;
|
|
2381
|
-
}
|
|
2382
|
-
|
|
2383
|
-
._path_1cwd5_9 {
|
|
2384
|
-
stroke: var(--secondary-line-color);
|
|
2385
|
-
fill: none;
|
|
2386
|
-
}._container_9pdyv_1 {
|
|
2387
|
-
width: 100%;
|
|
2388
|
-
height: 100%;
|
|
2389
|
-
position: relative;
|
|
2390
|
-
}
|
|
2391
|
-
|
|
2392
|
-
._svg_9pdyv_7 {
|
|
2393
|
-
fill: none;
|
|
2394
|
-
stroke: #121212;
|
|
2395
|
-
stroke-width: 1;
|
|
2396
|
-
}
|
|
2397
|
-
body {
|
|
2398
|
-
--top-inset: 0;
|
|
2399
|
-
}
|
|
2400
|
-
|
|
2401
|
-
body.android {
|
|
2402
|
-
--top-inset: 58px;
|
|
2403
|
-
}
|
|
2404
|
-
|
|
2405
|
-
._mapContainer_1ogf3_9 {
|
|
2406
|
-
position: relative;
|
|
2407
|
-
width: 100%;
|
|
2408
|
-
height: 100%;
|
|
2409
|
-
}
|
|
2410
|
-
|
|
2411
|
-
._helpTextContainer_1ogf3_15 {
|
|
2412
|
-
position: absolute;
|
|
2413
|
-
width: 100%;
|
|
2414
|
-
height: 100%;
|
|
2415
|
-
top: 0;
|
|
2416
|
-
left: 0;
|
|
2417
|
-
z-index: 1;
|
|
2418
|
-
pointer-events: none;
|
|
2419
|
-
background-color: rgba(18, 18, 18, 0.4);
|
|
2420
|
-
display: flex;
|
|
2421
|
-
justify-content: center;
|
|
2422
|
-
align-items: center;
|
|
2423
|
-
transition: opacity 0.2s linear;
|
|
2424
|
-
}
|
|
2425
|
-
|
|
2426
|
-
._helpText_1ogf3_15 {
|
|
2427
|
-
margin-top: var(--space-5);
|
|
2428
|
-
font-family: var(--text-sans);
|
|
2429
|
-
font-weight: 700;
|
|
2430
|
-
font-size: var(--sans-large);
|
|
2431
|
-
line-height: var(--sans-line-height);
|
|
2432
|
-
color: #fff !important;
|
|
2433
|
-
margin-bottom: var(--space-3);
|
|
2434
|
-
}
|
|
2435
|
-
|
|
2436
|
-
._desktopHelpText_1ogf3_40 {
|
|
2437
|
-
display: none;
|
|
2438
|
-
}
|
|
2439
|
-
|
|
2440
|
-
@media (any-hover: hover) {
|
|
2441
|
-
._desktopHelpText_1ogf3_40 {
|
|
2442
|
-
display: block;
|
|
2443
|
-
}
|
|
2444
|
-
._mobileHelpText_1ogf3_48 {
|
|
2445
|
-
display: none;
|
|
2446
|
-
}
|
|
2447
|
-
}._svg_1dms8_1 {
|
|
2375
|
+
._svg_1dms8_1 {
|
|
2448
2376
|
width: 100%;
|
|
2449
2377
|
height: 100%;
|
|
2450
2378
|
fill: var(--primary-text-color);
|
|
@@ -2889,6 +2817,28 @@ body.android {
|
|
|
2889
2817
|
._checkmarkPath_6u92g_120 {
|
|
2890
2818
|
fill: var(--primary-text-color);
|
|
2891
2819
|
}
|
|
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
|
+
}
|
|
2892
2842
|
._zoomControl_13wd1_1 {
|
|
2893
2843
|
display: inline-flex;
|
|
2894
2844
|
flex-direction: column;
|
|
@@ -2929,6 +2879,140 @@ body.android {
|
|
|
2929
2879
|
--top-inset: 58px;
|
|
2930
2880
|
}
|
|
2931
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 {
|
|
2925
|
+
background-color: rgba(255, 255, 255, 0.6);
|
|
2926
|
+
border: 1px solid var(--border-divider-color);
|
|
2927
|
+
border-radius: 8px;
|
|
2928
|
+
|
|
2929
|
+
padding: var(--space-1) var(--space-2) var(--space-2);
|
|
2930
|
+
|
|
2931
|
+
display: inline-flex;
|
|
2932
|
+
flex-direction: column;
|
|
2933
|
+
row-gap: 4px;
|
|
2934
|
+
}
|
|
2935
|
+
|
|
2936
|
+
._title_1b561_13 {
|
|
2937
|
+
color: var(--secondary-text-color);
|
|
2938
|
+
font-family: var(--text-sans);
|
|
2939
|
+
font-size: var(--sans-xxsmall);
|
|
2940
|
+
line-height: var(--sans-line-height);
|
|
2941
|
+
}
|
|
2942
|
+
|
|
2943
|
+
._options_1b561_20 {
|
|
2944
|
+
display: flex;
|
|
2945
|
+
flex-direction: row;
|
|
2946
|
+
justify-content: stretch;
|
|
2947
|
+
gap: var(--space-2);
|
|
2948
|
+
}
|
|
2949
|
+
|
|
2950
|
+
._options_1b561_20.vertical {
|
|
2951
|
+
flex-direction: column;
|
|
2952
|
+
}
|
|
2953
|
+
|
|
2954
|
+
._option_1b561_1 {
|
|
2955
|
+
display: flex;
|
|
2956
|
+
flex-direction: column;
|
|
2957
|
+
align-items: center;
|
|
2958
|
+
gap: var(--space-2);
|
|
2959
|
+
min-height: 70px;
|
|
2960
|
+
max-width: 124px;
|
|
2961
|
+
|
|
2962
|
+
border: 1px solid var(--border-divider-color);
|
|
2963
|
+
border-radius: 8px;
|
|
2964
|
+
padding: var(--space-1) var(--space-2);
|
|
2965
|
+
|
|
2966
|
+
background-color: var(--primary-bg-color);
|
|
2967
|
+
}
|
|
2968
|
+
|
|
2969
|
+
._option_1b561_1._selected_1b561_46 {
|
|
2970
|
+
border: 1px solid var(--primary-text-color);
|
|
2971
|
+
}
|
|
2972
|
+
|
|
2973
|
+
._option_1b561_1:hover:enabled {
|
|
2974
|
+
background-color: var(--news-grey-05);
|
|
2975
|
+
cursor: pointer;
|
|
2976
|
+
}
|
|
2977
|
+
|
|
2978
|
+
._optionIconContainer_1b561_55 {
|
|
2979
|
+
width: 100%;
|
|
2980
|
+
display: flex;
|
|
2981
|
+
flex-direction: row;
|
|
2982
|
+
justify-content: space-between;
|
|
2983
|
+
gap: var(--space-1);
|
|
2984
|
+
}
|
|
2985
|
+
|
|
2986
|
+
._optionIcon_1b561_55 {
|
|
2987
|
+
width: 100%;
|
|
2988
|
+
}
|
|
2989
|
+
|
|
2990
|
+
._optionTitle_1b561_67 {
|
|
2991
|
+
color: var(--primary-text-color);
|
|
2992
|
+
font-family: var(--text-sans);
|
|
2993
|
+
font-size: var(--sans-xxsmall);
|
|
2994
|
+
line-height: var(--sans-line-height);
|
|
2995
|
+
}
|
|
2996
|
+
|
|
2997
|
+
._option_1b561_1._selected_1b561_46 ._optionTitle_1b561_67 {
|
|
2998
|
+
font-weight: 700;
|
|
2999
|
+
}
|
|
3000
|
+
|
|
3001
|
+
._checkmark_1b561_78 {
|
|
3002
|
+
width: 11px;
|
|
3003
|
+
}
|
|
3004
|
+
|
|
3005
|
+
._checkmarkPath_1b561_82 {
|
|
3006
|
+
fill: var(--primary-text-color);
|
|
3007
|
+
}
|
|
3008
|
+
body {
|
|
3009
|
+
--top-inset: 0;
|
|
3010
|
+
}
|
|
3011
|
+
|
|
3012
|
+
body.android {
|
|
3013
|
+
--top-inset: 58px;
|
|
3014
|
+
}
|
|
3015
|
+
|
|
2932
3016
|
._coalitionsWrapper_4egbd_9 {
|
|
2933
3017
|
max-width: 100%;
|
|
2934
3018
|
position: relative;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@guardian/interactive-component-library",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.2.0
|
|
4
|
+
"version": "0.2.0",
|
|
5
5
|
"packageManager": "pnpm@8.4.0",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -11,10 +11,13 @@
|
|
|
11
11
|
"files": [
|
|
12
12
|
"dist"
|
|
13
13
|
],
|
|
14
|
-
"
|
|
15
|
-
"
|
|
14
|
+
"main": "./dist/interactive-component-library.umd.cjs",
|
|
15
|
+
"module": "./dist/interactive-component-library.js",
|
|
16
16
|
"exports": {
|
|
17
|
-
".":
|
|
17
|
+
".": {
|
|
18
|
+
"import": "./dist/interactive-component-library.js",
|
|
19
|
+
"require": "./dist/interactive-component-library.umd.cjs"
|
|
20
|
+
},
|
|
18
21
|
"./dist/style.css": "./dist/style.css"
|
|
19
22
|
},
|
|
20
23
|
"engines": {
|
|
@@ -24,34 +27,23 @@
|
|
|
24
27
|
"scripts": {
|
|
25
28
|
"dev": "storybook dev -p 6006",
|
|
26
29
|
"build": "storybook build",
|
|
27
|
-
"build:lib": "vite build
|
|
28
|
-
"build:lib:watch": "vite build --
|
|
30
|
+
"build:lib": "vite build",
|
|
31
|
+
"build:lib:watch": "vite build --watch",
|
|
29
32
|
"lint": "eslint .",
|
|
30
33
|
"format": "prettier . --write",
|
|
31
34
|
"format:check": "prettier . --check",
|
|
32
35
|
"test": "vitest",
|
|
33
36
|
"test:cov": "vitest run --coverage",
|
|
34
|
-
"prepack": "json -f package.json -I -e \"delete this.devDependencies\"",
|
|
37
|
+
"prepack": "json -f package.json -I -e \"delete this.devDependencies; delete this.dependencies\"",
|
|
35
38
|
"generate:styles": "node scripts/generateStyles.js",
|
|
36
39
|
"prepare": "husky"
|
|
37
40
|
},
|
|
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.1",
|
|
46
|
-
"rbush": "^4.0.0",
|
|
47
|
-
"rbush-knn": "^4.0.0",
|
|
48
|
-
"remark-gfm": "^4.0.0"
|
|
49
|
-
},
|
|
50
41
|
"peerDependencies": {
|
|
51
42
|
"d3-geo": "^3.1.1",
|
|
52
43
|
"d3-scale": "^4.0.2",
|
|
53
44
|
"d3-selection": "^3.0.0",
|
|
54
45
|
"d3-zoom": "^3.0.0",
|
|
46
|
+
"d3-polygon": "^3.0.1",
|
|
55
47
|
"preact": "10.21.0"
|
|
56
48
|
},
|
|
57
49
|
"lint-staged": {
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { Map as _Map } from './lib/Map';
|
|
2
|
-
/** @typedef {{
|
|
3
|
-
* config: Object,
|
|
4
|
-
* inModalState?: boolean,
|
|
5
|
-
* onLoad?: (map: _Map) => void,
|
|
6
|
-
* children: import('preact').ComponentChildren,
|
|
7
|
-
* }} MapProps
|
|
8
|
-
*/
|
|
9
|
-
export const Map: import('preact').FunctionalComponent<import('preact/compat').PropsWithoutRef<MapProps> & {
|
|
10
|
-
ref?: import('preact').Ref<any>;
|
|
11
|
-
}>;
|
|
12
|
-
export type MapProps = {
|
|
13
|
-
config: any;
|
|
14
|
-
inModalState?: boolean;
|
|
15
|
-
onLoad?: (map: _Map) => void;
|
|
16
|
-
children: import('preact').ComponentChildren;
|
|
17
|
-
};
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
import { jsxs, jsx } from "preact/jsx-runtime";
|
|
2
|
-
import { useRef, useState, useEffect } from "preact/hooks";
|
|
3
|
-
import { forwardRef } from "preact/compat";
|
|
4
|
-
import { Map as Map$1 } from "./lib/Map.js";
|
|
5
|
-
import styles from "./style.module.scss.js";
|
|
6
|
-
import { MapProvider } from "./context/MapContext.js";
|
|
7
|
-
const mobileHelpText = "Use two fingers to zoom";
|
|
8
|
-
const Map = forwardRef(
|
|
9
|
-
({ config, inModalState = false, onLoad, children }, ref) => {
|
|
10
|
-
const targetRef = useRef();
|
|
11
|
-
const [map, setMap] = useState(
|
|
12
|
-
/** @type {_Map | null} */
|
|
13
|
-
null
|
|
14
|
-
);
|
|
15
|
-
const [zoomHelpText, setZoomHelpText] = useState("");
|
|
16
|
-
const [showHelpText, setShowHelpText] = useState(false);
|
|
17
|
-
useEffect(() => {
|
|
18
|
-
var _a;
|
|
19
|
-
const map2 = new Map$1({
|
|
20
|
-
...config,
|
|
21
|
-
target: targetRef.current
|
|
22
|
-
});
|
|
23
|
-
map2.collaborativeGesturesEnabled = true;
|
|
24
|
-
setMap(map2);
|
|
25
|
-
let zoomHelpText2 = "";
|
|
26
|
-
if (((_a = navigator.userAgentData) == null ? void 0 : _a.mobile) || navigator.userAgent.indexOf("Mobile") !== -1) {
|
|
27
|
-
zoomHelpText2 = mobileHelpText;
|
|
28
|
-
} else {
|
|
29
|
-
zoomHelpText2 = navigator.userAgent.indexOf("Mac") !== -1 ? "Use ⌘ + scroll to zoom" : "Use Ctrl + scroll to zoom";
|
|
30
|
-
}
|
|
31
|
-
setZoomHelpText(zoomHelpText2);
|
|
32
|
-
return () => {
|
|
33
|
-
map2.destroy();
|
|
34
|
-
setMap(null);
|
|
35
|
-
};
|
|
36
|
-
}, [config]);
|
|
37
|
-
useEffect(() => {
|
|
38
|
-
if (!map) return;
|
|
39
|
-
let timeoutID;
|
|
40
|
-
map.onFilterEvent((showHelpText2) => {
|
|
41
|
-
if (timeoutID) clearTimeout(timeoutID);
|
|
42
|
-
setShowHelpText(showHelpText2);
|
|
43
|
-
if (showHelpText2) {
|
|
44
|
-
timeoutID = setTimeout(() => {
|
|
45
|
-
setShowHelpText(false);
|
|
46
|
-
}, 1e3);
|
|
47
|
-
}
|
|
48
|
-
});
|
|
49
|
-
return () => {
|
|
50
|
-
if (timeoutID) clearTimeout(timeoutID);
|
|
51
|
-
};
|
|
52
|
-
}, [map]);
|
|
53
|
-
useEffect(() => {
|
|
54
|
-
if (map && onLoad) {
|
|
55
|
-
onLoad(map);
|
|
56
|
-
}
|
|
57
|
-
if (map && ref) {
|
|
58
|
-
ref.current = map;
|
|
59
|
-
}
|
|
60
|
-
return () => {
|
|
61
|
-
if (ref) {
|
|
62
|
-
ref.current = null;
|
|
63
|
-
}
|
|
64
|
-
};
|
|
65
|
-
}, [map, ref, onLoad]);
|
|
66
|
-
useEffect(() => {
|
|
67
|
-
if (!map) return;
|
|
68
|
-
map.collaborativeGesturesEnabled = !inModalState;
|
|
69
|
-
}, [map, inModalState]);
|
|
70
|
-
return /* @__PURE__ */ jsxs("figure", { ref: targetRef, className: styles.mapContainer, children: [
|
|
71
|
-
/* @__PURE__ */ jsxs(
|
|
72
|
-
"div",
|
|
73
|
-
{
|
|
74
|
-
className: styles.helpTextContainer,
|
|
75
|
-
style: { opacity: showHelpText ? 1 : 0 },
|
|
76
|
-
"aria-hidden": true,
|
|
77
|
-
children: [
|
|
78
|
-
/* @__PURE__ */ jsx("p", { className: [styles.helpText, styles.desktopHelpText].join(" "), children: zoomHelpText }),
|
|
79
|
-
/* @__PURE__ */ jsx("p", { className: [styles.helpText, styles.mobileHelpText].join(" "), children: mobileHelpText })
|
|
80
|
-
]
|
|
81
|
-
}
|
|
82
|
-
),
|
|
83
|
-
/* @__PURE__ */ jsx(MapProvider, { map, children })
|
|
84
|
-
] });
|
|
85
|
-
}
|
|
86
|
-
);
|
|
87
|
-
export {
|
|
88
|
-
Map
|
|
89
|
-
};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @param {Object} params
|
|
3
|
-
* @param {import('../lib/Map').Map} params.map
|
|
4
|
-
* @param {import('preact').ComponentChildren} params.children
|
|
5
|
-
*/
|
|
6
|
-
export function MapProvider({ map, children }: {
|
|
7
|
-
map: import('../lib/Map').Map;
|
|
8
|
-
children: import('preact').ComponentChildren;
|
|
9
|
-
}): import("preact").JSX.Element;
|
|
10
|
-
export type MapContext = {
|
|
11
|
-
registerLayer: ((layer: import('../lib/layers').Layer) => void) | null;
|
|
12
|
-
};
|
|
13
|
-
/**
|
|
14
|
-
* @typedef {{ registerLayer: ((layer: import("../lib/layers").Layer) => void) | null }} MapContext
|
|
15
|
-
*/
|
|
16
|
-
/**
|
|
17
|
-
* @type {import('preact').Context<MapContext | null>}
|
|
18
|
-
*/
|
|
19
|
-
export const MapContext: import('preact').Context<MapContext | null>;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { jsx } from "preact/jsx-runtime";
|
|
2
|
-
import { createContext } from "preact";
|
|
3
|
-
import { useEffect } from "preact/hooks";
|
|
4
|
-
const MapContext = createContext(null);
|
|
5
|
-
function MapProvider({ map, children }) {
|
|
6
|
-
const registeredLayers = [];
|
|
7
|
-
const registerLayer = (layer) => {
|
|
8
|
-
registeredLayers.push(layer);
|
|
9
|
-
};
|
|
10
|
-
useEffect(() => {
|
|
11
|
-
if (map && !map.hasLayers(registeredLayers)) {
|
|
12
|
-
map.setLayers(registeredLayers);
|
|
13
|
-
}
|
|
14
|
-
}, [map, children]);
|
|
15
|
-
return /* @__PURE__ */ jsx(MapContext.Provider, { value: { registerLayer }, children });
|
|
16
|
-
}
|
|
17
|
-
export {
|
|
18
|
-
MapContext,
|
|
19
|
-
MapProvider
|
|
20
|
-
};
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { jsxs, jsx } from "preact/jsx-runtime";
|
|
2
|
-
import { IconMinus } from "./icons/minus.js";
|
|
3
|
-
import { IconPlus } from "./icons/plus.js";
|
|
4
|
-
import { IconReset } from "./icons/reset.js";
|
|
5
|
-
import styles from "./style.module.css.js";
|
|
6
|
-
function ZoomControl({ resetEnabled, onZoomIn, onZoomOut, onReset }) {
|
|
7
|
-
const _onZoomIn = (event) => {
|
|
8
|
-
event.stopPropagation();
|
|
9
|
-
onZoomIn(event);
|
|
10
|
-
};
|
|
11
|
-
const _onZoomOut = (event) => {
|
|
12
|
-
event.stopPropagation();
|
|
13
|
-
onZoomOut(event);
|
|
14
|
-
};
|
|
15
|
-
const _onReset = (event) => {
|
|
16
|
-
event.stopPropagation();
|
|
17
|
-
onReset(event);
|
|
18
|
-
};
|
|
19
|
-
return /* @__PURE__ */ jsxs("div", { className: styles.zoomControl, children: [
|
|
20
|
-
/* @__PURE__ */ jsx("button", { className: styles.button, onClick: _onZoomIn, children: /* @__PURE__ */ jsx(IconPlus, {}) }),
|
|
21
|
-
/* @__PURE__ */ jsx("button", { className: styles.button, onClick: _onZoomOut, children: /* @__PURE__ */ jsx(IconMinus, {}) }),
|
|
22
|
-
/* @__PURE__ */ jsx(
|
|
23
|
-
"button",
|
|
24
|
-
{
|
|
25
|
-
className: styles.button,
|
|
26
|
-
onClick: _onReset,
|
|
27
|
-
disabled: !resetEnabled,
|
|
28
|
-
children: /* @__PURE__ */ jsx(
|
|
29
|
-
IconReset,
|
|
30
|
-
{
|
|
31
|
-
fill: resetEnabled ? "var(--primary-text-color)" : "var(--news-grey-03)"
|
|
32
|
-
}
|
|
33
|
-
)
|
|
34
|
-
}
|
|
35
|
-
)
|
|
36
|
-
] });
|
|
37
|
-
}
|
|
38
|
-
export {
|
|
39
|
-
ZoomControl
|
|
40
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export function IconMinus(): import("preact").JSX.Element;
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { jsx } from "preact/jsx-runtime";
|
|
2
|
-
function IconMinus() {
|
|
3
|
-
return /* @__PURE__ */ jsx(
|
|
4
|
-
"svg",
|
|
5
|
-
{
|
|
6
|
-
width: "22",
|
|
7
|
-
height: "4",
|
|
8
|
-
viewBox: "0 0 22 4",
|
|
9
|
-
fill: "none",
|
|
10
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
11
|
-
children: /* @__PURE__ */ jsx(
|
|
12
|
-
"path",
|
|
13
|
-
{
|
|
14
|
-
fillRule: "evenodd",
|
|
15
|
-
clipRule: "evenodd",
|
|
16
|
-
d: "M0 0.75V3.24999H21.9999V0.75H0Z",
|
|
17
|
-
fill: "var(--news-grey-01)"
|
|
18
|
-
}
|
|
19
|
-
)
|
|
20
|
-
}
|
|
21
|
-
);
|
|
22
|
-
}
|
|
23
|
-
export {
|
|
24
|
-
IconMinus
|
|
25
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export function IconPlus(): import("preact").JSX.Element;
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { jsx } from "preact/jsx-runtime";
|
|
2
|
-
function IconPlus() {
|
|
3
|
-
return /* @__PURE__ */ jsx(
|
|
4
|
-
"svg",
|
|
5
|
-
{
|
|
6
|
-
width: "22",
|
|
7
|
-
height: "22",
|
|
8
|
-
viewBox: "0 0 22 22",
|
|
9
|
-
fill: "none",
|
|
10
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
11
|
-
children: /* @__PURE__ */ jsx(
|
|
12
|
-
"path",
|
|
13
|
-
{
|
|
14
|
-
fillRule: "evenodd",
|
|
15
|
-
clipRule: "evenodd",
|
|
16
|
-
d: "M9.79997 12.2L10.225 21.9999H11.75L12.2 12.2L21.9999 11.75V10.225L12.2 9.79997L11.75 0H10.225L9.79997 9.79997L0 10.225V11.75L9.79997 12.2Z",
|
|
17
|
-
fill: "var(--news-grey-01)"
|
|
18
|
-
}
|
|
19
|
-
)
|
|
20
|
-
}
|
|
21
|
-
);
|
|
22
|
-
}
|
|
23
|
-
export {
|
|
24
|
-
IconPlus
|
|
25
|
-
};
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { jsx } from "preact/jsx-runtime";
|
|
2
|
-
function IconReset({ fill = "#121212" }) {
|
|
3
|
-
return /* @__PURE__ */ jsx(
|
|
4
|
-
"svg",
|
|
5
|
-
{
|
|
6
|
-
width: "40",
|
|
7
|
-
height: "40",
|
|
8
|
-
viewBox: "0 0 40 40",
|
|
9
|
-
fill: "none",
|
|
10
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
11
|
-
children: /* @__PURE__ */ jsx(
|
|
12
|
-
"path",
|
|
13
|
-
{
|
|
14
|
-
fillRule: "evenodd",
|
|
15
|
-
clipRule: "evenodd",
|
|
16
|
-
d: "M32.107 33.107L26.5535 27.5535C24.7984 29.0775 22.5069 30 20 30L19.9916 30L19.9811 30C17.4476 30 15.1269 29.0482 13.3721 27.4882C11.3038 25.6561 10 22.9803 10 20H11.8C11.8 24.5287 15.4713 28.2 20 28.2C20.0567 28.2 20.1134 28.1994 20.1698 28.1983C24.5716 28.0965 28.1587 24.4465 28.1587 19.9772C28.1587 15.467 24.4685 11.7995 19.9811 11.7995C17.407 11.7995 15.1975 12.9385 13.6713 14.7608L16.9742 15.3075V16.4465L11.1428 16.4465L10.71 16.0137V10H11.8262L12.3956 13.4396C14.218 11.3212 16.9059 10 19.9811 10C25.5164 10 30.0039 14.4647 30.0039 19.9772C30.0039 21.8429 29.4982 23.5854 28.6171 25.0771C28.4764 25.3155 28.326 25.5474 28.1666 25.7725L33.8221 31.428C33.2844 32.0212 32.7116 32.5819 32.107 33.107Z",
|
|
17
|
-
fill
|
|
18
|
-
}
|
|
19
|
-
)
|
|
20
|
-
}
|
|
21
|
-
);
|
|
22
|
-
}
|
|
23
|
-
export {
|
|
24
|
-
IconReset
|
|
25
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './ZoomControl';
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export * from './Map';
|
|
2
|
-
export * from './controls';
|
|
3
|
-
export * from './lib/Feature';
|
|
4
|
-
export * from './lib/FeatureCollection';
|
|
5
|
-
export * from './lib/events';
|
|
6
|
-
export * from './lib/projection';
|
|
7
|
-
export * from './lib/layers';
|
|
8
|
-
export * from './lib/styles';
|
|
9
|
-
export * from './lib/interpolators';
|
|
10
|
-
export * from './lib/sources/VectorSource';
|
|
11
|
-
export * from './lib/formats/GeoJSON';
|
|
12
|
-
export * from './lib/util/bboxFeature';
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Class representing a map Feature.
|
|
3
|
-
* @class
|
|
4
|
-
* @property {string} id - The unique identifier of the feature
|
|
5
|
-
* @property {Array} geometries - The geometries of the feature
|
|
6
|
-
* @property {Object} properties - The properties of the feature
|
|
7
|
-
* @property {Style} style - The style of the feature
|
|
8
|
-
*/
|
|
9
|
-
export class Feature {
|
|
10
|
-
/**
|
|
11
|
-
* Represents a feature on the map
|
|
12
|
-
* @constructor
|
|
13
|
-
* @param {Object} props - The properties for the feature.
|
|
14
|
-
* @property {string} id - The unique identifier of the feature
|
|
15
|
-
* @property {Array} geometries - The geometries of the feature
|
|
16
|
-
* @property {Object} properties - The properties of the feature
|
|
17
|
-
* @property {import("./styles").Style | import("./styles").StyleFunction} style - The style of the feature
|
|
18
|
-
*/
|
|
19
|
-
constructor({ id, geometries, properties, style }: any);
|
|
20
|
-
id: any;
|
|
21
|
-
geometries: any;
|
|
22
|
-
properties: any;
|
|
23
|
-
style: any;
|
|
24
|
-
uid: string;
|
|
25
|
-
getExtent(): any;
|
|
26
|
-
_extent: any;
|
|
27
|
-
setgeometries(geometries: any): void;
|
|
28
|
-
getProjectedGeometries(projection: any): any;
|
|
29
|
-
getStyleFunction(): any;
|
|
30
|
-
containsCoordinate(coordinate: any): boolean;
|
|
31
|
-
clone(): Feature;
|
|
32
|
-
/**
|
|
33
|
-
* Returns the geometries as a GeoJSON object
|
|
34
|
-
* @returns {Object} The GeoJSON representation of the geometries
|
|
35
|
-
*/
|
|
36
|
-
getGeoJSON(): any;
|
|
37
|
-
_getGeometryGeoJSON(): any;
|
|
38
|
-
}
|