@semcore/d3-chart 2.8.6 → 2.8.8
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/CHANGELOG.md +12 -0
- package/lib/cjs/Area.js +10 -10
- package/lib/cjs/Axis.js +14 -14
- package/lib/cjs/Bar.js +9 -9
- package/lib/cjs/Bubble.js +11 -11
- package/lib/cjs/Donut.js +143 -156
- package/lib/cjs/Donut.js.map +1 -1
- package/lib/cjs/Dots.js +10 -10
- package/lib/cjs/HorizontalBar.js +9 -9
- package/lib/cjs/Hover.js +4 -4
- package/lib/cjs/Line.js +9 -9
- package/lib/cjs/Plot.js +4 -4
- package/lib/cjs/RadialTree.js +48 -62
- package/lib/cjs/RadialTree.js.map +1 -1
- package/lib/cjs/ReferenceLine.js +10 -10
- package/lib/cjs/ScatterPlot.js +8 -8
- package/lib/cjs/Tooltip.js +8 -8
- package/lib/cjs/Venn.js +8 -8
- package/lib/cjs/a11y/PlotA11yModule.js +3 -3
- package/lib/cjs/a11y/PlotA11yView.js +4 -4
- package/lib/cjs/a11y/locale.js +17 -1
- package/lib/cjs/a11y/locale.js.map +1 -1
- package/lib/es6/Area.js +10 -10
- package/lib/es6/Axis.js +14 -14
- package/lib/es6/Bar.js +9 -9
- package/lib/es6/Bubble.js +11 -11
- package/lib/es6/Donut.js +145 -156
- package/lib/es6/Donut.js.map +1 -1
- package/lib/es6/Dots.js +10 -10
- package/lib/es6/HorizontalBar.js +9 -9
- package/lib/es6/Hover.js +4 -4
- package/lib/es6/Line.js +9 -9
- package/lib/es6/Plot.js +4 -4
- package/lib/es6/RadialTree.js +48 -62
- package/lib/es6/RadialTree.js.map +1 -1
- package/lib/es6/ReferenceLine.js +10 -10
- package/lib/es6/ScatterPlot.js +8 -8
- package/lib/es6/Tooltip.js +8 -8
- package/lib/es6/Venn.js +8 -8
- package/lib/es6/a11y/PlotA11yModule.js +3 -3
- package/lib/es6/a11y/PlotA11yView.js +4 -4
- package/lib/es6/a11y/locale.js +17 -1
- package/lib/es6/a11y/locale.js.map +1 -1
- package/package.json +1 -1
package/lib/es6/Tooltip.js
CHANGED
|
@@ -34,17 +34,17 @@ var style = (
|
|
|
34
34
|
/*__reshadow_css_start__*/
|
|
35
35
|
_sstyled.insert(
|
|
36
36
|
/*__inner_css_start__*/
|
|
37
|
-
".
|
|
37
|
+
".___STooltip_1qorh_gg_{font-size:var(--intergalactic-fs-100,12px);line-height:var(--intergalactic-lh-100,133%);position:relative;background-color:var(--intergalactic-bg-primary-neutral,#fff);border-radius:var(--intergalactic-rounded-medium,6px);border:1px solid var(--intergalactic-border-secondary,#e0e1e9);box-sizing:border-box;box-shadow:var(--intergalactic-box-shadow-popper,0 1px 12px 0 rgba(25,27,35,.15));padding:var(--intergalactic-spacing-3x,12px)}.___STitle_1qorh_gg_{color:var(--intergalactic-text-secondary,#6c6e79);margin-bottom:var(--intergalactic-spacing-2x,8px)}.___SDotGroup_1qorh_gg_{display:flex;align-items:center}.___SDot_1qorh_gg_{width:8px;height:8px;border-radius:50%;margin-right:var(--intergalactic-spacing-2x,8px);background:var(--intergalactic-icon-secondary-info,#2bb3ff)}.___SDot_1qorh_gg_.__color_1qorh_gg_{background:var(--color_1qorh)}"
|
|
38
38
|
/*__inner_css_end__*/
|
|
39
|
-
, "
|
|
39
|
+
, "1qorh_gg_")
|
|
40
40
|
/*__reshadow_css_end__*/
|
|
41
41
|
, {
|
|
42
|
-
"__STooltip": "
|
|
43
|
-
"__STitle": "
|
|
44
|
-
"__SDotGroup": "
|
|
45
|
-
"__SDot": "
|
|
46
|
-
"_color": "
|
|
47
|
-
"--color": "--
|
|
42
|
+
"__STooltip": "___STooltip_1qorh_gg_",
|
|
43
|
+
"__STitle": "___STitle_1qorh_gg_",
|
|
44
|
+
"__SDotGroup": "___SDotGroup_1qorh_gg_",
|
|
45
|
+
"__SDot": "___SDot_1qorh_gg_",
|
|
46
|
+
"_color": "__color_1qorh_gg_",
|
|
47
|
+
"--color": "--color_1qorh"
|
|
48
48
|
});
|
|
49
49
|
|
|
50
50
|
var TooltipRoot = /*#__PURE__*/function (_Component) {
|
package/lib/es6/Venn.js
CHANGED
|
@@ -26,17 +26,17 @@ var style = (
|
|
|
26
26
|
/*__reshadow_css_start__*/
|
|
27
27
|
_sstyled.insert(
|
|
28
28
|
/*__inner_css_start__*/
|
|
29
|
-
".
|
|
29
|
+
".___SCircle_j9h4u_gg_{fill:var(--intergalactic-chart-palette-order-2,#59ddaa);stroke:var(--intergalactic-chart-grid-border,#fff);stroke-width:2px;fill-opacity:.5;transition-property:cx,cy;transition-duration:var(--duration_j9h4u);transition-timing-function:ease-in-out}@media (hover: hover){.___SCircle_j9h4u_gg_:hover{fill-opacity:.7}}.___SCircle_j9h4u_gg_.__color_j9h4u_gg_{fill:var(--color_j9h4u)}.___SCircle_j9h4u_gg_.__transparent_j9h4u_gg_{opacity:.3}.___SIntersection_j9h4u_gg_{stroke:var(--intergalactic-chart-grid-border,#fff);stroke-width:2px;fill-opacity:0}@media (hover: hover){.___SIntersection_j9h4u_gg_:hover{fill-opacity:.1}}.___SIntersection_j9h4u_gg_.__transparent_j9h4u_gg_{opacity:.3}"
|
|
30
30
|
/*__inner_css_end__*/
|
|
31
|
-
, "
|
|
31
|
+
, "j9h4u_gg_")
|
|
32
32
|
/*__reshadow_css_end__*/
|
|
33
33
|
, {
|
|
34
|
-
"__SCircle": "
|
|
35
|
-
"--duration": "--
|
|
36
|
-
"_color": "
|
|
37
|
-
"--color": "--
|
|
38
|
-
"_transparent": "
|
|
39
|
-
"__SIntersection": "
|
|
34
|
+
"__SCircle": "___SCircle_j9h4u_gg_",
|
|
35
|
+
"--duration": "--duration_j9h4u",
|
|
36
|
+
"_color": "__color_j9h4u_gg_",
|
|
37
|
+
"--color": "--color_j9h4u",
|
|
38
|
+
"_transparent": "__transparent_j9h4u_gg_",
|
|
39
|
+
"__SIntersection": "___SIntersection_j9h4u_gg_"
|
|
40
40
|
});
|
|
41
41
|
|
|
42
42
|
var VennRoot = /*#__PURE__*/function (_Component) {
|
|
@@ -20,12 +20,12 @@ var styles = (
|
|
|
20
20
|
/*__reshadow_css_start__*/
|
|
21
21
|
_sstyled.insert(
|
|
22
22
|
/*__inner_css_start__*/
|
|
23
|
-
".
|
|
23
|
+
".___SPlotA11yModule_13n03_gg_{-webkit-user-select:none;-moz-user-select:none;user-select:none;pointer-events:none;opacity:0}.___SPlotA11yModule_13n03_gg_:focus{-webkit-user-select:all;-moz-user-select:all;user-select:all;pointer-events:all;opacity:1}"
|
|
24
24
|
/*__inner_css_end__*/
|
|
25
|
-
, "
|
|
25
|
+
, "13n03_gg_")
|
|
26
26
|
/*__reshadow_css_end__*/
|
|
27
27
|
, {
|
|
28
|
-
"__SPlotA11yModule": "
|
|
28
|
+
"__SPlotA11yModule": "___SPlotA11yModule_13n03_gg_"
|
|
29
29
|
});
|
|
30
30
|
import { Context as I18nContext, useI18n } from '@semcore/utils/lib/enhances/WithI18n';
|
|
31
31
|
import { Box } from '@semcore/flex-box';
|
|
@@ -27,13 +27,13 @@ var styles = (
|
|
|
27
27
|
/*__reshadow_css_start__*/
|
|
28
28
|
_sstyled.insert(
|
|
29
29
|
/*__inner_css_start__*/
|
|
30
|
-
".
|
|
30
|
+
".___SPlotA11yView_dd596_gg_{-webkit-user-select:none;-moz-user-select:none;user-select:none;pointer-events:none;opacity:0;background-color:var(--intergalactic-bg-primary-neutral,#fff);color:var(--intergalactic-text-primary,#191b23);border:3px solid var(--intergalactic-border-primary,#c4c7cf);font-size:var(--intergalactic-fs-50,10px);padding:2px;width:200px;height:200px;max-width:80%;max-height:80%;overflow:auto}.___SPlotA11yView_dd596_gg_:focus,.___SPlotA11yView_dd596_gg_.__focus-within_dd596_gg_{-webkit-user-select:all;-moz-user-select:all;user-select:all;pointer-events:all;opacity:1;z-index:var(--intergalactic-z-index-overlay,500);position:relative;display:block}.___SPlotA11yView_dd596_gg_:focus,.___SPlotA11yView_dd596_gg_:focus-within{-webkit-user-select:all;-moz-user-select:all;user-select:all;pointer-events:all;opacity:1;z-index:var(--intergalactic-z-index-overlay,500);position:relative;display:block}.___SPlotA11yView_dd596_gg_ a{cursor:pointer;text-decoration:underline;margin-bottom:var(--intergalactic-spacing-2x,8px);display:block}.___SPlotA11yView_dd596_gg_ table,.___SPlotA11yView_dd596_gg_ td,.___SPlotA11yView_dd596_gg_ th{border:1px solid var(--intergalactic-border-primary,#c4c7cf)}"
|
|
31
31
|
/*__inner_css_end__*/
|
|
32
|
-
, "
|
|
32
|
+
, "dd596_gg_")
|
|
33
33
|
/*__reshadow_css_end__*/
|
|
34
34
|
, {
|
|
35
|
-
"__SPlotA11yView": "
|
|
36
|
-
"_focus-within": "__focus-
|
|
35
|
+
"__SPlotA11yView": "___SPlotA11yView_dd596_gg_",
|
|
36
|
+
"_focus-within": "__focus-within_dd596_gg_"
|
|
37
37
|
});
|
|
38
38
|
import { Box } from '@semcore/flex-box';
|
|
39
39
|
import { useAsyncI18nMessages } from '@semcore/utils/lib/enhances/i18nEnhance';
|
package/lib/es6/a11y/locale.js
CHANGED
|
@@ -9,7 +9,7 @@ export var normalizeLocale = function normalizeLocale(providedLocale) {
|
|
|
9
9
|
translationNames[_locale.toLowerCase()] = _locale;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
providedLocale = (_ref = (_providedLocale = providedLocale) !== null && _providedLocale !== void 0 ? _providedLocale : globalThis === null || globalThis === void 0 ? void 0 : (_globalThis$navigator = globalThis.navigator) === null || _globalThis$navigator === void 0 ? void 0 : _globalThis$navigator.language) !== null && _ref !== void 0 ? _ref : 'en';
|
|
12
|
+
providedLocale = (_ref = (_providedLocale = providedLocale) !== null && _providedLocale !== void 0 ? _providedLocale : isAvailableLocale(globalThis === null || globalThis === void 0 ? void 0 : (_globalThis$navigator = globalThis.navigator) === null || _globalThis$navigator === void 0 ? void 0 : _globalThis$navigator.language, translations)) !== null && _ref !== void 0 ? _ref : 'en';
|
|
13
13
|
var locale = providedLocale.toLowerCase();
|
|
14
14
|
|
|
15
15
|
if (locale.includes('-') && !translations[locale]) {
|
|
@@ -37,4 +37,20 @@ export var normalizeLocale = function normalizeLocale(providedLocale) {
|
|
|
37
37
|
|
|
38
38
|
return locale;
|
|
39
39
|
};
|
|
40
|
+
|
|
41
|
+
var isAvailableLocale = function isAvailableLocale(locale, translations) {
|
|
42
|
+
if (typeof locale !== 'string') {
|
|
43
|
+
return undefined;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
var _locale$split3 = locale.split('-'),
|
|
47
|
+
_locale$split4 = _slicedToArray(_locale$split3, 1),
|
|
48
|
+
localeBase = _locale$split4[0];
|
|
49
|
+
|
|
50
|
+
if (!translations[localeBase]) {
|
|
51
|
+
return undefined;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
return localeBase;
|
|
55
|
+
};
|
|
40
56
|
//# sourceMappingURL=locale.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"locale.js","names":["normalizeLocale","providedLocale","translations","translationNames","locale","toLowerCase","globalThis","navigator","language","includes","split","localeBase","availableLocales","Object","keys","join","process","env","NODE_ENV","console","error"],"sources":["../../../src/a11y/locale.ts"],"sourcesContent":["export const normalizeLocale = (\n providedLocale: string,\n translations: { [locale: string]: {} } = {},\n) => {\n const translationNames: { [lowercasedName: string]: string } = {};\n for (const locale in translations) {\n translationNames[locale.toLowerCase()] = locale;\n }\n providedLocale
|
|
1
|
+
{"version":3,"file":"locale.js","names":["normalizeLocale","providedLocale","translations","translationNames","locale","toLowerCase","isAvailableLocale","globalThis","navigator","language","includes","split","localeBase","availableLocales","Object","keys","join","process","env","NODE_ENV","console","error","undefined"],"sources":["../../../src/a11y/locale.ts"],"sourcesContent":["export const normalizeLocale = (\n providedLocale: string,\n translations: { [locale: string]: {} } = {},\n) => {\n const translationNames: { [lowercasedName: string]: string } = {};\n for (const locale in translations) {\n translationNames[locale.toLowerCase()] = locale;\n }\n providedLocale =\n providedLocale ?? isAvailableLocale(globalThis?.navigator?.language, translations) ?? 'en';\n let locale = providedLocale.toLowerCase();\n if (locale.includes('-') && !translations[locale]) {\n const [localeBase] = locale.split('-');\n if (translations[localeBase]) {\n locale = localeBase;\n }\n }\n locale = translationNames[locale] ? translationNames[locale] : locale;\n if (!translations[locale]) {\n const availableLocales = Object.keys(translations).join(', ');\n if (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line no-console\n console.error(\n `[Intergalactic @semcore/d3-charts a11y module]: No locale \"${providedLocale}\" available. Available locales: ${availableLocales}`,\n );\n }\n return null;\n }\n return locale;\n};\n\nconst isAvailableLocale = (locale: string, translations: { [locale: string]: {} }) => {\n if (typeof locale !== 'string') {\n return undefined;\n }\n const [localeBase] = locale.split('-');\n if (!translations[localeBase]) {\n return undefined;\n }\n return localeBase;\n};\n"],"mappings":";AAAA,OAAO,IAAMA,eAAe,GAAG,SAAlBA,eAAkB,CAC7BC,cAD6B,EAG1B;EAAA;;EAAA,IADHC,YACG,uEADsC,EACtC;EACH,IAAMC,gBAAsD,GAAG,EAA/D;;EACA,KAAK,IAAMC,OAAX,IAAqBF,YAArB,EAAmC;IACjCC,gBAAgB,CAACC,OAAM,CAACC,WAAP,EAAD,CAAhB,GAAyCD,OAAzC;EACD;;EACDH,cAAc,8BACZA,cADY,6DACMK,iBAAiB,CAACC,UAAD,aAACA,UAAD,gDAACA,UAAU,CAAEC,SAAb,0DAAC,sBAAuBC,QAAxB,EAAkCP,YAAlC,CADvB,uCAC0E,IADxF;EAEA,IAAIE,MAAM,GAAGH,cAAc,CAACI,WAAf,EAAb;;EACA,IAAID,MAAM,CAACM,QAAP,CAAgB,GAAhB,KAAwB,CAACR,YAAY,CAACE,MAAD,CAAzC,EAAmD;IACjD,oBAAqBA,MAAM,CAACO,KAAP,CAAa,GAAb,CAArB;IAAA;IAAA,IAAOC,UAAP;;IACA,IAAIV,YAAY,CAACU,UAAD,CAAhB,EAA8B;MAC5BR,MAAM,GAAGQ,UAAT;IACD;EACF;;EACDR,MAAM,GAAGD,gBAAgB,CAACC,MAAD,CAAhB,GAA2BD,gBAAgB,CAACC,MAAD,CAA3C,GAAsDA,MAA/D;;EACA,IAAI,CAACF,YAAY,CAACE,MAAD,CAAjB,EAA2B;IACzB,IAAMS,gBAAgB,GAAGC,MAAM,CAACC,IAAP,CAAYb,YAAZ,EAA0Bc,IAA1B,CAA+B,IAA/B,CAAzB;;IACA,IAAIC,OAAO,CAACC,GAAR,CAAYC,QAAZ,KAAyB,YAA7B,EAA2C;MACzC;MACAC,OAAO,CAACC,KAAR,uEACgEpB,cADhE,8CACiHY,gBADjH;IAGD;;IACD,OAAO,IAAP;EACD;;EACD,OAAOT,MAAP;AACD,CA7BM;;AA+BP,IAAME,iBAAiB,GAAG,SAApBA,iBAAoB,CAACF,MAAD,EAAiBF,YAAjB,EAA4D;EACpF,IAAI,OAAOE,MAAP,KAAkB,QAAtB,EAAgC;IAC9B,OAAOkB,SAAP;EACD;;EACD,qBAAqBlB,MAAM,CAACO,KAAP,CAAa,GAAb,CAArB;EAAA;EAAA,IAAOC,UAAP;;EACA,IAAI,CAACV,YAAY,CAACU,UAAD,CAAjB,EAA+B;IAC7B,OAAOU,SAAP;EACD;;EACD,OAAOV,UAAP;AACD,CATD"}
|