@semcore/d3-chart 2.3.0-1 → 2.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (76) hide show
  1. package/CHANGELOG.md +31 -1
  2. package/lib/cjs/Area.js +9 -9
  3. package/lib/cjs/Axis.js +14 -14
  4. package/lib/cjs/Bar.js +8 -8
  5. package/lib/cjs/Bubble.js +10 -10
  6. package/lib/cjs/Donut.js +7 -7
  7. package/lib/cjs/Dots.js +9 -9
  8. package/lib/cjs/GroupBar.js +6 -6
  9. package/lib/cjs/HorizontalBar.js +8 -8
  10. package/lib/cjs/Hover.js +4 -4
  11. package/lib/cjs/Line.js +8 -8
  12. package/lib/cjs/Plot.js +4 -4
  13. package/lib/cjs/RadialTree.js +11 -11
  14. package/lib/cjs/ReferenceLine.js +10 -10
  15. package/lib/cjs/ResponsiveContainer.js +1 -0
  16. package/lib/cjs/ResponsiveContainer.js.map +1 -1
  17. package/lib/cjs/ScatterPlot.js +7 -7
  18. package/lib/cjs/StackBar.js +6 -6
  19. package/lib/cjs/StackedArea.js +7 -7
  20. package/lib/cjs/Tooltip.js +8 -8
  21. package/lib/cjs/Venn.js +7 -7
  22. package/lib/cjs/a11y/PlotA11yModule.js +18 -6
  23. package/lib/cjs/a11y/PlotA11yModule.js.map +1 -1
  24. package/lib/cjs/a11y/PlotA11yView.js +7 -5
  25. package/lib/cjs/a11y/PlotA11yView.js.map +1 -1
  26. package/lib/cjs/a11y/insights.js.map +1 -1
  27. package/lib/cjs/a11y/locale.js +6 -2
  28. package/lib/cjs/a11y/locale.js.map +1 -1
  29. package/lib/es6/Area.js +9 -9
  30. package/lib/es6/Axis.js +14 -14
  31. package/lib/es6/Bar.js +8 -8
  32. package/lib/es6/Bubble.js +10 -10
  33. package/lib/es6/Donut.js +7 -7
  34. package/lib/es6/Dots.js +9 -9
  35. package/lib/es6/GroupBar.js +6 -6
  36. package/lib/es6/HorizontalBar.js +8 -8
  37. package/lib/es6/Hover.js +4 -4
  38. package/lib/es6/Line.js +8 -8
  39. package/lib/es6/Plot.js +4 -4
  40. package/lib/es6/RadialTree.js +11 -11
  41. package/lib/es6/ReferenceLine.js +10 -10
  42. package/lib/es6/ResponsiveContainer.js +1 -0
  43. package/lib/es6/ResponsiveContainer.js.map +1 -1
  44. package/lib/es6/ScatterPlot.js +7 -7
  45. package/lib/es6/StackBar.js +6 -6
  46. package/lib/es6/StackedArea.js +7 -7
  47. package/lib/es6/Tooltip.js +8 -8
  48. package/lib/es6/Venn.js +7 -7
  49. package/lib/es6/a11y/PlotA11yModule.js +14 -6
  50. package/lib/es6/a11y/PlotA11yModule.js.map +1 -1
  51. package/lib/es6/a11y/PlotA11yView.js +6 -5
  52. package/lib/es6/a11y/PlotA11yView.js.map +1 -1
  53. package/lib/es6/a11y/insights.js.map +1 -1
  54. package/lib/es6/a11y/locale.js +6 -2
  55. package/lib/es6/a11y/locale.js.map +1 -1
  56. package/lib/types/a11y/hints.d.ts +2 -23
  57. package/lib/types/a11y/locale.d.ts +1 -1
  58. package/lib/types/a11y/serialize.d.ts +3 -3
  59. package/lib/types/a11y/summarize.d.ts +1 -1
  60. package/lib/types/utils.d.ts +4 -4
  61. package/package.json +2 -2
  62. package/lib/cjs/a11y/datasets/charts-a11y.js +0 -591
  63. package/lib/cjs/a11y/datasets/charts-a11y.js.map +0 -1
  64. package/lib/cjs/a11y/datasets/gold.json +0 -7961
  65. package/lib/cjs/a11y/datasets/imdb.json +0 -10002
  66. package/lib/cjs/a11y/datasets/readme.md +0 -5
  67. package/lib/cjs/a11y/datasets/stores.json +0 -6274
  68. package/lib/cjs/a11y/datasets/titanic.json +0 -5436
  69. package/lib/es6/a11y/datasets/charts-a11y.js +0 -590
  70. package/lib/es6/a11y/datasets/charts-a11y.js.map +0 -1
  71. package/lib/es6/a11y/datasets/gold.json +0 -7961
  72. package/lib/es6/a11y/datasets/imdb.json +0 -10002
  73. package/lib/es6/a11y/datasets/readme.md +0 -5
  74. package/lib/es6/a11y/datasets/stores.json +0 -6274
  75. package/lib/es6/a11y/datasets/titanic.json +0 -5436
  76. package/lib/types/a11y/datasets/charts-a11y.d.ts +0 -0
package/lib/es6/Bar.js CHANGED
@@ -24,17 +24,17 @@ var style = (
24
24
  /*__reshadow_css_start__*/
25
25
  _sstyled.insert(
26
26
  /*__inner_css_start__*/
27
- ".___SBar_fcz4o_gg_{fill:#2bb3ff;transition-property:height,width,y;transition-duration:var(--duration_fcz4o);transition-timing-function:ease-in-out}.___SBar_fcz4o_gg_.__color_fcz4o_gg_{fill:var(--color_fcz4o)}.___SBar_fcz4o_gg_.__hide_fcz4o_gg_{display:none}.___SBackground_fcz4o_gg_{fill:#c4c7cf}"
27
+ ".___SBar_19nw3_gg_{fill:#2bb3ff;transition-property:height,width,y;transition-duration:var(--duration_19nw3);transition-timing-function:ease-in-out}.___SBar_19nw3_gg_.__color_19nw3_gg_{fill:var(--color_19nw3)}.___SBar_19nw3_gg_.__hide_19nw3_gg_{display:none}.___SBackground_19nw3_gg_{fill:#c4c7cf}"
28
28
  /*__inner_css_end__*/
29
- , "fcz4o_gg_")
29
+ , "19nw3_gg_")
30
30
  /*__reshadow_css_end__*/
31
31
  , {
32
- "__SBar": "___SBar_fcz4o_gg_",
33
- "--duration": "--duration_fcz4o",
34
- "_color": "__color_fcz4o_gg_",
35
- "--color": "--color_fcz4o",
36
- "_hide": "__hide_fcz4o_gg_",
37
- "__SBackground": "___SBackground_fcz4o_gg_"
32
+ "__SBar": "___SBar_19nw3_gg_",
33
+ "--duration": "--duration_19nw3",
34
+ "_color": "__color_19nw3_gg_",
35
+ "--color": "--color_19nw3",
36
+ "_hide": "__hide_19nw3_gg_",
37
+ "__SBackground": "___SBackground_19nw3_gg_"
38
38
  });
39
39
 
40
40
  var BarRoot = /*#__PURE__*/function (_Component) {
package/lib/es6/Bubble.js CHANGED
@@ -30,19 +30,19 @@ var style = (
30
30
  /*__reshadow_css_start__*/
31
31
  _sstyled.insert(
32
32
  /*__inner_css_start__*/
33
- ".___SBubble_frelz_gg_{fill:#2bb3ff;stroke:#fff;stroke-width:2px;transition-property:cx,cy;transition-duration:var(--duration_frelz);transition-timing-function:ease-in-out;opacity:.5}.___SBubble_frelz_gg_:hover{opacity:.8}.___SBubble_frelz_gg_.__color_frelz_gg_{fill:var(--color_frelz)}.___SCenter_frelz_gg_{text-anchor:middle;font-size:11px;stroke:#2bb3ff}.___SCenter_frelz_gg_.__color_frelz_gg_{stroke:var(--color_frelz)}.___SLabel_frelz_gg_{fill:#2bb3ff}.___SLabel_frelz_gg_._position_right_frelz_gg_{text-anchor:end}.___SLabel_frelz_gg_._position_left_frelz_gg_{text-anchor:start}.___SLabel_frelz_gg_.__color_frelz_gg_{fill:var(--color_frelz)}"
33
+ ".___SBubble_11l7c_gg_{fill:#2bb3ff;stroke:#fff;stroke-width:2px;transition-property:cx,cy;transition-duration:var(--duration_11l7c);transition-timing-function:ease-in-out;opacity:.5}.___SBubble_11l7c_gg_:hover{opacity:.8}.___SBubble_11l7c_gg_.__color_11l7c_gg_{fill:var(--color_11l7c)}.___SCenter_11l7c_gg_{text-anchor:middle;font-size:11px;stroke:#2bb3ff}.___SCenter_11l7c_gg_.__color_11l7c_gg_{stroke:var(--color_11l7c)}.___SLabel_11l7c_gg_{fill:#2bb3ff}.___SLabel_11l7c_gg_._position_right_11l7c_gg_{text-anchor:end}.___SLabel_11l7c_gg_._position_left_11l7c_gg_{text-anchor:start}.___SLabel_11l7c_gg_.__color_11l7c_gg_{fill:var(--color_11l7c)}"
34
34
  /*__inner_css_end__*/
35
- , "frelz_gg_")
35
+ , "11l7c_gg_")
36
36
  /*__reshadow_css_end__*/
37
37
  , {
38
- "__SBubble": "___SBubble_frelz_gg_",
39
- "--duration": "--duration_frelz",
40
- "_color": "__color_frelz_gg_",
41
- "--color": "--color_frelz",
42
- "__SCenter": "___SCenter_frelz_gg_",
43
- "__SLabel": "___SLabel_frelz_gg_",
44
- "_position_right": "_position_right_frelz_gg_",
45
- "_position_left": "_position_left_frelz_gg_"
38
+ "__SBubble": "___SBubble_11l7c_gg_",
39
+ "--duration": "--duration_11l7c",
40
+ "_color": "__color_11l7c_gg_",
41
+ "--color": "--color_11l7c",
42
+ "__SCenter": "___SCenter_11l7c_gg_",
43
+ "__SLabel": "___SLabel_11l7c_gg_",
44
+ "_position_right": "_position_right_11l7c_gg_",
45
+ "_position_left": "_position_left_11l7c_gg_"
46
46
  });
