@guardian/interactive-component-library 0.1.0-alpha.41 → 0.1.0-alpha.43

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.
@@ -8,7 +8,7 @@
8
8
  const rotated = "_rotated_b5io0_10";
9
9
  const path$4 = "_path_b5io0_14";
10
10
  const active = "_active_b5io0_18";
11
- const defaultStyles$w = {
11
+ const defaultStyles$x = {
12
12
  svg: svg$9,
13
13
  group,
14
14
  rotated,
@@ -48,13 +48,13 @@
48
48
  styles: styles2
49
49
  }) {
50
50
  const defaultStylesCopy = {
51
- ...defaultStyles$w
51
+ ...defaultStyles$x
52
52
  };
53
53
  if (active2) {
54
- defaultStylesCopy.path = mergeStyles(defaultStyles$w.path, defaultStyles$w.active);
54
+ defaultStylesCopy.path = mergeStyles(defaultStyles$x.path, defaultStyles$x.active);
55
55
  }
56
56
  if (direction === DIRECTION.up) {
57
- defaultStylesCopy.group = mergeStyles(defaultStyles$w.group, defaultStyles$w.rotated);
57
+ defaultStylesCopy.group = mergeStyles(defaultStyles$x.group, defaultStyles$x.rotated);
58
58
  }
59
59
  styles2 = mergeStyles(defaultStylesCopy, styles2);
60
60
  return size === SIZE.small ? jsxRuntime.jsx(SmallChevron, {
@@ -108,7 +108,7 @@
108
108
  const dot = "_dot_jzalm_6";
109
109
  const circle$2 = "_circle_jzalm_13";
110
110
  const text$2 = "_text_jzalm_17";
111
- const defaultStyles$v = {
111
+ const defaultStyles$w = {
112
112
  container: container$7,
113
113
  dot,
114
114
  circle: circle$2,
@@ -125,10 +125,10 @@
125
125
  abbreviation
126
126
  }) => {
127
127
  const defaultStylesCopy = {
128
- ...defaultStyles$v
128
+ ...defaultStyles$w
129
129
  };
130
130
  if (dotType === DOT_TYPE.round) {
131
- defaultStylesCopy.dot = mergeStyles(defaultStyles$v.dot, defaultStyles$v.circle);
131
+ defaultStylesCopy.dot = mergeStyles(defaultStyles$w.dot, defaultStyles$w.circle);
132
132
  }
133
133
  styles2 = mergeStyles(defaultStylesCopy, styles2);
134
134
  return jsxRuntime.jsxs("div", {
@@ -145,7 +145,7 @@
145
145
  const label$1 = "_label_1jxh9_5";
146
146
  const labelStroke = "_labelStroke_1jxh9_11";
147
147
  const backgroundRect = "_backgroundRect_1jxh9_17";
148
- const defaultStyles$u = {
148
+ const defaultStyles$v = {
149
149
  bar: bar$2,
150
150
  label: label$1,
151
151
  labelStroke,
@@ -214,7 +214,7 @@
214
214
  const rectElements = hooks.useRef([]);
215
215
  const textElements = hooks.useRef([]);
216
216
  styles2 = mergeStyles({
217
- ...defaultStyles$u
217
+ ...defaultStyles$v
218
218
  }, styles2);
219
219
  const svgHeight = labelType === LabelType.hanging && !hideLabels ? height + 20 : height;
220
220
  const cleanBorderAbbr = (abbrText) => abbrText.split("-")[0];
@@ -305,7 +305,7 @@
305
305
  const svg$8 = "_svg_1cajk_6";
306
306
  const previous = "_previous_1cajk_12";
307
307
  const next = "_next_1cajk_16";
308
- const defaultStyles$t = {
308
+ const defaultStyles$u = {
309
309
  svg: svg$8,
310
310
  previous,
311
311
  next
@@ -316,7 +316,7 @@
316
316
  next: next2,
317
317
  styles: styles2
318
318
  } = props;
319
- styles2 = mergeStyles(defaultStyles$t, styles2);
319
+ styles2 = mergeStyles(defaultStyles$u, styles2);
320
320
  const gradientId = hooks.useId();
321
321
  return jsxRuntime.jsxs("svg", {
322
322
  class: styles2.svg,
@@ -347,7 +347,7 @@
347
347
  };
348
348
  const unit = "_unit_mo5d9_1";
349
349
  const container$6 = "_container_mo5d9_6";
350
- const defaultStyles$s = {
350
+ const defaultStyles$t = {
351
351
  unit,
352
352
  container: container$6
353
353
  };
@@ -404,7 +404,7 @@
404
404
  const unitWidth = width / columns;
405
405
  const unitHeight = unitWidth;
406
406
  const height = numberOfRows * unitHeight;
407
- styles2 = mergeStyles(defaultStyles$s, styles2);
407
+ styles2 = mergeStyles(defaultStyles$t, styles2);
408
408
  return jsxRuntime.jsx("div", {
409
409
  ref: containerRef,
410
410
  className: styles2.container,
@@ -447,7 +447,7 @@
447
447
  };
448
448
  const button$7 = "_button_oqopj_1";
449
449
  const svg$7 = "_svg_oqopj_15";
450
- const defaultStyles$r = {
450
+ const defaultStyles$s = {
451
451
  button: button$7,
452
452
  svg: svg$7
453
453
  };
@@ -456,7 +456,7 @@
456
456
  styles: styles2
457
457
  }, ref) => {
458
458
  styles2 = mergeStyles({
459
- ...defaultStyles$r
459
+ ...defaultStyles$s
460
460
  }, styles2);
461
461
  return jsxRuntime.jsx("button", {
462
462
  ref,
@@ -475,7 +475,7 @@
475
475
  const svg$6 = "_svg_1v49v_1";
476
476
  const circle$1 = "_circle_1v49v_5";
477
477
  const pulse = "_pulse_1v49v_9";
478
- const defaultStyles$q = {
478
+ const defaultStyles$r = {
479
479
  svg: svg$6,
480
480
  circle: circle$1,
481
481
  pulse
@@ -485,7 +485,7 @@
485
485
  pulse: pulse2 = false,
486
486
  styles: styles2
487
487
  }) => {
488
- styles2 = mergeStyles(defaultStyles$q, styles2);
488
+ styles2 = mergeStyles(defaultStyles$r, styles2);
489
489
  return jsxRuntime.jsx("svg", {
490
490
  style: styles2.svg,
491
491
  fill: "none",
@@ -505,7 +505,7 @@
505
505
  });
506
506
  };
507
507
  const dateStampText = "_dateStampText_wczs5_1";
508
- const defaultStyles$p = {
508
+ const defaultStyles$q = {
509
509
  dateStampText
510
510
  };
511
511
  var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
@@ -881,7 +881,7 @@
881
881
  styles: styles2
882
882
  }) => {
883
883
  styles2 = mergeStyles({
884
- ...defaultStyles$p
884
+ ...defaultStyles$q
885
885
  }, styles2);
886
886
  let timeSince = dayjs(timeStamp).fromNow();
887
887
  return jsxRuntime.jsx("span", {
@@ -891,7 +891,7 @@
891
891
  };
892
892
  const pageContainer = "_pageContainer_1s0yq_9";
893
893
  const sideBorders = "_sideBorders_1s0yq_42";
894
- const defaultStyles$o = {
894
+ const defaultStyles$p = {
895
895
  pageContainer,
896
896
  sideBorders
897
897
  };
@@ -903,7 +903,7 @@
903
903
  const {
904
904
  pageContainer: pageContainer2,
905
905
  sideBorders: sideBordersStyle
906
- } = mergeStyles(defaultStyles$o, styles2);
906
+ } = mergeStyles(defaultStyles$p, styles2);
907
907
  return jsxRuntime.jsx("div", {
908
908
  className: [pageContainer2, sideBorders2 && sideBordersStyle].join(" "),
909
909
  children
@@ -912,7 +912,7 @@
912
912
  const wrapper$1 = "_wrapper_5oj1x_9";
913
913
  const bar$1 = "_bar_5oj1x_14";
914
914
  const zero$1 = "_zero_5oj1x_19";
915
- const defaultStyles$n = {
915
+ const defaultStyles$o = {
916
916
  wrapper: wrapper$1,
917
917
  bar: bar$1,
918
918
  zero: zero$1
@@ -933,7 +933,7 @@
933
933
  let thisColor = ` bg-color--${party}`;
934
934
  let zeroStyles = ` height: ${height};`;
935
935
  styles2 = mergeStyles({
936
- ...defaultStyles$n
936
+ ...defaultStyles$o
937
937
  }, styles2);
938
938
  return jsxRuntime.jsxs("div", {
939
939
  className: styles2.wrapper,
@@ -951,7 +951,7 @@
951
951
  const dividingLineColor = "_dividingLineColor_886i1_16";
952
952
  const square = "_square_886i1_20";
953
953
  const corner = "_corner_886i1_24";
954
- const defaultStyles$m = {
954
+ const defaultStyles$n = {
955
955
  svg: svg$5,
956
956
  dividingLineColor,
957
957
  square,
@@ -964,7 +964,7 @@
964
964
  styles: styles2
965
965
  }) => {
966
966
  styles2 = mergeStyles({
967
- ...defaultStyles$m
967
+ ...defaultStyles$n
968
968
  }, styles2);
969
969
  let cornerSize = squareSize * 0.625;
970
970
  let cornerMargin = squareSize < 100 ? squareSize / 6 : 10;
@@ -1002,7 +1002,7 @@
1002
1002
  const stackedGridRotateItems90 = "_stackedGridRotateItems90_6whof_17";
1003
1003
  const stackedGridRotateItems180 = "_stackedGridRotateItems180_6whof_23";
1004
1004
  const stackedGridRotateItems270 = "_stackedGridRotateItems270_6whof_29";
1005
- const defaultStyles$l = {
1005
+ const defaultStyles$m = {
1006
1006
  stackedGridContainer,
1007
1007
  stackedGridRotateItems0,
1008
1008
  stackedGridRotateItems90,
@@ -1033,7 +1033,7 @@
1033
1033
  }) => {
1034
1034
  let containerFlip = getContainerFlip(fromBottom, fromLeft);
1035
1035
  let itemRotateClass = getItemRotate(fromBottom, fromLeft);
1036
- styles2 = mergeStyles(defaultStyles$l, styles2);
1036
+ styles2 = mergeStyles(defaultStyles$m, styles2);
1037
1037
  return jsxRuntime.jsx("div", {
1038
1038
  style: {
1039
1039
  transform: containerFlip
@@ -1044,7 +1044,7 @@
1044
1044
  };
1045
1045
  const svg$4 = "_svg_l2fsl_9";
1046
1046
  const squareFill = "_squareFill_l2fsl_16";
1047
- const defaultStyles$k = {
1047
+ const defaultStyles$l = {
1048
1048
  svg: svg$4,
1049
1049
  squareFill
1050
1050
  };
@@ -1054,7 +1054,7 @@
1054
1054
  styles: styles2
1055
1055
  }) => {
1056
1056
  styles2 = mergeStyles({
1057
- ...defaultStyles$k
1057
+ ...defaultStyles$l
1058
1058
  }, styles2);
1059
1059
  return jsxRuntime.jsx("svg", {
1060
1060
  width: size,
@@ -1072,7 +1072,7 @@
1072
1072
  };
1073
1073
  const button$6 = "_button_1kqfn_1";
1074
1074
  const icon$2 = "_icon_1kqfn_6";
1075
- const defaultStyles$j = {
1075
+ const defaultStyles$k = {
1076
1076
  button: button$6,
1077
1077
  icon: icon$2
1078
1078
  };
@@ -1082,7 +1082,7 @@
1082
1082
  styles: styles2,
1083
1083
  onClick
1084
1084
  }) {
1085
- styles2 = mergeStyles(defaultStyles$j, styles2);
1085
+ styles2 = mergeStyles(defaultStyles$k, styles2);
1086
1086
  return jsxRuntime.jsx("button", {
1087
1087
  className: styles2.button,
1088
1088
  disabled: disabled2,
@@ -1108,7 +1108,7 @@
1108
1108
  }
1109
1109
  const button$5 = "_button_s6ell_1";
1110
1110
  const buttonInner$1 = "_buttonInner_s6ell_6";
1111
- const defaultStyles$i = {
1111
+ const defaultStyles$j = {
1112
1112
  button: button$5,
1113
1113
  buttonInner: buttonInner$1
1114
1114
  };
@@ -1118,7 +1118,7 @@
1118
1118
  styles: styles2,
1119
1119
  children
1120
1120
  }) {
1121
- styles2 = mergeStyles(defaultStyles$i, styles2);
1121
+ styles2 = mergeStyles(defaultStyles$j, styles2);
1122
1122
  return jsxRuntime.jsx("button", {
1123
1123
  className: styles2.button,
1124
1124
  "data-type": type,
@@ -1133,7 +1133,7 @@
1133
1133
  const buttonBorder = "_buttonBorder_1bibm_14";
1134
1134
  const svg$3 = "_svg_1bibm_22";
1135
1135
  const path$3 = "_path_1bibm_29";
1136
- const defaultStyles$h = {
1136
+ const defaultStyles$i = {
1137
1137
  button: button$4,
1138
1138
  buttonBorder,
1139
1139
  svg: svg$3,
@@ -1144,7 +1144,7 @@
1144
1144
  onClick,
1145
1145
  styles: styles2
1146
1146
  }) {
1147
- styles2 = mergeStyles(defaultStyles$h, styles2);
1147
+ styles2 = mergeStyles(defaultStyles$i, styles2);
1148
1148
  return jsxRuntime.jsx("button", {
1149
1149
  className: [styles2.button, border && styles2.buttonBorder].join(" "),
1150
1150
  onClick,
@@ -1165,7 +1165,7 @@
1165
1165
  }
1166
1166
  const container$5 = "_container_tq3ke_1";
1167
1167
  const slot = "_slot_tq3ke_5";
1168
- const defaultStyles$g = {
1168
+ const defaultStyles$h = {
1169
1169
  container: container$5,
1170
1170
  slot
1171
1171
  };
@@ -1176,7 +1176,7 @@
1176
1176
  }) {
1177
1177
  var _a, _b, _c;
1178
1178
  const slotId = `dfp-ad--${name2}`;
1179
- styles2 = mergeStyles(defaultStyles$g, styles2);
1179
+ styles2 = mergeStyles(defaultStyles$h, styles2);
1180
1180
  const mobileSizes = (_a = sizeMapping.mobile) == null ? void 0 : _a.map((size) => size.join(",")).join("|");
1181
1181
  const tabletSizes = (_b = sizeMapping.tablet) == null ? void 0 : _b.map((size) => size.join(",")).join("|");
1182
1182
  const desktopSizes = (_c = sizeMapping.desktop) == null ? void 0 : _c.map((size) => size.join(",")).join("|");
@@ -1334,7 +1334,7 @@
1334
1334
  const headerCellButton = "_headerCellButton_fhbur_49";
1335
1335
  const bodyRow = "_bodyRow_fhbur_58";
1336
1336
  const bodyCell = "_bodyCell_fhbur_62";
1337
- const defaultStyles$f = {
1337
+ const defaultStyles$g = {
1338
1338
  table,
1339
1339
  hideHeader,
1340
1340
  hideHeaderNoBorder,
@@ -1377,7 +1377,7 @@
1377
1377
  };
1378
1378
  });
1379
1379
  };
1380
- styles2 = mergeStyles(defaultStyles$f, styles2);
1380
+ styles2 = mergeStyles(defaultStyles$g, styles2);
1381
1381
  return jsxRuntime.jsxs("table", {
1382
1382
  className: styles2.table,
1383
1383
  cellSpacing: 0,
@@ -1454,7 +1454,7 @@
1454
1454
  const y2Label = "_y2Label_nmjjj_33";
1455
1455
  const axis$1 = "_axis_nmjjj_37";
1456
1456
  const axisLabel = "_axisLabel_nmjjj_42";
1457
- const defaultStyles$e = {
1457
+ const defaultStyles$f = {
1458
1458
  slopeChartContainer,
1459
1459
  svg: svg$2,
1460
1460
  line: line$1,
@@ -1504,7 +1504,7 @@
1504
1504
  return positionLabels(labels);
1505
1505
  }, [lines, y2Label2, yScale]);
1506
1506
  styles2 = mergeStyles({
1507
- ...defaultStyles$e
1507
+ ...defaultStyles$f
1508
1508
  }, styles2);
1509
1509
  const chart = jsxRuntime.jsx("svg", {
1510
1510
  class: styles2.svg,
@@ -1604,7 +1604,7 @@
1604
1604
  return point.x >= rect.x && point.x <= rect.x + rect.width && point.y >= rect.y && point.y <= rect.y + rect.height;
1605
1605
  }
1606
1606
  const tooltip = "_tooltip_11t5d_1";
1607
- const defaultStyles$d = {
1607
+ const defaultStyles$e = {
1608
1608
  tooltip
1609
1609
  };
1610
1610
  function Tooltip({
@@ -1623,7 +1623,7 @@
1623
1623
  });
1624
1624
  const [displayElement, setDisplayElement] = hooks.useState(null);
1625
1625
  const tooltipRef = hooks.useRef();
1626
- styles2 = mergeStyles(defaultStyles$d, styles2);
1626
+ styles2 = mergeStyles(defaultStyles$e, styles2);
1627
1627
  hooks.useEffect(() => {
1628
1628
  setDisplayElement(document.querySelector("body"));
1629
1629
  return () => {
@@ -1733,7 +1733,7 @@
1733
1733
  }
1734
1734
  const text$1 = "_text_1b8t2_1";
1735
1735
  const container$4 = "_container_1b8t2_10";
1736
- const defaultStyles$c = {
1736
+ const defaultStyles$d = {
1737
1737
  text: text$1,
1738
1738
  container: container$4
1739
1739
  };
@@ -1744,7 +1744,7 @@
1744
1744
  styles: styles2
1745
1745
  }) => {
1746
1746
  styles2 = mergeStyles({
1747
- ...defaultStyles$c
1747
+ ...defaultStyles$d
1748
1748
  }, styles2);
1749
1749
  let hasChanged = next2 !== previous2;
1750
1750
  return jsxRuntime.jsxs("div", {
@@ -1769,7 +1769,7 @@
1769
1769
  const wrapper = "_wrapper_8vo05_1";
1770
1770
  const line = "_line_8vo05_5";
1771
1771
  const halfLineText = "_halfLineText_8vo05_15";
1772
- const defaultStyles$b = {
1772
+ const defaultStyles$c = {
1773
1773
  wrapper,
1774
1774
  line,
1775
1775
  halfLineText
@@ -1779,7 +1779,7 @@
1779
1779
  children,
1780
1780
  lineOverHang
1781
1781
  }) => {
1782
- styles2 = mergeStyles(defaultStyles$b, styles2);
1782
+ styles2 = mergeStyles(defaultStyles$c, styles2);
1783
1783
  return jsxRuntime.jsxs("div", {
1784
1784
  class: styles2.wrapper,
1785
1785
  children: [jsxRuntime.jsx("p", {
@@ -1805,7 +1805,7 @@
1805
1805
  const displayRow = "_displayRow_49z3u_76";
1806
1806
  const displayColumn = "_displayColumn_49z3u_82";
1807
1807
  const topRow = "_topRow_49z3u_86";
1808
- const defaultStyles$a = {
1808
+ const defaultStyles$b = {
1809
1809
  toplineResult,
1810
1810
  primaryname,
1811
1811
  secondaryname,
@@ -1833,7 +1833,7 @@
1833
1833
  infoButtonRef
1834
1834
  }, ref) => {
1835
1835
  styles2 = mergeStyles({
1836
- ...defaultStyles$a
1836
+ ...defaultStyles$b
1837
1837
  }, styles2);
1838
1838
  const displayStyle = displayRow2 ? styles2.displayRow : styles2.displayColumn;
1839
1839
  return jsxRuntime.jsxs("div", {
@@ -1873,12 +1873,12 @@
1873
1873
  })]
1874
1874
  });
1875
1875
  });
1876
- const borderTop = "_borderTop_gph7y_9";
1877
- const section = "_section_gph7y_13";
1878
- const fullWidth = "_fullWidth_gph7y_19";
1879
- const header = "_header_gph7y_95";
1880
- const content = "_content_gph7y_132";
1881
- const defaultStyles$9 = {
1876
+ const borderTop = "_borderTop_1xpz0_9";
1877
+ const section = "_section_1xpz0_39";
1878
+ const fullWidth = "_fullWidth_1xpz0_39";
1879
+ const header = "_header_1xpz0_150";
1880
+ const content = "_content_1xpz0_187";
1881
+ const defaultStyles$a = {
1882
1882
  borderTop,
1883
1883
  section,
1884
1884
  fullWidth,
@@ -1890,6 +1890,7 @@
1890
1890
  fullWidth: "fullWidth"
1891
1891
  };
1892
1892
  const PageSection = compat.forwardRef(({
1893
+ id: id2,
1893
1894
  children,
1894
1895
  layout = SectionLayout.default,
1895
1896
  styles: styles2,
@@ -1897,7 +1898,7 @@
1897
1898
  backgroundColor = "transparent"
1898
1899
  }, ref) => {
1899
1900
  styles2 = mergeStyles({
1900
- ...defaultStyles$9
1901
+ ...defaultStyles$a
1901
1902
  }, styles2);
1902
1903
  const [minHeight, setMinHeight] = hooks.useState("auto");
1903
1904
  const headerRef = hooks.useRef();
@@ -1906,13 +1907,16 @@
1906
1907
  setMinHeight(headerElement.offsetHeight);
1907
1908
  }, [children]);
1908
1909
  return jsxRuntime.jsxs("section", {
1910
+ id: id2,
1909
1911
  ref,
1910
- className: [styles2.section, styles2[layout], borderTop2 && styles2.borderTop].join(" "),
1912
+ className: [styles2.section, styles2[layout]].join(" "),
1911
1913
  style: {
1912
1914
  "--background-color": backgroundColor,
1913
1915
  minHeight
1914
1916
  },
1915
- children: [jsxRuntime.jsx("div", {
1917
+ children: [borderTop2 && jsxRuntime.jsx("div", {
1918
+ className: styles2.borderTop
1919
+ }), jsxRuntime.jsx("div", {
1916
1920
  className: [styles2.header, styles2[layout]].join(" "),
1917
1921
  ref: headerRef,
1918
1922
  children: children.header
@@ -1925,7 +1929,7 @@
1925
1929
  const text = "_text_lo5h3_1";
1926
1930
  const axis = "_axis_lo5h3_6";
1927
1931
  const bar = "_bar_lo5h3_10";
1928
- const defaultStyles$8 = {
1932
+ const defaultStyles$9 = {
1929
1933
  text,
1930
1934
  axis,
1931
1935
  bar
@@ -1940,7 +1944,7 @@
1940
1944
  columnPadding,
1941
1945
  styles: styles2
1942
1946
  }) => {
1943
- styles2 = mergeStyles(defaultStyles$8, styles2);
1947
+ styles2 = mergeStyles(defaultStyles$9, styles2);
1944
1948
  const yScale = d3Scale.scaleLinear([maxValue, minValue], [0, chartHeight]);
1945
1949
  const totalColumnWidth = Number(columnWidth) + Number(columnPadding.left) + Number(columnPadding.right);
1946
1950
  let marginBottom = minValue < 0 ? 0 : 40;
@@ -1983,7 +1987,7 @@
1983
1987
  const small = "_small_hbk39_39";
1984
1988
  const blurb = "_blurb_hbk39_49";
1985
1989
  const footnote = "_footnote_hbk39_57";
1986
- const defaultStyles$7 = {
1990
+ const defaultStyles$8 = {
1987
1991
  container: container$3,
1988
1992
  img,
1989
1993
  title: title$2,
@@ -2007,7 +2011,7 @@
2007
2011
  styles: styles2
2008
2012
  }) => {
2009
2013
  styles2 = mergeStyles({
2010
- ...defaultStyles$7
2014
+ ...defaultStyles$8
2011
2015
  }, styles2);
2012
2016
  return jsxRuntime.jsxs("div", {
2013
2017
  class: styles2.container,
@@ -2032,7 +2036,7 @@
2032
2036
  };
2033
2037
  const container$2 = "_container_azu4a_1";
2034
2038
  const paragraph = "_paragraph_azu4a_12";
2035
- const defaultStyles$6 = {
2039
+ const defaultStyles$7 = {
2036
2040
  container: container$2,
2037
2041
  paragraph
2038
2042
  };
@@ -2045,7 +2049,7 @@
2045
2049
  styles: styles2
2046
2050
  }) {
2047
2051
  styles2 = mergeStyles({
2048
- ...defaultStyles$6
2052
+ ...defaultStyles$7
2049
2053
  }, styles2);
2050
2054
  return jsxRuntime.jsxs("div", {
2051
2055
  class: styles2.container,
@@ -2063,7 +2067,7 @@
2063
2067
  }
2064
2068
  const svg$1 = "_svg_1dms8_1";
2065
2069
  const path$2 = "_path_1dms8_8";
2066
- const styles$7 = {
2070
+ const styles$6 = {
2067
2071
  svg: svg$1,
2068
2072
  path: path$2
2069
2073
  };
@@ -2071,9 +2075,9 @@
2071
2075
  return jsxRuntime.jsx("svg", {
2072
2076
  viewBox: "0 0 20 20",
2073
2077
  xmlns: "http://www.w3.org/2000/svg",
2074
- className: styles$7.svg,
2078
+ className: styles$6.svg,
2075
2079
  children: jsxRuntime.jsx("path", {
2076
- className: styles$7.path,
2080
+ className: styles$6.path,
2077
2081
  "fill-rule": "evenodd",
2078
2082
  "clip-rule": "evenodd",
2079
2083
  d: "M7.273 0c4.022 0 7.25 3.295 7.25 7.273a7.226 7.226 0 01-7.25 7.25C3.25 14.523 0 11.295 0 7.273 0 3.295 3.25 0 7.273 0zm0 1.84A5.403 5.403 0 001.84 7.274c0 3 2.409 5.454 5.432 5.454 3 0 5.454-2.454 5.454-5.454 0-3.023-2.454-5.432-5.454-5.432zM20 18.16l-5.432-5.432h-.932l-.909.91v.931L18.16 20 20 18.159z"
@@ -2089,7 +2093,7 @@
2089
2093
  const disabled = "_disabled_1kj0x_68";
2090
2094
  const selected$1 = "_selected_1kj0x_73";
2091
2095
  const highlighted = "_highlighted_1kj0x_77";
2092
- const defaultStyles$5 = {
2096
+ const defaultStyles$6 = {
2093
2097
  searchContainer,
2094
2098
  input,
2095
2099
  searchIcon,
@@ -2108,10 +2112,11 @@
2108
2112
  onSubmit,
2109
2113
  onSelect,
2110
2114
  onClear,
2115
+ onFocus,
2111
2116
  styles: styles2
2112
2117
  }) {
2113
2118
  var _a, _b, _c;
2114
- styles2 = mergeStyles(defaultStyles$5, styles2);
2119
+ styles2 = mergeStyles(defaultStyles$6, styles2);
2115
2120
  const inputRef = hooks.useRef(null);
2116
2121
  const [selectedIndex, setSelectedIndex] = hooks.useState(-1);
2117
2122
  const [suggestions2, setSuggestions] = hooks.useState();
@@ -2180,6 +2185,7 @@
2180
2185
  onFocus: (e) => {
2181
2186
  e.target.select();
2182
2187
  setShowSuggestions(true);
2188
+ onFocus && onFocus(e);
2183
2189
  },
2184
2190
  className: styles2.input
2185
2191
  }), jsxRuntime.jsx("div", {
@@ -2242,7 +2248,7 @@
2242
2248
  const icon$1 = "_icon_3z0ji_17";
2243
2249
  const liveText = "_liveText_3z0ji_26";
2244
2250
  const refreshText = "_refreshText_3z0ji_27";
2245
- const defaultStyles$4 = {
2251
+ const defaultStyles$5 = {
2246
2252
  refreshIndicator,
2247
2253
  icon: icon$1,
2248
2254
  liveText,
@@ -2252,7 +2258,7 @@
2252
2258
  text: text2,
2253
2259
  styles: styles2
2254
2260
  }) {
2255
- styles2 = mergeStyles(defaultStyles$4, styles2);
2261
+ styles2 = mergeStyles(defaultStyles$5, styles2);
2256
2262
  return jsxRuntime.jsxs("div", {
2257
2263
  className: styles2.refreshIndicator,
2258
2264
  children: [jsxRuntime.jsx("span", {
@@ -2270,7 +2276,7 @@
2270
2276
  });
2271
2277
  }
2272
2278
  const grid = "_grid_xps7m_9";
2273
- const defaultStyles$3 = {
2279
+ const defaultStyles$4 = {
2274
2280
  grid
2275
2281
  };
2276
2282
  const GridType = {
@@ -2284,7 +2290,7 @@
2284
2290
  styles: styles2
2285
2291
  }) {
2286
2292
  styles2 = mergeStyles({
2287
- ...defaultStyles$3
2293
+ ...defaultStyles$4
2288
2294
  }, styles2);
2289
2295
  return jsxRuntime.jsx("div", {
2290
2296
  className: styles2.grid,
@@ -2370,7 +2376,7 @@
2370
2376
  const exitDone = "_exitDone_48fp9_26";
2371
2377
  const enterActive = "_enterActive_48fp9_37";
2372
2378
  const exitActive = "_exitActive_48fp9_48";
2373
- const styles$6 = {
2379
+ const defaultStyles$3 = {
2374
2380
  transitionContainer,
2375
2381
  blur,
2376
2382
  modalBox,
@@ -2382,9 +2388,11 @@
2382
2388
  function Modal({
2383
2389
  visible = false,
2384
2390
  blurBackground = true,
2391
+ styles: styles2,
2385
2392
  children,
2386
2393
  onClickOutside
2387
2394
  }) {
2395
+ styles2 = mergeStyles(defaultStyles$3, styles2);
2388
2396
  const modalBoxRef = hooks.useRef();
2389
2397
  const onClick = hooks.useCallback((event) => {
2390
2398
  if (!modalBoxRef.current.contains(event.target)) {
@@ -2409,13 +2417,13 @@
2409
2417
  return compat.createPortal(jsxRuntime.jsx(d, {
2410
2418
  in: visible,
2411
2419
  duration: 300,
2412
- classNames: styles$6,
2420
+ classNames: styles2,
2413
2421
  children: jsxRuntime.jsx("div", {
2414
- className: [styles$6.transitionContainer, blurBackground && styles$6.blur, visible && styles$6.visible].join(" "),
2422
+ className: [styles2.transitionContainer, blurBackground && styles2.blur, visible && styles2.visible].join(" "),
2415
2423
  onClick,
2416
2424
  children: jsxRuntime.jsx("div", {
2417
2425
  ref: modalBoxRef,
2418
- class: styles$6.modalBox,
2426
+ class: styles2.modalBox,
2419
2427
  children
2420
2428
  })
2421
2429
  })
@@ -5919,7 +5927,7 @@
5919
5927
  if (event.type === "wheel" && !event[this._zoomBypassKey]) {
5920
5928
  return filterEvent(true);
5921
5929
  }
5922
- if ("targetTouches" in event) {
5930
+ if ("targetTouches" in event && this.collaborativeGesturesEnabled) {
5923
5931
  if (event.targetTouches.length < 2) {
5924
5932
  return false;
5925
5933
  }
@@ -5938,6 +5946,8 @@
5938
5946
  this._viewport.addEventListener("touchmove", (event) => {
5939
5947
  if (event.targetTouches.length < 2) {
5940
5948
  this._filterEventCallback(true);
5949
+ } else {
5950
+ event.stopImmediatePropagation();
5941
5951
  }
5942
5952
  });
5943
5953
  }
@@ -6271,6 +6281,7 @@
6271
6281
  const mobileHelpText = "Use two fingers to zoom";
6272
6282
  const Map$1 = compat.forwardRef(({
6273
6283
  config,
6284
+ inModalState = false,
6274
6285
  onLoad,
6275
6286
  children
6276
6287
  }, ref) => {
@@ -6286,6 +6297,7 @@
6286
6297
  view: new View(config.view),
6287
6298
  target: targetRef.current
6288
6299
  });
6300
+ map2.collaborativeGesturesEnabled = !inModalState;
6289
6301
  map2.addLayers(layers);
6290
6302
  setMap(map2);
6291
6303
  if (ref)
@@ -6324,6 +6336,11 @@
6324
6336
  map.setLayers(layers);
6325
6337
  }
6326
6338
  }, [map, layers]);
6339
+ hooks.useEffect(() => {
6340
+ if (!map)
6341
+ return;
6342
+ map.collaborativeGesturesEnabled = !inModalState;
6343
+ }, [inModalState]);
6327
6344
  return jsxRuntime.jsx("figure", {
6328
6345
  ref: targetRef,
6329
6346
  className: styles$3.mapContainer,
@@ -6464,11 +6481,11 @@
6464
6481
  } = this.style;
6465
6482
  if (stroke) {
6466
6483
  context.lineWidth = stroke.width * pixelRatio / transform.k;
6467
- context.strokeStyle = stroke.color;
6484
+ context.strokeStyle = stroke.getRgba();
6468
6485
  context.stroke();
6469
6486
  }
6470
6487
  if (fill) {
6471
- context.fillStyle = fill.color;
6488
+ context.fillStyle = fill.getRgba();
6472
6489
  context.fill();
6473
6490
  }
6474
6491
  }
@@ -6601,15 +6618,63 @@
6601
6618
  this.text = options == null ? void 0 : options.text;
6602
6619
  }
6603
6620
  }
6621
+ function memoise(fn) {
6622
+ let called = false;
6623
+ let lastResult;
6624
+ let lastArgs;
6625
+ let lastThis;
6626
+ return function() {
6627
+ const nextArgs = Array.prototype.slice.call(arguments);
6628
+ if (!called || this !== lastThis || !arrayEquals(nextArgs, lastArgs)) {
6629
+ called = true;
6630
+ lastThis = this;
6631
+ lastArgs = nextArgs;
6632
+ lastResult = fn.apply(this, arguments);
6633
+ }
6634
+ return lastResult;
6635
+ };
6636
+ }
6637
+ function toRgba(color2, opacity = 1) {
6638
+ color2 = color2.replace(/\s+/g, "").toLowerCase();
6639
+ if (color2.startsWith("#")) {
6640
+ color2 = color2.replace(/^#/, "");
6641
+ if (color2.length === 3) {
6642
+ color2 = color2.split("").map((char) => char + char).join("");
6643
+ }
6644
+ let r = parseInt(color2.substring(0, 2), 16);
6645
+ let g = parseInt(color2.substring(2, 4), 16);
6646
+ let b = parseInt(color2.substring(4, 6), 16);
6647
+ return `rgba(${r}, ${g}, ${b}, ${opacity})`;
6648
+ }
6649
+ let rgbaMatch = color2.match(/^rgba?\((\d+),(\d+),(\d+)(?:,(\d+(\.\d+)?))?\)$/);
6650
+ if (rgbaMatch) {
6651
+ let r = parseInt(rgbaMatch[1], 10);
6652
+ let g = parseInt(rgbaMatch[2], 10);
6653
+ let b = parseInt(rgbaMatch[3], 10);
6654
+ let a = rgbaMatch[4] !== void 0 ? parseFloat(rgbaMatch[4]) : opacity;
6655
+ return `rgba(${r}, ${g}, ${b}, ${a})`;
6656
+ }
6657
+ throw new Error("Unsupported color format");
6658
+ }
6604
6659
  class Stroke {
6605
6660
  constructor(options) {
6606
6661
  this.color = (options == null ? void 0 : options.color) || "#121212";
6607
6662
  this.width = (options == null ? void 0 : options.width) || 0.5;
6663
+ this.opacity = (options == null ? void 0 : options.opacity) || 1;
6664
+ this._getRgba = memoise(toRgba);
6665
+ }
6666
+ getRgba() {
6667
+ return this._getRgba(this.color, this.opacity);
6608
6668
  }
6609
6669
  }
6610
6670
  class Fill {
6611
6671
  constructor(options) {
6612
6672
  this.color = (options == null ? void 0 : options.color) || "#CCC";
6673
+ this.opacity = (options == null ? void 0 : options.opacity) || 1;
6674
+ this._getRgba = memoise(toRgba);
6675
+ }
6676
+ getRgba() {
6677
+ return this._getRgba(this.color, this.opacity);
6613
6678
  }
6614
6679
  }
6615
6680
  class Text {
@@ -7102,9 +7167,9 @@
7102
7167
  return features;
7103
7168
  };
7104
7169
  }
7105
- function interpolateStyles(firstStyle, secondStyle, interpolateColors) {
7106
- const fillInterpolator = interpolateFill(firstStyle.fill, secondStyle.fill, interpolateColors);
7107
- const strokeInterpolator = interpolateStroke(firstStyle.stroke, secondStyle.stroke, interpolateColors);
7170
+ function interpolateStyles(firstStyle, secondStyle, interpolateColors, interpolateNumbers) {
7171
+ const fillInterpolator = interpolateFill(firstStyle.fill, secondStyle.fill, interpolateColors, interpolateNumbers);
7172
+ const strokeInterpolator = interpolateStroke(firstStyle.stroke, secondStyle.stroke, interpolateColors, interpolateNumbers);
7108
7173
  return (t) => {
7109
7174
  return new Style({
7110
7175
  fill: fillInterpolator(t),
@@ -7112,25 +7177,24 @@
7112
7177
  });
7113
7178
  };
7114
7179
  }
7115
- function interpolateFill(fillA, fillB, interpolateColors) {
7116
- const colorInterpolator = interpolateColors((fillA == null ? void 0 : fillA.color) || "transparent", (fillB == null ? void 0 : fillB.color) || "transparent");
7180
+ function interpolateFill(fillA, fillB, interpolateColors, interpolateNumbers) {
7181
+ const colorInterpolator = interpolateColors((fillA == null ? void 0 : fillA.color) ?? "transparent", (fillB == null ? void 0 : fillB.color) ?? "transparent");
7182
+ const opacityInterpolator = interpolateNumbers((fillA == null ? void 0 : fillA.opacity) ?? 1, (fillB == null ? void 0 : fillB.opacity) ?? 1);
7117
7183
  return (t) => {
7118
7184
  return new Fill({
7119
- color: colorInterpolator(t)
7185
+ color: colorInterpolator(t),
7186
+ opacity: opacityInterpolator(t)
7120
7187
  });
7121
7188
  };
7122
7189
  }
7123
- function interpolateStroke(strokeA, strokeB, interpolateColors) {
7124
- const colorInterpolator = interpolateColors((strokeA == null ? void 0 : strokeA.color) || "transparent", (strokeB == null ? void 0 : strokeB.color) || "transparent");
7125
- const widthInterpolator = (t) => {
7126
- const widthA = (strokeA == null ? void 0 : strokeA.width) || 0;
7127
- const widthB = (strokeB == null ? void 0 : strokeB.width) || 0;
7128
- const diff = widthB - widthA;
7129
- return widthA + diff * t;
7130
- };
7190
+ function interpolateStroke(strokeA, strokeB, interpolateColors, interpolateNumbers) {
7191
+ const colorInterpolator = interpolateColors((strokeA == null ? void 0 : strokeA.color) ?? "transparent", (strokeB == null ? void 0 : strokeB.color) ?? "transparent");
7192
+ const opacityInterpolator = interpolateNumbers((strokeA == null ? void 0 : strokeA.opacity) ?? 1, (strokeB == null ? void 0 : strokeB.opacity) ?? 1);
7193
+ const widthInterpolator = interpolateNumbers((strokeA == null ? void 0 : strokeA.width) ?? 1, (strokeB == null ? void 0 : strokeB.width) ?? 1);
7131
7194
  return (t) => {
7132
7195
  return new Stroke({
7133
7196
  color: colorInterpolator(t),
7197
+ opacity: opacityInterpolator(t),
7134
7198
  width: widthInterpolator(t)
7135
7199
  });
7136
7200
  };
@@ -7196,22 +7260,6 @@
7196
7260
  });
7197
7261
  }
7198
7262
  }
7199
- function memoise(fn) {
7200
- let called = false;
7201
- let lastResult;
7202
- let lastArgs;
7203
- let lastThis;
7204
- return function() {
7205
- const nextArgs = Array.prototype.slice.call(arguments);
7206
- if (!called || this !== lastThis || !arrayEquals(nextArgs, lastArgs)) {
7207
- called = true;
7208
- lastThis = this;
7209
- lastArgs = nextArgs;
7210
- lastResult = fn.apply(this, arguments);
7211
- }
7212
- return lastResult;
7213
- };
7214
- }
7215
7263
  class LineString {
7216
7264
  constructor({
7217
7265
  type = "LineString",