47
47
  import ClipPath from './ClipPath';
48
48
  import { scaleSqrt } from 'd3-scale';
package/lib/es6/Donut.js CHANGED
@@ -34,16 +34,16 @@ var style = (
34
34
  /*__reshadow_css_start__*/
35
35
  _sstyled.insert(
36
36
  /*__inner_css_start__*/
37
- ".___SPie_1l9zn_gg_{stroke:#fff;fill:#2bb3ff}.___SPie_1l9zn_gg_.__color_1l9zn_gg_{fill:var(--color_1l9zn)}.___SEmptyData_1l9zn_gg_{fill:#e0e1e9}.___SEmptyData_1l9zn_gg_.__color_1l9zn_gg_{fill:var(--color_1l9zn)}.___SLabel_1l9zn_gg_{text-anchor:middle;vertical-anchor:middle}"
37
+ ".___SPie_15pda_gg_{stroke:#fff;fill:#2bb3ff}.___SPie_15pda_gg_.__color_15pda_gg_{fill:var(--color_15pda)}.___SEmptyData_15pda_gg_{fill:#e0e1e9}.___SEmptyData_15pda_gg_.__color_15pda_gg_{fill:var(--color_15pda)}.___SLabel_15pda_gg_{text-anchor:middle;vertical-anchor:middle}"
38
38
  /*__inner_css_end__*/
39
- , "1l9zn_gg_")
39
+ , "15pda_gg_")
40
40
  /*__reshadow_css_end__*/
41
41
  , {
42
- "__SPie": "___SPie_1l9zn_gg_",
43
- "_color": "__color_1l9zn_gg_",
44
- "--color": "--color_1l9zn",
45
- "__SEmptyData": "___SEmptyData_1l9zn_gg_",
46
- "__SLabel": "___SLabel_1l9zn_gg_"
42
+ "__SPie": "___SPie_15pda_gg_",
43
+ "_color": "__color_15pda_gg_",
44
+ "--color": "--color_15pda",
45
+ "__SEmptyData": "___SEmptyData_15pda_gg_",
46
+ "__SLabel": "___SLabel_15pda_gg_"
47
47
  });
48
48
  var DEFAULT_INSTANCE = Symbol('DEFAULT_INSTANCE');
49
49
 
package/lib/es6/Dots.js CHANGED
@@ -12,18 +12,18 @@ var style = (
12
12
  /*__reshadow_css_start__*/
13
13
  _sstyled.insert(
14
14
  /*__inner_css_start__*/
15
- ".___SDots_6grui_gg_ .___SDot_6grui_gg_{transition-duration:var(--duration_6grui)}.___SDot_6grui_gg_{stroke-width:2px;stroke:#fff;r:6px;fill:#2bb3ff;transition-property:cx,cy;transition-timing-function:ease-in-out}.___SDot_6grui_gg_.__hide_6grui_gg_{display:none}.___SDot_6grui_gg_.__active_6grui_gg_{r:8px}.___SDot_6grui_gg_.__color_6grui_gg_{fill:var(--color_6grui)}"
15
+ ".___SDots_cm5sn_gg_ .___SDot_cm5sn_gg_{transition-duration:var(--duration_cm5sn)}.___SDot_cm5sn_gg_{stroke-width:2px;stroke:#fff;r:6px;fill:#2bb3ff;transition-property:cx,cy;transition-timing-function:ease-in-out}.___SDot_cm5sn_gg_.__hide_cm5sn_gg_{display:none}.___SDot_cm5sn_gg_.__active_cm5sn_gg_{r:8px}.___SDot_cm5sn_gg_.__color_cm5sn_gg_{fill:var(--color_cm5sn)}"
16
16
  /*__inner_css_end__*/
17
- , "6grui_gg_")
17
+ , "cm5sn_gg_")
18
18
  /*__reshadow_css_end__*/
19
19
  , {
20
- "__SDots": "___SDots_6grui_gg_",
21
- "__SDot": "___SDot_6grui_gg_",
22
- "--duration": "--duration_6grui",
23
- "_hide": "__hide_6grui_gg_",
24
- "_active": "__active_6grui_gg_",
25
- "_color": "__color_6grui_gg_",
26
- "--color": "--color_6grui"
20
+ "__SDots": "___SDots_cm5sn_gg_",
21
+ "__SDot": "___SDot_cm5sn_gg_",
22
+ "--duration": "--duration_cm5sn",
23
+ "_hide": "__hide_cm5sn_gg_",
24
+ "_active": "__active_cm5sn_gg_",
25
+ "_color": "__color_cm5sn_gg_",
26
+ "--color": "--color_cm5sn"
27
27
  });
28
28
  var EXCLUDE_PROPS = ['data', 'scale', 'value', 'display'];
29
29
 
@@ -22,15 +22,15 @@ var _ref = (
22
22
  /*__reshadow_css_start__*/
23
23
  __css__(
24
24
  /*__inner_css_start__*/
25
- ".___SBar_124y6_gg_{fill:#2bb3ff;transition-property:height,width,y;transition-duration:var(--duration);transition-timing-function:ease-in-out}.___SBar_124y6_gg_.__color_124y6_gg_{fill:var(--color)}.___SBar_124y6_gg_.__hide_124y6_gg_{display:none}.___SBackground_124y6_gg_{fill:#c4c7cf}"
25
+ ".___SBar_f03r7_gg_{fill:#2bb3ff;transition-property:height,width,y;transition-duration:var(--duration);transition-timing-function:ease-in-out}.___SBar_f03r7_gg_.__color_f03r7_gg_{fill:var(--color)}.___SBar_f03r7_gg_.__hide_f03r7_gg_{display:none}.___SBackground_f03r7_gg_{fill:#c4c7cf}"
26
26
  /*__inner_css_end__*/
27
- , "qcoeyq_gg_")
27
+ , "jel8ua_gg_")
28
28
  /*__reshadow_css_end__*/
29
29
  , {
30
- "__SBar": "___SBar_124y6_gg_",
31
- "_color": "__color_124y6_gg_",
32
- "_hide": "__hide_124y6_gg_",
33
- "__SBackground": "___SBackground_124y6_gg_"
30
+ "__SBar": "___SBar_f03r7_gg_",
31
+ "_color": "__color_f03r7_gg_",
32
+ "_hide": "__hide_f03r7_gg_",
33
+ "__SBackground": "___SBackground_f03r7_gg_"
34
34
  }),
35
35
  style = _extends({}, _ref);
36
36
 
@@ -23,17 +23,17 @@ var style = (
23
23
  /*__reshadow_css_start__*/
24
24
  _sstyled.insert(
25
25
  /*__inner_css_start__*/
26
- ".___SBar_fcz4o_gg_{fill:#2bb3ff;transition-property:height,width,y;transition-duration:var(--duration_fcz4o);transition-timing-function:ease-in-out}.___SBar_fcz4o_gg_.__color_fcz4o_gg_{fill:var(--color_fcz4o)}.___SBar_fcz4o_gg_.__hide_fcz4o_gg_{display:none}.___SBackground_fcz4o_gg_{fill:#c4c7cf}"
26
+ ".___SBar_19nw3_gg_{fill:#2bb3ff;transition-property:height,width,y;transition-duration:var(--duration_19nw3);transition-timing-function:ease-in-out}.___SBar_19nw3_gg_.__color_19nw3_gg_{fill:var(--color_19nw3)}.___SBar_19nw3_gg_.__hide_19nw3_gg_{display:none}.___SBackground_19nw3_gg_{fill:#c4c7cf}"
27
27
  /*__inner_css_end__*/
28
- , "fcz4o_gg_")
28
+ , "19nw3_gg_")
29
29
  /*__reshadow_css_end__*/
30
30
  , {
31
- "__SBar": "___SBar_fcz4o_gg_",
32
- "--duration": "--duration_fcz4o",
33
- "_color": "__color_fcz4o_gg_",
34
- "--color": "--color_fcz4o",
35
- "_hide": "__hide_fcz4o_gg_",
36
- "__SBackground": "___SBackground_fcz4o_gg_"
31
+ "__SBar": "___SBar_19nw3_gg_",
32
+ "--duration": "--duration_19nw3",
33
+ "_color": "__color_19nw3_gg_",
34
+ "--color": "--color_19nw3",
35
+ "_hide": "__hide_19nw3_gg_",
36
+ "__SBackground": "___SBackground_19nw3_gg_"
37
37
  });
38
38
 
39
39
  var HorizontalBarRoot = /*#__PURE__*/function (_Component) {
package/lib/es6/Hover.js CHANGED
@@ -24,13 +24,13 @@ var style = (
24
24
  /*__reshadow_css_start__*/
25
25
  _sstyled.insert(
26
26
  /*__inner_css_start__*/
27
- ".___SHoverLine_cr7zz_gg_{stroke:#a9abb6}.___SHoverRect_cr7zz_gg_{fill:rgba(196,199,207,.3)}"
27
+ ".___SHoverLine_120bn_gg_{stroke:#a9abb6}.___SHoverRect_120bn_gg_{fill:rgba(196,199,207,.3)}"
28
28
  /*__inner_css_end__*/
29
- , "cr7zz_gg_")
29
+ , "120bn_gg_")
30
30
  /*__reshadow_css_end__*/
31
31
  , {
32
- "__SHoverLine": "___SHoverLine_cr7zz_gg_",
33
- "__SHoverRect": "___SHoverRect_cr7zz_gg_"
32
+ "__SHoverLine": "___SHoverLine_120bn_gg_",
33
+ "__SHoverRect": "___SHoverRect_120bn_gg_"
34
34
  });
35
35
 
36
36
  var Hover = /*#__PURE__*/function (_Component) {
package/lib/es6/Line.js CHANGED
@@ -25,17 +25,17 @@ var style = (
25
25
  /*__reshadow_css_start__*/
26
26
  _sstyled.insert(
27
27
  /*__inner_css_start__*/
28
- ".___SLine_s3dwn_gg_{fill:transparent;stroke-width:3;stroke:#2bb3ff;transition-property:d;transition-duration:var(--duration_s3dwn);transition-timing-function:ease-in-out}.___SLine_s3dwn_gg_.__color_s3dwn_gg_{stroke:var(--color_s3dwn)}.___SLine_s3dwn_gg_.__hide_s3dwn_gg_{display:none}.___SNull_s3dwn_gg_{fill:transparent;stroke:#c4c7cf;stroke-dasharray:4}.___SNull_s3dwn_gg_.__hide_s3dwn_gg_{display:none}"
28
+ ".___SLine_1sa7n_gg_{fill:transparent;stroke-width:3;stroke:#2bb3ff;transition-property:d;transition-duration:var(--duration_1sa7n);transition-timing-function:ease-in-out}.___SLine_1sa7n_gg_.__color_1sa7n_gg_{stroke:var(--color_1sa7n)}.___SLine_1sa7n_gg_.__hide_1sa7n_gg_{display:none}.___SNull_1sa7n_gg_{fill:transparent;stroke:#c4c7cf;stroke-dasharray:4}.___SNull_1sa7n_gg_.__hide_1sa7n_gg_{display:none}"
29
29
  /*__inner_css_end__*/
30
- , "s3dwn_gg_")
30
+ , "1sa7n_gg_")
31
31
  /*__reshadow_css_end__*/
32
32
  , {
33
- "__SLine": "___SLine_s3dwn_gg_",
34
- "--duration": "--duration_s3dwn",
35
- "_color": "__color_s3dwn_gg_",
36
- "--color": "--color_s3dwn",
37
- "_hide": "__hide_s3dwn_gg_",
38
- "__SNull": "___SNull_s3dwn_gg_"
33
+ "__SLine": "___SLine_1sa7n_gg_",
34
+ "--duration": "--duration_1sa7n",
35
+ "_color": "__color_1sa7n_gg_",
36
+ "--color": "--color_1sa7n",
37
+ "_hide": "__hide_1sa7n_gg_",
38
+ "__SNull": "___SNull_1sa7n_gg_"
39
39
  });
40
40
 
41
41
  var LineRoot = /*#__PURE__*/function (_Component) {
package/lib/es6/Plot.js CHANGED
@@ -28,13 +28,13 @@ var style = (
28
28
  /*__reshadow_css_start__*/
29
29
  _sstyled.insert(
30
30
  /*__inner_css_start__*/
31
- ".___SPlot_14czz_gg_{overflow:hidden}.___SPlot_14czz_gg_:active,.___SPlot_14czz_gg_:focus{outline:0;text-decoration:none}.___SPlot_14czz_gg_.__keyboardFocused_14czz_gg_{border:1px solid #008ff8;box-shadow:0 0 0 3px rgba(0, 143, 248, 0.2)}"
31
+ ".___SPlot_jzcej_gg_{overflow:hidden}.___SPlot_jzcej_gg_:active,.___SPlot_jzcej_gg_:focus{outline:0;text-decoration:none}.___SPlot_jzcej_gg_.__keyboardFocused_jzcej_gg_{border:1px solid #008ff8;box-shadow:0 0 0 3px rgba(0, 143, 248, 0.2)}"
32
32
  /*__inner_css_end__*/
33
- , "14czz_gg_")
33
+ , "jzcej_gg_")
34
34
  /*__reshadow_css_end__*/
35
35
  , {
36
- "__SPlot": "___SPlot_14czz_gg_",
37
- "_keyboardFocused": "__keyboardFocused_14czz_gg_"
36
+ "__SPlot": "___SPlot_jzcej_gg_",
37
+ "_keyboardFocused": "__keyboardFocused_jzcej_gg_"
38
38
  });
39
39
  import { PlotA11yModule } from './a11y/PlotA11yModule';
40
40
  import { makeDataHintsHandlers, makeDataHintsContainer } from './a11y/hints';
@@ -31,20 +31,20 @@ var style = (
31
31
  /*__reshadow_css_start__*/
32
32
  _sstyled.insert(
33
33
  /*__inner_css_start__*/
34
- ".___SRadian_f0avw_gg_{cursor:pointer;fill:#008ff8}.___SLine_f0avw_gg_{stroke:#008ff8}.___SLine_f0avw_gg_.__color_f0avw_gg_{stroke:var(--color_f0avw)}.___SCap_f0avw_gg_{transition:r .1s}.___SLabel_f0avw_gg_{fill:var(--color_f0avw);cursor:var(--text-cursor_f0avw)}.___SRadian_f0avw_gg_:hover .___SLabel_f0avw_gg_{fill:var(--color-hovered_f0avw)}@media (prefers-reduced-motion){.___SLineCap_f0avw_gg_{transition:none}}"
34
+ ".___SRadian_102fp_gg_{cursor:pointer;fill:#008ff8}.___SLine_102fp_gg_{stroke:#008ff8}.___SLine_102fp_gg_.__color_102fp_gg_{stroke:var(--color_102fp)}.___SCap_102fp_gg_{transition:r .1s}.___SLabel_102fp_gg_{fill:var(--color_102fp);cursor:var(--text-cursor_102fp)}.___SRadian_102fp_gg_:hover .___SLabel_102fp_gg_{fill:var(--color-hovered_102fp)}@media (prefers-reduced-motion){.___SLineCap_102fp_gg_{transition:none}}"
35
35
  /*__inner_css_end__*/
36
- , "f0avw_gg_")
36
+ , "102fp_gg_")
37
37
  /*__reshadow_css_end__*/
38
38
  , {
39
- "__SRadian": "___SRadian_f0avw_gg_",
40
- "__SLine": "___SLine_f0avw_gg_",
41
- "_color": "__color_f0avw_gg_",
42
- "--color": "--color_f0avw",
43
- "__SCap": "___SCap_f0avw_gg_",
44
- "__SLabel": "___SLabel_f0avw_gg_",
45
- "--text-cursor": "--text-cursor_f0avw",
46
- "--color-hovered": "--color-hovered_f0avw",
47
- "__SLineCap": "___SLineCap_f0avw_gg_"
39
+ "__SRadian": "___SRadian_102fp_gg_",
40
+ "__SLine": "___SLine_102fp_gg_",
41
+ "_color": "__color_102fp_gg_",
42
+ "--color": "--color_102fp",
43
+ "__SCap": "___SCap_102fp_gg_",
44
+ "__SLabel": "___SLabel_102fp_gg_",
45
+ "--text-cursor": "--text-cursor_102fp",
46
+ "--color-hovered": "--color-hovered_102fp",
47
+ "__SLineCap": "___SLineCap_102fp_gg_"
48
48
  });
49
49
  import { shade } from '@semcore/utils/lib/color';
50
50
  import { measureText } from './utils';
@@ -25,19 +25,19 @@ var style = (
25
25
  /*__reshadow_css_start__*/
26
26
  _sstyled.insert(
27
27
  /*__inner_css_start__*/
28
- ".___SReferenceLine_jmd9c_gg_{fill:none;stroke:#a9abb6}.___STitle_jmd9c_gg_{font-size:12px;fill:#6c6e79;transform-origin:var(--transform-origin_jmd9c)}.___STitle_jmd9c_gg_._position_top_jmd9c_gg_{text-anchor:middle}.___STitle_jmd9c_gg_._position_bottom_jmd9c_gg_{text-anchor:middle;alignment-baseline:hanging}.___STitle_jmd9c_gg_._position_right_jmd9c_gg_{transform:rotate(-90deg);alignment-baseline:middle;text-anchor:middle}.___STitle_jmd9c_gg_._position_left_jmd9c_gg_{transform:rotate(-90deg);text-anchor:middle;alignment-baseline:middle}.___SBackground_jmd9c_gg_{fill:rgba(196,199,207,.2)}"
28
+ ".___SReferenceLine_pz315_gg_{fill:none;stroke:#a9abb6}.___STitle_pz315_gg_{font-size:12px;fill:#6c6e79;transform-origin:var(--transform-origin_pz315)}.___STitle_pz315_gg_._position_top_pz315_gg_{text-anchor:middle}.___STitle_pz315_gg_._position_bottom_pz315_gg_{text-anchor:middle;alignment-baseline:hanging}.___STitle_pz315_gg_._position_right_pz315_gg_{transform:rotate(-90deg);alignment-baseline:middle;text-anchor:middle}.___STitle_pz315_gg_._position_left_pz315_gg_{transform:rotate(-90deg);text-anchor:middle;alignment-baseline:middle}.___SBackground_pz315_gg_{fill:rgba(196,199,207,.2)}"
29
29
  /*__inner_css_end__*/
30
- , "jmd9c_gg_")
30
+ , "pz315_gg_")
31
31
  /*__reshadow_css_end__*/
32
32
  , {
33
- "__SReferenceLine": "___SReferenceLine_jmd9c_gg_",
34
- "__STitle": "___STitle_jmd9c_gg_",
35
- "--transform-origin": "--transform-origin_jmd9c",
36
- "_position_top": "_position_top_jmd9c_gg_",
37
- "_position_bottom": "_position_bottom_jmd9c_gg_",
38
- "_position_right": "_position_right_jmd9c_gg_",
39
- "_position_left": "_position_left_jmd9c_gg_",
40
- "__SBackground": "___SBackground_jmd9c_gg_"
33
+ "__SReferenceLine": "___SReferenceLine_pz315_gg_",
34
+ "__STitle": "___STitle_pz315_gg_",
35
+ "--transform-origin": "--transform-origin_pz315",
36
+ "_position_top": "_position_top_pz315_gg_",
37
+ "_position_bottom": "_position_bottom_pz315_gg_",
38
+ "_position_right": "_position_right_pz315_gg_",
39
+ "_position_left": "_position_left_pz315_gg_",
40
+ "__SBackground": "___SBackground_pz315_gg_"
41
41
  });
42
42
  var MAP_ORIENTATION = {
43
43
  left: 'vertical',
@@ -44,6 +44,7 @@ var ResponsiveContainerRoot = /*#__PURE__*/function (_Component) {
44
44
  var _this$asProps = _this.asProps,
45
45
  Children = _this$asProps.Children,
46
46
  aspect = _this$asProps.aspect;
47
+ if (!_this.$container) return;
47
48
  var _this$$container = _this.$container,
48
49
  width = _this$$container.clientWidth,
49
50
  height = _this$$container.clientHeight;
@@ -1 +1 @@
1
- {"version":3,"file":"ResponsiveContainer.js","names":["React","ResizeObserver","createComponent","Component","Root","sstyled","Box","trottle","fire","getOriginChildren","ResponsiveContainerRoot","props","createRef","entries","asProps","Children","aspect","$container","width","clientWidth","height","clientHeight","style","window","getComputedStyle","minHeight","Number","parseInt","getPropertyValue","maxHeight","size","forceUpdate","observer","handleResize","containerRef","current","observe","disconnect","SResponsiveContainer","styles","ResponsiveContainer"],"sources":["../../src/ResponsiveContainer.jsx"],"sourcesContent":["import React from 'react';\nimport ResizeObserver from 'resize-observer-polyfill';\n\nimport createComponent, { Component, Root, sstyled } from '@semcore/core';\nimport { Box } from '@semcore/flex-box';\nimport trottle from '@semcore/utils/lib/rafTrottle';\nimport fire from '@semcore/utils/lib/fire';\nimport getOriginChildren from '@semcore/utils/lib/getOriginChildren';\n\nclass ResponsiveContainerRoot extends Component {\n static displayName = 'ResponsiveContainer';\n\n containerRef = React.createRef();\n size = [0, 0];\n\n constructor(props) {\n super(props);\n this.observer = new ResizeObserver(this.handleResize);\n }\n\n get $container() {\n return this.containerRef.current;\n }\n\n handleResize = trottle((entries) => {\n const { Children, aspect } = this.asProps;\n let { clientWidth: width, clientHeight: height } = this.$container;\n\n if (aspect) {\n const style = window.getComputedStyle(this.$container);\n const minHeight = Number.parseInt(style.getPropertyValue('min-height'));\n const maxHeight = Number.parseInt(style.getPropertyValue('max-height'));\n height = width * aspect;\n\n if (height < minHeight) {\n height = minHeight;\n }\n if (height > maxHeight) {\n height = maxHeight;\n }\n }\n\n if (this.size[0] === width && this.size[1] === height) return;\n\n this.size = [width, height];\n\n fire(this, 'onResize', this.size, entries);\n\n if (typeof getOriginChildren(Children) === 'function') {\n this.forceUpdate();\n }\n });\n\n setContext() {\n const [width, height] = this.size;\n return {\n width,\n height,\n };\n }\n\n componentDidMount() {\n if (this.$container) {\n // TODO: may be we can increase perfomance here? (by lsroman)\n this.observer.observe(this.$container);\n }\n }\n\n // TODO component did update ref?\n\n componentWillUnmount() {\n this.observer.disconnect();\n }\n\n render() {\n const SResponsiveContainer = Root;\n const { styles } = this.asProps;\n return sstyled(styles)(<SResponsiveContainer render={Box} ref={this.containerRef} />);\n }\n}\n\nconst ResponsiveContainer = createComponent(ResponsiveContainerRoot);\n\nexport default ResponsiveContainer;\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,cAAP,MAA2B,0BAA3B;AAEA,OAAOC,eAAP,IAA0BC,SAA1B,EAAqCC,IAArC,EAA2CC,OAA3C,QAA0D,eAA1D;AACA,SAASC,GAAT,QAAoB,mBAApB;AACA,OAAOC,OAAP,MAAoB,+BAApB;AACA,OAAOC,IAAP,MAAiB,yBAAjB;AACA,OAAOC,iBAAP,MAA8B,sCAA9B;;IAEMC,uB;;;;;EAMJ,iCAAYC,KAAZ,EAAmB;IAAA;;IAAA;;IACjB,0BAAMA,KAAN;;IADiB,4EAHJX,KAAK,CAACY,SAAN,EAGI;;IAAA,uDAFZ,CAAC,CAAD,EAAI,CAAJ,CAEY;;IAAA,+DASJL,OAAO,CAAC,UAACM,OAAD,EAAa;MAClC,oBAA6B,MAAKC,OAAlC;MAAA,IAAQC,QAAR,iBAAQA,QAAR;MAAA,IAAkBC,MAAlB,iBAAkBA,MAAlB;MACA,uBAAmD,MAAKC,UAAxD;MAAA,IAAmBC,KAAnB,oBAAMC,WAAN;MAAA,IAAwCC,MAAxC,oBAA0BC,YAA1B;;MAEA,IAAIL,MAAJ,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3B;MACD;IACF,C,CAED;;;;WAEA,gCAAuB;MACrB,KAAKe,QAAL,CAAcK,UAAd;IACD;;;WAED,kBAAS;MAAA;MAAA;;MACP,IAAMC,oBAAoB,GAE2BhC,GAFrD;MACA,IAAQiC,MAAR,GAAmB,KAAKzB,OAAxB,CAAQyB,MAAR;MACA,eAAOlC,OAAO,CAACkC,MAAD,CAAd,eAAuB,oBAAC,oBAAD;QAAA,OAAwC,KAAKL;MAA7C,WAAvB;IACD;;;;EArEmC/B,S;;gBAAhCO,uB,iBACiB,qB;;AAuEvB,IAAM8B,mBAAmB,GAAGtC,eAAe,CAACQ,uBAAD,CAA3C;AAEA,eAAe8B,mBAAf"}
1
+ {"version":3,"file":"ResponsiveContainer.js","names":["React","ResizeObserver","createComponent","Component","Root","sstyled","Box","trottle","fire","getOriginChildren","ResponsiveContainerRoot","props","createRef","entries","asProps","Children","aspect","$container","width","clientWidth","height","clientHeight","style","window","getComputedStyle","minHeight","Number","parseInt","getPropertyValue","maxHeight","size","forceUpdate","observer","handleResize","containerRef","current","observe","disconnect","SResponsiveContainer","styles","ResponsiveContainer"],"sources":["../../src/ResponsiveContainer.jsx"],"sourcesContent":["import React from 'react';\nimport ResizeObserver from 'resize-observer-polyfill';\n\nimport createComponent, { Component, Root, sstyled } from '@semcore/core';\nimport { Box } from '@semcore/flex-box';\nimport trottle from '@semcore/utils/lib/rafTrottle';\nimport fire from '@semcore/utils/lib/fire';\nimport getOriginChildren from '@semcore/utils/lib/getOriginChildren';\n\nclass ResponsiveContainerRoot extends Component {\n static displayName = 'ResponsiveContainer';\n\n containerRef = React.createRef();\n size = [0, 0];\n\n constructor(props) {\n super(props);\n this.observer = new ResizeObserver(this.handleResize);\n }\n\n get $container() {\n return this.containerRef.current;\n }\n\n handleResize = trottle((entries) => {\n const { Children, aspect } = this.asProps;\n\n if (!this.$container) return;\n\n let { clientWidth: width, clientHeight: height } = this.$container;\n\n if (aspect) {\n const style = window.getComputedStyle(this.$container);\n const minHeight = Number.parseInt(style.getPropertyValue('min-height'));\n const maxHeight = Number.parseInt(style.getPropertyValue('max-height'));\n height = width * aspect;\n\n if (height < minHeight) {\n height = minHeight;\n }\n if (height > maxHeight) {\n height = maxHeight;\n }\n }\n\n if (this.size[0] === width && this.size[1] === height) return;\n\n this.size = [width, height];\n\n fire(this, 'onResize', this.size, entries);\n\n if (typeof getOriginChildren(Children) === 'function') {\n this.forceUpdate();\n }\n });\n\n setContext() {\n const [width, height] = this.size;\n return {\n width,\n height,\n };\n }\n\n componentDidMount() {\n if (this.$container) {\n // TODO: may be we can increase perfomance here? (by lsroman)\n this.observer.observe(this.$container);\n }\n }\n\n // TODO component did update ref?\n\n componentWillUnmount() {\n this.observer.disconnect();\n }\n\n render() {\n const SResponsiveContainer = Root;\n const { styles } = this.asProps;\n return sstyled(styles)(<SResponsiveContainer render={Box} ref={this.containerRef} />);\n }\n}\n\nconst ResponsiveContainer = createComponent(ResponsiveContainerRoot);\n\nexport default ResponsiveContainer;\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,cAAP,MAA2B,0BAA3B;AAEA,OAAOC,eAAP,IAA0BC,SAA1B,EAAqCC,IAArC,EAA2CC,OAA3C,QAA0D,eAA1D;AACA,SAASC,GAAT,QAAoB,mBAApB;AACA,OAAOC,OAAP,MAAoB,+BAApB;AACA,OAAOC,IAAP,MAAiB,yBAAjB;AACA,OAAOC,iBAAP,MAA8B,sCAA9B;;IAEMC,uB;;;;;EAMJ,iCAAYC,KAAZ,EAAmB;IAAA;;IAAA;;IACjB,0BAAMA,KAAN;;IADiB,4EAHJX,KAAK,CAACY,SAAN,EAGI;;IAAA,uDAFZ,CAAC,CAAD,EAAI,CAAJ,CAEY;;IAAA,+DASJL,OAAO,CAAC,UAACM,OAAD,EAAa;MAClC,oBAA6B,MAAKC,OAAlC;MAAA,IAAQC,QAAR,iBAAQA,QAAR;MAAA,IAAkBC,MAAlB,iBAAkBA,MAA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OAAO;QACLF,KAAK,EAALA,KADK;QAELE,MAAM,EAANA;MAFK,CAAP;IAID;;;WAED,6BAAoB;MAClB,IAAI,KAAKH,UAAT,EAAqB;QACnB;QACA,KAAKe,QAAL,CAAcI,OAAd,CAAsB,KAAKnB,UAA3B;MACD;IACF,C,CAED;;;;WAEA,gCAAuB;MACrB,KAAKe,QAAL,CAAcK,UAAd;IACD;;;WAED,kBAAS;MAAA;MAAA;;MACP,IAAMC,oBAAoB,GAE2BhC,GAFrD;MACA,IAAQiC,MAAR,GAAmB,KAAKzB,OAAxB,CAAQyB,MAAR;MACA,eAAOlC,OAAO,CAACkC,MAAD,CAAd,eAAuB,oBAAC,oBAAD;QAAA,OAAwC,KAAKL;MAA7C,WAAvB;IACD;;;;EAxEmC/B,S;;gBAAhCO,uB,iBACiB,qB;;AA0EvB,IAAM8B,mBAAmB,GAAGtC,eAAe,CAACQ,uBAAD,CAA3C;AAEA,eAAe8B,mBAAf"}
@@ -29,16 +29,16 @@ var style = (
29
29
  /*__reshadow_css_start__*/
30
30
  _sstyled.insert(
31
31
  /*__inner_css_start__*/
32
- ".___SScatterPlot_v1s0r_gg_{fill:#2bb3ff;transition-property:cx,cy;transition-duration:var(--duration_v1s0r);transition-timing-function:ease-in-out;opacity:.5}.___SScatterPlot_v1s0r_gg_:hover{opacity:.8}.___SScatterPlot_v1s0r_gg_.__color_v1s0r_gg_{fill:var(--color_v1s0r)}.___SValue_v1s0r_gg_{text-anchor:middle;font-size:10px;stroke:#008ff8}.___SValue_v1s0r_gg_.__color_v1s0r_gg_{stroke:var(--color_v1s0r)}"
32
+ ".___SScatterPlot_vf7hu_gg_{fill:#2bb3ff;transition-property:cx,cy;transition-duration:var(--duration_vf7hu);transition-timing-function:ease-in-out;opacity:.5}.___SScatterPlot_vf7hu_gg_:hover{opacity:.8}.___SScatterPlot_vf7hu_gg_.__color_vf7hu_gg_{fill:var(--color_vf7hu)}.___SValue_vf7hu_gg_{text-anchor:middle;font-size:10px;stroke:#008ff8}.___SValue_vf7hu_gg_.__color_vf7hu_gg_{stroke:var(--color_vf7hu)}"
33
33
  /*__inner_css_end__*/
34
- , "v1s0r_gg_")
34
+ , "vf7hu_gg_")
35
35
  /*__reshadow_css_end__*/
36
36
  , {
37
- "__SScatterPlot": "___SScatterPlot_v1s0r_gg_",
38
- "--duration": "--duration_v1s0r",
39
- "_color": "__color_v1s0r_gg_",
40
- "--color": "--color_v1s0r",
41
- "__SValue": "___SValue_v1s0r_gg_"
37
+ "__SScatterPlot": "___SScatterPlot_vf7hu_gg_",
38
+ "--duration": "--duration_vf7hu",
39
+ "_color": "__color_vf7hu_gg_",
40
+ "--color": "--color_vf7hu",
41
+ "__SValue": "___SValue_vf7hu_gg_"
42
42
  });
43
43
  import ClipPath from './ClipPath';
44
44
 
@@ -27,15 +27,15 @@ var _ref = (
27
27
  /*__reshadow_css_start__*/
28
28
  __css__(
29
29
  /*__inner_css_start__*/
30
- ".___SBar_dgtls_gg_{fill:#2bb3ff;transition-property:height,width,y;transition-duration:var(--duration);transition-timing-function:ease-in-out}.___SBar_dgtls_gg_.__color_dgtls_gg_{fill:var(--color)}.___SBar_dgtls_gg_.__hide_dgtls_gg_{display:none}.___SBackground_dgtls_gg_{fill:#c4c7cf}"
30
+ ".___SBar_ns3re_gg_{fill:#2bb3ff;transition-property:height,width,y;transition-duration:var(--duration);transition-timing-function:ease-in-out}.___SBar_ns3re_gg_.__color_ns3re_gg_{fill:var(--color)}.___SBar_ns3re_gg_.__hide_ns3re_gg_{display:none}.___SBackground_ns3re_gg_{fill:#c4c7cf}"
31
31
  /*__inner_css_end__*/
32
- , "1iyvh36_gg_")
32
+ , "bmt5z6_gg_")
33
33
  /*__reshadow_css_end__*/
34
34
  , {
35
- "__SBar": "___SBar_dgtls_gg_",
36
- "_color": "__color_dgtls_gg_",
37
- "_hide": "__hide_dgtls_gg_",
38
- "__SBackground": "___SBackground_dgtls_gg_"
35
+ "__SBar": "___SBar_ns3re_gg_",
36
+ "_color": "__color_ns3re_gg_",
37
+ "_hide": "__hide_ns3re_gg_",
38
+ "__SBackground": "___SBackground_ns3re_gg_"
39
39
  }),
40
40
  style = _extends({}, _ref);
41
41
 
@@ -26,16 +26,16 @@ var _ref = (
26
26
  /*__reshadow_css_start__*/
27
27
  __css__(
28
28
  /*__inner_css_start__*/
29
- ".___SArea_3afcc_gg_{fill:#2bb3ff;fill-opacity:.2}.___SArea_3afcc_gg_.__color_3afcc_gg_{fill:var(--color)}.___SAreaLine_3afcc_gg_{stroke:#2bb3ff;stroke-width:3;fill:transparent}.___SAreaLine_3afcc_gg_.__color_3afcc_gg_{stroke:var(--color)}.___SArea_3afcc_gg_,.___SAreaLine_3afcc_gg_{transition-property:d;transition-duration:var(--duration);transition-timing-function:ease-in-out}.___SNull_3afcc_gg_{fill:transparent;stroke:#8a8e9b;stroke-dasharray:4}.___SNull_3afcc_gg_.__hide_3afcc_gg_{display:none}"
29
+ ".___SArea_gga8q_gg_{fill:#2bb3ff;fill-opacity:.2}.___SArea_gga8q_gg_.__color_gga8q_gg_{fill:var(--color)}.___SAreaLine_gga8q_gg_{stroke:#2bb3ff;stroke-width:3;fill:transparent}.___SAreaLine_gga8q_gg_.__color_gga8q_gg_{stroke:var(--color)}.___SArea_gga8q_gg_,.___SAreaLine_gga8q_gg_{transition-property:d;transition-duration:var(--duration);transition-timing-function:ease-in-out}.___SNull_gga8q_gg_{fill:transparent;stroke:#8a8e9b;stroke-dasharray:4}.___SNull_gga8q_gg_.__hide_gga8q_gg_{display:none}"
30
30
  /*__inner_css_end__*/
31
- , "mp0j3b_gg_")
31
+ , "impyjf_gg_")
32
32
  /*__reshadow_css_end__*/
33
33
  , {
34
- "__SArea": "___SArea_3afcc_gg_",
35
- "_color": "__color_3afcc_gg_",
36
- "__SAreaLine": "___SAreaLine_3afcc_gg_",
37
- "__SNull": "___SNull_3afcc_gg_",
38
- "_hide": "__hide_3afcc_gg_"
34
+ "__SArea": "___SArea_gga8q_gg_",
35
+ "_color": "__color_gga8q_gg_",
36
+ "__SAreaLine": "___SAreaLine_gga8q_gg_",
37
+ "__SNull": "___SNull_gga8q_gg_",
38
+ "_hide": "__hide_gga8q_gg_"
39
39
  }),
40
40
  style = _extends({}, _ref);
41
41
 
@@ -34,17 +34,17 @@ var style = (
34
34
  /*__reshadow_css_start__*/
35
35
  _sstyled.insert(
36
36
  /*__inner_css_start__*/
37
- ".___STooltip_c3mpf_gg_{font-size:12px;line-height:1.33;position:relative;background-color:#fff;border-radius:6px;border:1px solid #e0e1e9;box-sizing:border-box;box-shadow:0px 1px 12px 0px rgba(25, 27, 35, 0.15);padding:12px}.___STitle_c3mpf_gg_{color:#6c6e79;margin-bottom:8px}.___SDotGroup_c3mpf_gg_{display:flex;align-items:center}.___SDot_c3mpf_gg_{width:8px;height:8px;border-radius:50%;margin-right:8px;background:#2bb3ff}.___SDot_c3mpf_gg_.__color_c3mpf_gg_{background:var(--color_c3mpf)}"
37
+ ".___STooltip_18frv_gg_{font-size:12px;line-height:1.33;position:relative;background-color:#fff;border-radius:6px;border:1px solid #e0e1e9;box-sizing:border-box;box-shadow:0px 1px 12px 0px rgba(25, 27, 35, 0.15);padding:12px}.___STitle_18frv_gg_{color:#6c6e79;margin-bottom:8px}.___SDotGroup_18frv_gg_{display:flex;align-items:center}.___SDot_18frv_gg_{width:8px;height:8px;border-radius:50%;margin-right:8px;background:#2bb3ff}.___SDot_18frv_gg_.__color_18frv_gg_{background:var(--color_18frv)}"
38
38
  /*__inner_css_end__*/
39
- , "c3mpf_gg_")
39
+ , "18frv_gg_")
40
40
  /*__reshadow_css_end__*/
41
41
  , {
42
- "__STooltip": "___STooltip_c3mpf_gg_",
43
- "__STitle": "___STitle_c3mpf_gg_",
44
- "__SDotGroup": "___SDotGroup_c3mpf_gg_",
45
- "__SDot": "___SDot_c3mpf_gg_",
46
- "_color": "__color_c3mpf_gg_",
47
- "--color": "--color_c3mpf"
42
+ "__STooltip": "___STooltip_18frv_gg_",
43
+ "__STitle": "___STitle_18frv_gg_",
44
+ "__SDotGroup": "___SDotGroup_18frv_gg_",
45
+ "__SDot": "___SDot_18frv_gg_",
46
+ "_color": "__color_18frv_gg_",
47
+ "--color": "--color_18frv"
48
48
  });
49
49
 
50
50
  var TooltipRoot = /*#__PURE__*/function (_Component) {
package/lib/es6/Venn.js CHANGED
@@ -26,16 +26,16 @@ var style = (
26
26
  /*__reshadow_css_start__*/
27
27
  _sstyled.insert(
28
28
  /*__inner_css_start__*/
29
- ".___SCircle_1ny5s_gg_{fill:#59ddaa;stroke:#fff;stroke-width:2px;fill-opacity:.5;transition-property:cx,cy;transition-duration:var(--duration_1ny5s);transition-timing-function:ease-in-out}.___SCircle_1ny5s_gg_:hover{fill-opacity:.7}.___SCircle_1ny5s_gg_.__color_1ny5s_gg_{fill:var(--color_1ny5s)}.___SIntersection_1ny5s_gg_{stroke:#fff;stroke-width:2px;fill-opacity:0}.___SIntersection_1ny5s_gg_:hover{fill-opacity:.1}"
29
+ ".___SCircle_5ve8g_gg_{fill:#59ddaa;stroke:#fff;stroke-width:2px;fill-opacity:.5;transition-property:cx,cy;transition-duration:var(--duration_5ve8g);transition-timing-function:ease-in-out}.___SCircle_5ve8g_gg_:hover{fill-opacity:.7}.___SCircle_5ve8g_gg_.__color_5ve8g_gg_{fill:var(--color_5ve8g)}.___SIntersection_5ve8g_gg_{stroke:#fff;stroke-width:2px;fill-opacity:0}.___SIntersection_5ve8g_gg_:hover{fill-opacity:.1}"
30
30
  /*__inner_css_end__*/
31
- , "1ny5s_gg_")
31
+ , "5ve8g_gg_")
32
32
  /*__reshadow_css_end__*/
33
33
  , {
34
- "__SCircle": "___SCircle_1ny5s_gg_",
35
- "--duration": "--duration_1ny5s",
36
- "_color": "__color_1ny5s_gg_",
37
- "--color": "--color_1ny5s",
38
- "__SIntersection": "___SIntersection_1ny5s_gg_"
34
+ "__SCircle": "___SCircle_5ve8g_gg_",
35
+ "--duration": "--duration_5ve8g",
36
+ "_color": "__color_5ve8g_gg_",
37
+ "--color": "--color_5ve8g",
38
+ "__SIntersection": "___SIntersection_5ve8g_gg_"
39
39
  });
40
40
 
41
41
  var VennRoot = /*#__PURE__*/function (_Component) {
@@ -1,4 +1,5 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
+ import _extends from "@babel/runtime/helpers/extends";
2
3
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
3
4
  import { sstyled as _sstyled } from "@semcore/core";
4
5
  import { assignProps as _assignProps3 } from "@semcore/core";
@@ -19,20 +20,22 @@ var styles = (
19
20
  /*__reshadow_css_start__*/
20
21
  _sstyled.insert(
21
22
  /*__inner_css_start__*/
22
- ".___SPlotA11yModule_1c5bq_gg_{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;pointer-events:none;opacity:0}.___SPlotA11yModule_1c5bq_gg_:focus{-webkit-user-select:all;-moz-user-select:all;-ms-user-select:all;user-select:all;pointer-events:all;opacity:1}"
23
+ ".___SPlotA11yModule_1toaf_gg_{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;pointer-events:none;opacity:0}.___SPlotA11yModule_1toaf_gg_:focus{-webkit-user-select:all;-moz-user-select:all;-ms-user-select:all;user-select:all;pointer-events:all;opacity:1}"
23
24
  /*__inner_css_end__*/
24
- , "1c5bq_gg_")
25
+ , "1toaf_gg_")
25
26
  /*__reshadow_css_end__*/
26
27
  , {
27
- "__SPlotA11yModule": "___SPlotA11yModule_1c5bq_gg_"
28
+ "__SPlotA11yModule": "___SPlotA11yModule_1toaf_gg_"
28
29
  });
30
+ import { Context as I18nContext } from '@semcore/utils/lib/enhances/WithI18n';
31
+ import { Box } from '@semcore/flex-box';
29
32
  var globalWasFocused = false;
30
33
  var globalNavWithKeyboard = false;
31
34
  export var PlotA11yModule = function PlotA11yModule(props) {
32
35
  var _ref = arguments[0],
33
36
  _ref5;
34
37
 
35
- var SPlotA11yModule = 'div';
38
+ var SPlotA11yModule = Box;
36
39
 
37
40
  var _React$useState = React.useState(globalWasFocused),
38
41
  _React$useState2 = _slicedToArray(_React$useState, 2),
@@ -64,8 +67,11 @@ export var PlotA11yModule = function PlotA11yModule(props) {
64
67
  error = _React$useState10[0],
65
68
  setError = _React$useState10[1];
66
69
 
70
+ var contextLocale = React.useContext(I18nContext);
67
71
  var locale = React.useMemo(function () {
68
- return normalizeLocale(props.locale, translations);
72
+ var _props$locale;
73
+
74
+ return normalizeLocale((_props$locale = props.locale) !== null && _props$locale !== void 0 ? _props$locale : contextLocale, translations);
69
75
  }, [props.locale]);
70
76
  var texts = React.useMemo(function () {
71
77
  return locale ? translations[locale] : {};
@@ -131,7 +137,9 @@ export var PlotA11yModule = function PlotA11yModule(props) {
131
137
  if (plotA11yView) {
132
138
  var _ref2;
133
139
 
134
- return _ref2 = sstyled(styles), /*#__PURE__*/React.createElement(plotA11yView.Component, props);
140
+ return _ref2 = sstyled(styles), /*#__PURE__*/React.createElement(plotA11yView.Component, _extends({}, props, {
141
+ locale: locale
142
+ }));
135
143
  }
136
144
 
137
145
  if (error) {
@@ -1 +1 @@
1
- {"version":3,"file":"PlotA11yModule.js","names":["React","normalizeLocale","translations","Root","sstyled","globalWasFocused","globalNavWithKeyboard","PlotA11yModule","props","SPlotA11yModule","useState","wasFocused","setWasFocused","navWithKeyboard","setNavWithKeyboard","plotA11yView","setPlotA11yView","hadnleHiddenElementsFocus","useCallback","loading","setLoading","error","setError","locale","useMemo","texts","useEffect","focusListener","plotRef","current","addEventListener","removeEventListener","keyboardListener","event","navigationKeys","includes","key","document","body","shouldDisplayView","then","PlotA11yView","Component","console","styles","failed","disabled"],"sources":["../../../src/a11y/PlotA11yModule.tsx"],"sourcesContent":["import React from 'react';\nimport { DataStructureHints, PartialDataSummarizationConfig } from './hints';\nimport { normalizeLocale } from './locale';\nimport { translations } from './translations/module/translations';\nimport { Root, sstyled } from '@semcore/core';\nimport styles from '../style/plotA11yModule.shadow.css';\n\nlet globalWasFocused = false;\nlet globalNavWithKeyboard = false;\n\nexport type A11yViewProps = {\n id: string;\n data: Record<string, unknown>[];\n hints: DataStructureHints;\n plotLabel: string;\n locale: NavigatorLanguage['language'];\n config: PartialDataSummarizationConfig;\n // eslint-disable-next-line ssr-friendly/no-dom-globals-in-module-scope\n plotRef: React.RefObject<Element>;\n};\n\nexport const PlotA11yModule: React.FC<A11yViewProps> = (props) => {\n const SPlotA11yModule = Root;\n const [wasFocused, setWasFocused] = React.useState(globalWasFocused);\n const [navWithKeyboard, setNavWithKeyboard] = React.useState(globalNavWithKeyboard);\n const [plotA11yView, setPlotA11yView] = React.useState<{\n Component: React.FC<A11yViewProps>;\n } | null>(null);\n\n const hadnleHiddenElementsFocus = React.useCallback(() => {\n setWasFocused(true);\n setNavWithKeyboard(true);\n }, []);\n\n const [loading, setLoading] = React.useState(false);\n const [error, setError] = React.useState<Error | null>(null);\n\n const locale = React.useMemo(() => normalizeLocale(props.locale, translations), [props.locale]);\n const texts = React.useMemo(() => (locale ? translations[locale] : {}), [locale]);\n\n React.useEffect(() => {\n if (wasFocused) return;\n const focusListener = () => {\n globalWasFocused = true;\n setWasFocused(true);\n };\n\n props.plotRef.current?.addEventListener('focus', focusListener);\n return () => props.plotRef.current?.removeEventListener('focus', focusListener);\n }, [wasFocused, props.plotRef]);\n React.useEffect(() => {\n if (navWithKeyboard) return;\n const keyboardListener = (event: Event) => {\n const navigationKeys = [\n 'Tab',\n 'ArrowUp',\n 'ArrowLeft',\n 'ArrowDown',\n 'ArrowRight',\n 'ArrowUp',\n 'ArrowLeft',\n ];\n if ('key' in event && navigationKeys.includes((event as KeyboardEvent).key)) {\n setNavWithKeyboard(true);\n globalNavWithKeyboard = true;\n }\n };\n document.body?.addEventListener('keydown', keyboardListener);\n return () => document.body?.removeEventListener('keydown', keyboardListener);\n }, [navWithKeyboard]);\n\n const shouldDisplayView = wasFocused && navWithKeyboard;\n\n React.useEffect(() => {\n if (!shouldDisplayView) return;\n if (plotA11yView) return;\n if (loading) return;\n\n setLoading(true);\n\n import('./PlotA11yView')\n .then(({ PlotA11yView }) => {\n setPlotA11yView({ Component: PlotA11yView });\n setLoading(false);\n setError(null);\n })\n .catch((error) => {\n // eslint-disable-next-line no-console\n console.error(error);\n setError(error);\n });\n }, [plotA11yView, shouldDisplayView, loading, setLoading]);\n\n if (plotA11yView) {\n return sstyled(styles)(<plotA11yView.Component {...props} />) as React.ReactElement;\n }\n\n if (error) {\n return sstyled(styles)(\n <SPlotA11yModule render={'div'} tabIndex={0} aria-live=\"assertive\">\n {texts.failed}\n </SPlotA11yModule>,\n ) as React.ReactElement;\n }\n if (loading) {\n return sstyled(styles)(\n <SPlotA11yModule render={'div'} tabIndex={0} aria-live=\"polite\">\n {texts.loading}\n </SPlotA11yModule>,\n ) as React.ReactElement;\n }\n\n return sstyled(styles)(\n <SPlotA11yModule render={'div'} tabIndex={0} onFocus={hadnleHiddenElementsFocus}>\n {texts.disabled}\n </SPlotA11yModule>,\n ) as React.ReactElement;\n};\n"],"mappings":";;;;;;;;;;;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AAEA,SAASC,eAAT,QAAgC,UAAhC;AACA,SAASC,YAAT,QAA6B,oCAA7B;AACA,SAASC,IAAT,EAAeC,OAAf,QAA8B,eAA9B;;;;;;;;;;;;;;AAGA,IAAIC,gBAAgB,GAAG,KAAvB;AACA,IAAIC,qBAAqB,GAAG,KAA5B;AAaA,OAAO,IAAMC,cAAuC,GAAG,SAA1CA,cAA0C,CAACC,KAAD,EAAW;EAAA;EAAA;;EAChE,IAAMC,eAAe,GA2FM,KA3F3B;;EACA,sBAAoCT,KAAK,CAACU,QAAN,CAAeL,gBAAf,CAApC;EAAA;EAAA,IAAOM,UAAP;EAAA,IAAmBC,aAAnB;;EACA,uBAA8CZ,KAAK,CAACU,QAAN,CAAeJ,qBAAf,CAA9C;EAAA;EAAA,IAAOO,eAAP;EAAA,IAAwBC,kBAAxB;;EACA,uBAAwCd,KAAK,CAACU,QAAN,CAE9B,IAF8B,CAAxC;EAAA;EAAA,IAAOK,YAA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,EAkBG,CAACN,YAAD,EAAewB,iBAAf,EAAkCpB,OAAlC,EAA2CC,UAA3C,CAlBH;;EAoBA,IAAIL,YAAJ,EAAkB;IAAA;;IAChB,eAAOX,OAAO,CAACwC,MAAD,CAAd,eAAuB,oBAAC,YAAD,CAAc,SAAd,EAA4BpC,KAA5B,CAAvB;EACD;;EAED,IAAIa,KAAJ,EAAW;IAAA;;IACT,eAAOjB,OAAO,CAACwC,MAAD,CAAd,eACE,oBAAC,eAAD;MAAA,YAA0C,CAA1C;MAAA,aAAuD;IAAvD,YACGnB,KAAK,CAACoB,MADT,CADF;EAKD;;EACD,IAAI1B,OAAJ,EAAa;IAAA;;IACX,eAAOf,OAAO,CAACwC,MAAD,CAAd,eACE,oBAAC,eAAD;MAAA,YAA0C,CAA1C;MAAA,aAAuD;IAAvD,YACGnB,KAAK,CAACN,OADT,CADF;EAKD;;EAED,eAAOf,OAAO,CAACwC,MAAD,CAAd,eACE,oBAAC,eAAD;IAAA,YAA0C,CAA1C;IAAA,WAAsD3B;EAAtD,YACGQ,KAAK,CAACqB,QADT,CADF;AAKD,CAhGM"}
1
+ {"version":3,"file":"PlotA11yModule.js","names":["React","normalizeLocale","translations","Root","sstyled","Context","I18nContext","Box","globalWasFocused","globalNavWithKeyboard","PlotA11yModule","props","SPlotA11yModule","useState","wasFocused","setWasFocused","navWithKeyboard","setNavWithKeyboard","plotA11yView","setPlotA11yView","hadnleHiddenElementsFocus","useCallback","loading","setLoading","error","setError","contextLocale","useContext","locale","useMemo","texts","useEffect","focusListener","plotRef","current","addEventListener","removeEventListener","keyboardListener","event","navigationKeys","includes","key","document","body","shouldDisplayView","then","PlotA11yView","Component","console","styles","failed","disabled"],"sources":["../../../src/a11y/PlotA11yModule.tsx"],"sourcesContent":["import React from 'react';\nimport { DataStructureHints, PartialDataSummarizationConfig } from './hints';\nimport { normalizeLocale } from './locale';\nimport { translations } from './translations/module/translations';\nimport { Root, sstyled } from '@semcore/core';\nimport styles from '../style/plotA11yModule.shadow.css';\nimport { Context as I18nContext } from '@semcore/utils/lib/enhances/WithI18n';\nimport { Box } from '@semcore/flex-box';\n\nlet globalWasFocused = false;\nlet globalNavWithKeyboard = false;\n\nexport type A11yViewProps = {\n id: string;\n data: Record<string, unknown>[];\n hints: DataStructureHints;\n plotLabel: string;\n locale: NavigatorLanguage['language'];\n config: PartialDataSummarizationConfig;\n // eslint-disable-next-line ssr-friendly/no-dom-globals-in-module-scope\n plotRef: React.RefObject<Element>;\n};\n\nexport const PlotA11yModule: React.FC<A11yViewProps> = (props) => {\n const SPlotA11yModule = Root;\n const [wasFocused, setWasFocused] = React.useState(globalWasFocused);\n const [navWithKeyboard, setNavWithKeyboard] = React.useState(globalNavWithKeyboard);\n const [plotA11yView, setPlotA11yView] = React.useState<{\n Component: React.FC<A11yViewProps>;\n } | null>(null);\n\n const hadnleHiddenElementsFocus = React.useCallback(() => {\n setWasFocused(true);\n setNavWithKeyboard(true);\n }, []);\n\n const [loading, setLoading] = React.useState(false);\n const [error, setError] = React.useState<Error | null>(null);\n\n const contextLocale = React.useContext(I18nContext);\n const locale = React.useMemo(\n () => normalizeLocale(props.locale ?? contextLocale, translations),\n [props.locale],\n );\n const texts = React.useMemo(() => (locale ? translations[locale] : {}), [locale]);\n\n React.useEffect(() => {\n if (wasFocused) return;\n const focusListener = () => {\n globalWasFocused = true;\n setWasFocused(true);\n };\n\n props.plotRef.current?.addEventListener('focus', focusListener);\n return () => props.plotRef.current?.removeEventListener('focus', focusListener);\n }, [wasFocused, props.plotRef]);\n React.useEffect(() => {\n if (navWithKeyboard) return;\n const keyboardListener = (event: Event) => {\n const navigationKeys = [\n 'Tab',\n 'ArrowUp',\n 'ArrowLeft',\n 'ArrowDown',\n 'ArrowRight',\n 'ArrowUp',\n 'ArrowLeft',\n ];\n if ('key' in event && navigationKeys.includes((event as KeyboardEvent).key)) {\n setNavWithKeyboard(true);\n globalNavWithKeyboard = true;\n }\n };\n document.body?.addEventListener('keydown', keyboardListener);\n return () => document.body?.removeEventListener('keydown', keyboardListener);\n }, [navWithKeyboard]);\n\n const shouldDisplayView = wasFocused && navWithKeyboard;\n\n React.useEffect(() => {\n if (!shouldDisplayView) return;\n if (plotA11yView) return;\n if (loading) return;\n\n setLoading(true);\n\n import('./PlotA11yView')\n .then(({ PlotA11yView }) => {\n setPlotA11yView({ Component: PlotA11yView });\n setLoading(false);\n setError(null);\n })\n .catch((error) => {\n // eslint-disable-next-line no-console\n console.error(error);\n setError(error);\n });\n }, [plotA11yView, shouldDisplayView, loading, setLoading]);\n\n if (plotA11yView) {\n return sstyled(styles)(\n <plotA11yView.Component {...props} locale={locale!} />,\n ) as React.ReactElement;\n }\n\n if (error) {\n return sstyled(styles)(\n <SPlotA11yModule render={Box} tabIndex={0} aria-live=\"assertive\">\n {texts.failed}\n </SPlotA11yModule>,\n ) as React.ReactElement;\n }\n if (loading) {\n return sstyled(styles)(\n <SPlotA11yModule render={Box} tabIndex={0} aria-live=\"polite\">\n {texts.loading}\n </SPlotA11yModule>,\n ) as React.ReactElement;\n }\n\n return sstyled(styles)(\n <SPlotA11yModule render={Box} tabIndex={0} onFocus={hadnleHiddenElementsFocus}>\n {texts.disabled}\n </SPlotA11yModule>,\n ) as React.ReactElement;\n};\n"],"mappings":";;;;;;;;;;;;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AAEA,SAASC,eAAT,QAAgC,UAAhC;AACA,SAASC,YAAT,QAA6B,oCAA7B;AACA,SAASC,IAAT,EAAeC,OAAf,QAA8B,eAA9B;;;;;;;;;;;;;;AAEA,SAASC,OAAO,IAAIC,WAApB,QAAuC,sCAAvC;AACA,SAASC,GAAT,QAAoB,mBAApB;AAEA,IAAIC,gBAAgB,GAAG,KAAvB;AACA,IAAIC,qBAAqB,GAAG,KAA5B;AAaA,OAAO,IAAMC,cAAuC,GAAG,SAA1CA,cAA0C,CAACC,KAAD,EAAW;EAAA;EAAA;;EAChE,IAAMC,eAAe,GAiGML,GAjG3B;;EACA,sBAAoCP,KAAK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a;IAEbC,UAAU,CAAC,IAAD,CAAV;IAEA,OAAO,gBAAP,EACGsB,IADH,CACQ,iBAAsB;MAAA,IAAnBC,YAAmB,SAAnBA,YAAmB;MAC1B3B,eAAe,CAAC;QAAE4B,SAAS,EAAED;MAAb,CAAD,CAAf;MACAvB,UAAU,CAAC,KAAD,CAAV;MACAE,QAAQ,CAAC,IAAD,CAAR;IACD,CALH,WAMS,UAACD,KAAD,EAAW;MAChB;MACAwB,OAAO,CAACxB,KAAR,CAAcA,KAAd;MACAC,QAAQ,CAACD,KAAD,CAAR;IACD,CAVH;EAWD,CAlBD,EAkBG,CAACN,YAAD,EAAe0B,iBAAf,EAAkCtB,OAAlC,EAA2CC,UAA3C,CAlBH;;EAoBA,IAAIL,YAAJ,EAAkB;IAAA;;IAChB,eAAOd,OAAO,CAAC6C,MAAD,CAAd,eACE,oBAAC,YAAD,CAAc,SAAd,eAA4BtC,KAA5B;MAAmC,MAAM,EAAEiB;IAA3C,GADF;EAGD;;EAED,IAAIJ,KAAJ,EAAW;IAAA;;IACT,eAAOpB,OAAO,CAAC6C,MAAD,CAAd,eACE,oBAAC,eAAD;MAAA,YAAwC,CAAxC;MAAA,aAAqD;IAArD,YACGnB,KAAK,CAACoB,MADT,CADF;EAKD;;EACD,IAAI5B,OAAJ,EAAa;IAAA;;IACX,eAAOlB,OAAO,CAAC6C,MAAD,CAAd,eACE,oBAAC,eAAD;MAAA,YAAwC,CAAxC;MAAA,aAAqD;IAArD,YACGnB,KAAK,CAACR,OADT,CADF;EAKD;;EAED,eAAOlB,OAAO,CAAC6C,MAAD,CAAd,eACE,oBAAC,eAAD;IAAA,YAAwC,CAAxC;IAAA,WAAoD7B;EAApD,YACGU,KAAK,CAACqB,QADT,CADF;AAKD,CAtGM"}
@@ -27,14 +27,15 @@ var styles = (
27
27
  /*__reshadow_css_start__*/
28
28
  _sstyled.insert(
29
29
  /*__inner_css_start__*/
30
- ".___SPlotA11yView_1e44s_gg_{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;pointer-events:none;opacity:0;background-color:#fff;color:#000;border:3px solid #000;font-size:10px;padding:2px;width:200px;height:200px;max-width:80%;max-height:80%;overflow:auto}.___SPlotA11yView_1e44s_gg_:focus,.___SPlotA11yView_1e44s_gg_.__focus-within_1e44s_gg_{-webkit-user-select:all;-moz-user-select:all;-ms-user-select:all;user-select:all;pointer-events:all;opacity:1;z-index:100;position:relative;display:block}.___SPlotA11yView_1e44s_gg_:focus,.___SPlotA11yView_1e44s_gg_:focus-within{-webkit-user-select:all;-moz-user-select:all;-ms-user-select:all;user-select:all;pointer-events:all;opacity:1;z-index:100;position:relative;display:block}.___SPlotA11yView_1e44s_gg_ a{cursor:pointer;text-decoration:underline;margin-bottom:8px;display:block}.___SPlotA11yView_1e44s_gg_ table,.___SPlotA11yView_1e44s_gg_ td,.___SPlotA11yView_1e44s_gg_ th{border:1px solid #000}"
30
+ ".___SPlotA11yView_pwg9z_gg_{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;pointer-events:none;opacity:0;background-color:#fff;color:#000;border:3px solid #000;font-size:10px;padding:2px;width:200px;height:200px;max-width:80%;max-height:80%;overflow:auto}.___SPlotA11yView_pwg9z_gg_:focus,.___SPlotA11yView_pwg9z_gg_.__focus-within_pwg9z_gg_{-webkit-user-select:all;-moz-user-select:all;-ms-user-select:all;user-select:all;pointer-events:all;opacity:1;z-index:100;position:relative;display:block}.___SPlotA11yView_pwg9z_gg_:focus,.___SPlotA11yView_pwg9z_gg_:focus-within{-webkit-user-select:all;-moz-user-select:all;-ms-user-select:all;user-select:all;pointer-events:all;opacity:1;z-index:100;position:relative;display:block}.___SPlotA11yView_pwg9z_gg_ a{cursor:pointer;text-decoration:underline;margin-bottom:8px;display:block}.___SPlotA11yView_pwg9z_gg_ table,.___SPlotA11yView_pwg9z_gg_ td,.___SPlotA11yView_pwg9z_gg_ th{border:1px solid #000}"
31
31
  /*__inner_css_end__*/
32
- , "1e44s_gg_")
32
+ , "pwg9z_gg_")
33
33
  /*__reshadow_css_end__*/
34
34
  , {
35
- "__SPlotA11yView": "___SPlotA11yView_1e44s_gg_",
36
- "_focus-within": "__focus-within_1e44s_gg_"
35
+ "__SPlotA11yView": "___SPlotA11yView_pwg9z_gg_",
36
+ "_focus-within": "__focus-within_pwg9z_gg_"
37
37
  });
38
+ import { Box } from '@semcore/flex-box';
38
39
  export var PlotA11yView = function PlotA11yView(_ref3) {
39
40
  var _ref = arguments[0],
40
41
  _ref2;
@@ -46,7 +47,7 @@ export var PlotA11yView = function PlotA11yView(_ref3) {
46
47
  plotRef = _ref3.plotRef,
47
48
  providedConfig = _ref3.config,
48
49
  locale = _ref3.locale;
49
- var SPlotA11yView = "div";
50
+ var SPlotA11yView = Box;
50
51
  var intl = React.useMemo(function () {
51
52
  return getIntl(locale);
52
53
  }, [locale]);