@semcore/d3-chart 2.3.7 → 2.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -23,17 +23,17 @@ var style = (
23
23
  /*__reshadow_css_start__*/
24
24
  _sstyled.insert(
25
25
  /*__inner_css_start__*/
26
- ".___SBar_1i08o_gg_{fill:#2bb3ff;transition-property:height,width,y;transition-duration:var(--duration_1i08o);transition-timing-function:ease-in-out}.___SBar_1i08o_gg_.__color_1i08o_gg_{fill:var(--color_1i08o)}.___SBar_1i08o_gg_.__hide_1i08o_gg_{display:none}.___SBackground_1i08o_gg_{fill:#c4c7cf}"
26
+ ":root {\n\n /* DEPRECATED START\n Deprecated variables should never be used in\n components styles but preserved for backward\n compatibility if they used in projects\n like `<Badge bg=\"red\">alpha</Badge>`\n */\n /* DEPRECATED END */\n}\n\n.___SBar_smgvy_gg_ {\n fill: #2bb3ff;\n transition-property: height, width, y;\n transition-duration: var(--duration_smgvy);\n transition-timing-function: ease-in-out;\n}\n\n.___SBar_smgvy_gg_.__color_smgvy_gg_ {\n fill: var(--color_smgvy);\n}\n\n.___SBar_smgvy_gg_.__hide_smgvy_gg_ {\n display: none;\n}\n\n.___SBackground_smgvy_gg_ {\n fill: #c4c7cf;\n}\n"
27
27
  /*__inner_css_end__*/
28
- , "1i08o_gg_")
28
+ , "smgvy_gg_")
29
29
  /*__reshadow_css_end__*/
30
30
  , {
31
- "__SBar": "___SBar_1i08o_gg_",
32
- "--duration": "--duration_1i08o",
33
- "_color": "__color_1i08o_gg_",
34
- "--color": "--color_1i08o",
35
- "_hide": "__hide_1i08o_gg_",
36
- "__SBackground": "___SBackground_1i08o_gg_"
31
+ "__SBar": "___SBar_smgvy_gg_",
32
+ "--duration": "--duration_smgvy",
33
+ "_color": "__color_smgvy_gg_",
34
+ "--color": "--color_smgvy",
35
+ "_hide": "__hide_smgvy_gg_",
36
+ "__SBackground": "___SBackground_smgvy_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_33u57_gg_{stroke:#a9abb6}.___SHoverRect_33u57_gg_{fill:rgba(196,199,207,.3)}"
27
+ ":root {\n\n /* DEPRECATED START\n Deprecated variables should never be used in\n components styles but preserved for backward\n compatibility if they used in projects\n like `<Badge bg=\"red\">alpha</Badge>`\n */\n /* DEPRECATED END */\n}\n\n.___SHoverLine_1jvtk_gg_ {\n stroke: #a9abb6;\n}\n\n.___SHoverRect_1jvtk_gg_ {\n fill: rgba(196, 199, 207, 0.3);\n}\n"
28
28
  /*__inner_css_end__*/
29
- , "33u57_gg_")
29
+ , "1jvtk_gg_")
30
30
  /*__reshadow_css_end__*/
31
31
  , {
32
- "__SHoverLine": "___SHoverLine_33u57_gg_",
33
- "__SHoverRect": "___SHoverRect_33u57_gg_"
32
+ "__SHoverLine": "___SHoverLine_1jvtk_gg_",
33
+ "__SHoverRect": "___SHoverRect_1jvtk_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_6d5fd_gg_{fill:transparent;stroke-width:3;stroke:#2bb3ff;transition-property:d;transition-duration:var(--duration_6d5fd);transition-timing-function:ease-in-out}.___SLine_6d5fd_gg_.__color_6d5fd_gg_{stroke:var(--color_6d5fd)}.___SLine_6d5fd_gg_.__hide_6d5fd_gg_{display:none}.___SNull_6d5fd_gg_{fill:transparent;stroke:#c4c7cf;stroke-dasharray:4}.___SNull_6d5fd_gg_.__hide_6d5fd_gg_{display:none}"
28
+ ":root {\n\n /* DEPRECATED START\n Deprecated variables should never be used in\n components styles but preserved for backward\n compatibility if they used in projects\n like `<Badge bg=\"red\">alpha</Badge>`\n */\n /* DEPRECATED END */\n}\n\n.___SLine_jp0ph_gg_ {\n fill: transparent;\n stroke-width: 3;\n stroke: #2bb3ff;\n transition-property: d;\n transition-duration: var(--duration_jp0ph);\n transition-timing-function: ease-in-out;\n}\n\n.___SLine_jp0ph_gg_.__color_jp0ph_gg_ {\n stroke: var(--color_jp0ph);\n}\n\n.___SLine_jp0ph_gg_.__hide_jp0ph_gg_ {\n display: none;\n}\n\n.___SNull_jp0ph_gg_ {\n fill: transparent;\n stroke: #c4c7cf;\n stroke-dasharray: 4;\n}\n\n.___SNull_jp0ph_gg_.__hide_jp0ph_gg_ {\n display: none;\n}\n"
29
29
  /*__inner_css_end__*/
30
- , "6d5fd_gg_")
30
+ , "jp0ph_gg_")
31
31
  /*__reshadow_css_end__*/
32
32
  , {
33
- "__SLine": "___SLine_6d5fd_gg_",
34
- "--duration": "--duration_6d5fd",
35
- "_color": "__color_6d5fd_gg_",
36
- "--color": "--color_6d5fd",
37
- "_hide": "__hide_6d5fd_gg_",
38
- "__SNull": "___SNull_6d5fd_gg_"
33
+ "__SLine": "___SLine_jp0ph_gg_",
34
+ "--duration": "--duration_jp0ph",
35
+ "_color": "__color_jp0ph_gg_",
36
+ "--color": "--color_jp0ph",
37
+ "_hide": "__hide_jp0ph_gg_",
38
+ "__SNull": "___SNull_jp0ph_gg_"
39
39
  });
40
40
 
41
41
  var LineRoot = /*#__PURE__*/function (_Component) {
package/lib/es6/Plot.js CHANGED
@@ -31,13 +31,13 @@ var style = (
31
31
  /*__reshadow_css_start__*/
32
32
  _sstyled.insert(
33
33
  /*__inner_css_start__*/
34
- ".___SPlot_1rzoy_gg_{overflow:hidden}.___SPlot_1rzoy_gg_:active,.___SPlot_1rzoy_gg_:focus{outline:0;text-decoration:none}foreignObject[data-aria-only]{pointer-events:none}.___SPlot_1rzoy_gg_.__keyboardFocused_1rzoy_gg_{border:1px solid #008ff8;box-shadow:0 0 0 3px rgba(0, 143, 248, 0.2)}"
34
+ ":root {\n\n /* DEPRECATED START\n Deprecated variables should never be used in\n components styles but preserved for backward\n compatibility if they used in projects\n like `<Badge bg=\"red\">alpha</Badge>`\n */\n /* DEPRECATED END */\n}\n\n.___SPlot_gqhmt_gg_ {\n overflow: hidden;\n}\n\n.___SPlot_gqhmt_gg_:active,\n.___SPlot_gqhmt_gg_:focus {\n outline: 0;\n text-decoration: none;\n}\n\nforeignObject[data-aria-only] {\n pointer-events: none;\n}\n\n.___SPlot_gqhmt_gg_.__keyboardFocused_gqhmt_gg_ {\n border: 1px solid #008ff8;\n box-shadow: 0 0 0 3px rgba(0, 143, 248, 0.2);\n}\n"
35
35
  /*__inner_css_end__*/
36
- , "1rzoy_gg_")
36
+ , "gqhmt_gg_")
37
37
  /*__reshadow_css_end__*/
38
38
  , {
39
- "__SPlot": "___SPlot_1rzoy_gg_",
40
- "_keyboardFocused": "__keyboardFocused_1rzoy_gg_"
39
+ "__SPlot": "___SPlot_gqhmt_gg_",
40
+ "_keyboardFocused": "__keyboardFocused_gqhmt_gg_"
41
41
  });
42
42
 
43
43
  var PlotRoot = /*#__PURE__*/function (_Component) {
@@ -34,20 +34,20 @@ var style = (
34
34
  /*__reshadow_css_start__*/
35
35
  _sstyled.insert(
36
36
  /*__inner_css_start__*/
37
- ".___SRadian_1klv3_gg_{cursor:pointer;fill:#008ff8}.___SLine_1klv3_gg_{stroke:#008ff8}.___SLine_1klv3_gg_.__color_1klv3_gg_{stroke:var(--color_1klv3)}.___SCap_1klv3_gg_{transition:r .1s}.___SLabel_1klv3_gg_{fill:var(--color_1klv3);cursor:var(--text-cursor_1klv3)}.___SRadian_1klv3_gg_:hover .___SLabel_1klv3_gg_{fill:var(--color-hovered_1klv3)}@media (prefers-reduced-motion){.___SLineCap_1klv3_gg_{transition:none}}"
37
+ ":root {\n\n /* DEPRECATED START\n Deprecated variables should never be used in\n components styles but preserved for backward\n compatibility if they used in projects\n like `<Badge bg=\"red\">alpha</Badge>`\n */\n /* DEPRECATED END */\n}\n\n.___SRadian_12ktx_gg_ {\n cursor: pointer;\n fill: #008ff8;\n}\n\n.___SLine_12ktx_gg_ {\n stroke: #008ff8;\n}\n\n.___SLine_12ktx_gg_.__color_12ktx_gg_ {\n stroke: var(--color_12ktx);\n}\n\n.___SCap_12ktx_gg_ {\n transition: r 0.1s;\n}\n\n.___SLabel_12ktx_gg_ {\n fill: var(--color_12ktx);\n cursor: var(--text-cursor_12ktx);\n}\n\n.___SRadian_12ktx_gg_:hover .___SLabel_12ktx_gg_ {\n fill: var(--color-hovered_12ktx);\n}\n\n@media (prefers-reduced-motion) {\n .___SLineCap_12ktx_gg_ {\n transition: none;\n }\n}\n"
38
38
  /*__inner_css_end__*/
39
- , "1klv3_gg_")
39
+ , "12ktx_gg_")
40
40
  /*__reshadow_css_end__*/
41
41
  , {
42
- "__SRadian": "___SRadian_1klv3_gg_",
43
- "__SLine": "___SLine_1klv3_gg_",
44
- "_color": "__color_1klv3_gg_",
45
- "--color": "--color_1klv3",
46
- "__SCap": "___SCap_1klv3_gg_",
47
- "__SLabel": "___SLabel_1klv3_gg_",
48
- "--text-cursor": "--text-cursor_1klv3",
49
- "--color-hovered": "--color-hovered_1klv3",
50
- "__SLineCap": "___SLineCap_1klv3_gg_"
42
+ "__SRadian": "___SRadian_12ktx_gg_",
43
+ "__SLine": "___SLine_12ktx_gg_",
44
+ "_color": "__color_12ktx_gg_",
45
+ "--color": "--color_12ktx",
46
+ "__SCap": "___SCap_12ktx_gg_",
47
+ "__SLabel": "___SLabel_12ktx_gg_",
48
+ "--text-cursor": "--text-cursor_12ktx",
49
+ "--color-hovered": "--color-hovered_12ktx",
50
+ "__SLineCap": "___SLineCap_12ktx_gg_"
51
51
  });
52
52
  var baseAngle = -Math.PI / 2; // The top vertical line
53
53
 
@@ -1 +1 @@
1
- {"version":3,"file":"RadialTree.js","names":["React","transition","Component","sstyled","uniqueIDEnhancement","shade","assignProps","getOriginChildren","createElement","measureText","baseAngle","Math","PI","RadialTreeBase","props","handleRadianClick","bind","activeKey","asProps","duration","uid","preferReduceMotion","window","matchMedia","matches","circlesAnimation","selection","selectAll","iconsAnimation","linesAnimation","labelsAnimation","circlesNodes","nodes","iconsNodes","linesNodes","labelsNodes","length","attrs","map","node","cx","baseVal","value","cy","radianIndex","parseInt","dataset","lineNode","from","x1","y1","to","attr","_","index","x","y","width","height","x2","y2","prevProps","$rootProps","data","runAppearAnimation","key","event","newKey","handlers","textSize","widths","label","max","size","center","restRootProps","textWidth","computeTextWidth","radiansCount","onRadianClick","SRadialTree","Element","Children","dataHintsHandler","establishDataType","styles","style","angleOffset","centralMargin","labelMargin","iconColor","capSize","iconSize","defaultActiveKey","RadialTreeRadian","renderRadian","computeRadianPosition","xStart","yStart","xLabelCenter","yLabelCenter","strokeWidth","xEnd","yEnd","color","stroke","radius","isActive","icon","labelAngle","isHorizontal","angle","getRadianKey","baseCapSize","minDemSize","min","topAngle","xCenter","yCenter","start","cos","sin","end","labelCenter","SRadian","children","_child","mergedProps","describeValueEntity","InteractiveArea","RadialTree","Radian","SRadianList","SInteractiveArea","Line","SLine","Cap","SCap","Icon","SIcon","tag","Label","SLabel","lines","String","split","linesCount","SLabelLine","angleDegs","toFixed","transformOrigin","transform","join","sstyles","sLabelStyles","cn","className","lineText","lineIndex","Title","STitle","setTitle"],"sources":["../../src/RadialTree.tsx"],"sourcesContent":["import React from 'react';\nimport { transition } from 'd3-transition';\nimport { Component, sstyled, CProps, ReturnEl } from '@semcore/core';\nimport uniqueIDEnhancement from '@semcore/utils/lib/uniqueID';\nimport { shade } from '@semcore/utils/lib/color';\nimport assignProps from '@semcore/utils/lib/assignProps';\nimport getOriginChildren from '@semcore/utils/lib/getOriginChildren';\nimport createElement from './createElement';\nimport { measureText } from './utils';\nimport { DataHintsHandler } from './a11y/hints';\n\nimport style from './style/radial-tree.shadow.css';\n\nconst baseAngle = -Math.PI / 2; // The top vertical line\n\ntype RadianData = {\n /**\n * Text label on the end of radian.\n */\n label: string;\n /**\n * Radian key. Radian, which `key` is equal to `activeKey` is displayed as active.\n */\n key: string;\n /**\n * Size of the cap (filled circle on the end of the radian).\n * @default 16\n */\n capSize?: number;\n /**\n * Icon, that displayed in the cap of the active radian (usage example `icon: UserM`).\n */\n icon?: React.FC;\n /**\n * Color of radian's line, cap and label.\n * @default #008FF8\n */\n color?: string;\n /**\n * Color of icon.\n * @default #fff\n */\n iconColor?: string;\n /**\n * Size of icon.\n * @default 16\n */\n iconSize?: number;\n};\n\nexport interface IRadialTreeProps {\n /**\n * List of radians. `{ label: string; key: string; capSize?: number; icon?: React.FC; color?: string; iconColor?: string; iconSize?: number; }`\n */\n data: RadianData[];\n /**\n * Angel (in rads) that rotates chart. 0 means that first radian is exactly on top vertical line.\n * @default 0\n */\n angleOffset?: number;\n /**\n * Duration of appear and update animation.\n * @default 300\n */\n duration?: number;\n /**\n * Gap between the chart center and radians start point.\n * @default 50\n */\n centralMargin?: number;\n /**\n * Gap around text label.\n * @default 2\n */\n labelMargin?: number;\n /**\n * Color of all radian's line, cap and label.\n * @default #008FF8\n */\n color?: string;\n /**\n * Size of the cap (filled circle on the end of the radian).\n * @default 16\n */\n capSize?: number;\n /**\n * Icon, that displayed in the cap of the active radian (usage example `icon: UserM`).\n */\n icon?: React.FC;\n /**\n * Color of icon.\n * @default #fff\n */\n iconColor?: string;\n /**\n * Size of icon.\n * @default 16\n */\n iconSize?: number;\n /**\n * Text size in radians' labels. 1.5x is used as default text size of center text.\n * @default 14\n */\n textSize?: number;\n /**\n * Used to define the active radian in controlled way. Active radian is highligted with inreased cap size.\n */\n activeKey?: string | null;\n /**\n * Default value for `activeKey` property.\n */\n defaultActiveKey?: string | null;\n}\n\ntype RootAsProps = IRadialTreeProps & {\n uid: string;\n styles: React.CSSProperties;\n activeKey: string | null;\n Children: React.FC;\n size: [width: number, height: number];\n data: RadianData[];\n duration: number;\n textSize: number;\n capSize: number;\n centralMargin: number;\n labelMargin: number;\n angleOffset: number;\n $rootProps: RootAsProps;\n dataHintsHandler: DataHintsHandler;\n};\n\nclass RadialTreeBase extends Component<RootAsProps> {\n static displayName = 'RadialTree';\n static style = style;\n static enhance = [uniqueIDEnhancement()];\n\n static defaultProps: Partial<IRadialTreeProps> = {\n angleOffset: 0,\n duration: 300,\n centralMargin: 50,\n labelMargin: 5,\n iconColor: '#fff',\n capSize: 8,\n iconSize: 8,\n textSize: 14,\n defaultActiveKey: null,\n };\n\n Element!: React.FC<{ render: string }>;\n\n constructor(props: any) {\n super(props);\n this.handleRadianClick = this.handleRadianClick.bind(this);\n }\n\n uncontrolledProps() {\n return {\n activeKey: null,\n };\n }\n\n runAppearAnimation() {\n const { duration, uid } = this.asProps;\n const preferReduceMotion = window.matchMedia('(prefers-reduced-motion: reduce)')?.matches;\n\n /** using `!(>)` instead of `<=` to get true on NaN and non numbers stuff */\n if (!(duration > 0)) return;\n if (preferReduceMotion) return;\n\n const circlesAnimation = transition()\n .selection()\n .selectAll(`[data-radial-animation=${uid}-cap-circle]`);\n const iconsAnimation = transition()\n .selection()\n .selectAll(`[data-radial-animation=${uid}-cap-icon]`);\n const linesAnimation = transition()\n .selection()\n .selectAll(`[data-radial-animation=${uid}-line]`);\n const labelsAnimation = transition()\n .selection()\n .selectAll(`[data-radial-animation=${uid}-label]`);\n const circlesNodes = circlesAnimation.nodes() as SVGCircleElement[];\n const iconsNodes = iconsAnimation.nodes() as SVGRectElement[];\n const linesNodes = linesAnimation.nodes() as SVGLineElement[];\n const labelsNodes = linesAnimation.nodes() as SVGTextElement[];\n\n if (circlesNodes.length > 0) {\n const attrs = circlesNodes.map((node) => {\n const cx = node.cx?.baseVal?.value;\n const cy = node.cy?.baseVal?.value;\n const radianIndex = parseInt(node.dataset.radianIndex!, 10);\n const lineNode = linesNodes[radianIndex];\n return {\n from: {\n cx: lineNode.x1?.baseVal?.value,\n cy: lineNode.y1?.baseVal?.value,\n },\n to: { cx, cy },\n };\n });\n\n circlesAnimation\n .attr('opacity', 0)\n .attr('cx', (_, index) => attrs[index].from?.cx)\n .attr('cy', (_, index) => attrs[index].from?.cy);\n circlesAnimation\n .transition()\n .duration(duration)\n .attr('opacity', 1)\n .attr('cx', (_, index) => attrs[index].to?.cx)\n .attr('cy', (_, index) => attrs[index].to?.cy);\n }\n if (iconsNodes.length > 0) {\n const attrs = iconsNodes.map((node) => {\n const x = node.x?.baseVal?.value;\n const y = node.y?.baseVal?.value;\n const width = node.width?.baseVal?.value;\n const height = node.height?.baseVal?.value;\n const radianIndex = parseInt(node.dataset.radianIndex!, 10);\n const lineNode = linesNodes[radianIndex];\n return {\n from: {\n x: lineNode.x1?.baseVal?.value - width / 2,\n y: lineNode.y1?.baseVal?.value - height / 2,\n },\n to: {\n x,\n y,\n },\n };\n });\n\n iconsAnimation\n .attr('opacity', 0)\n .attr('x', (_, index) => attrs[index].from?.x)\n .attr('y', (_, index) => attrs[index].from?.y);\n iconsAnimation\n .transition()\n .duration(duration)\n .attr('opacity', 1)\n .attr('x', (_, index) => attrs[index].to?.x)\n .attr('y', (_, index) => attrs[index].to?.y);\n }\n if (linesNodes.length > 0) {\n const attrs = linesNodes.map((node) => {\n const x2 = node.x2?.baseVal?.value;\n const y2 = node.y2?.baseVal?.value;\n return {\n from: {\n x2: node.x1?.baseVal?.value,\n y2: node.y1?.baseVal?.value,\n },\n to: {\n x2,\n y2,\n },\n };\n });\n\n linesAnimation\n .attr('opacity', 0)\n .attr('x2', (_, index) => attrs[index].from?.x2)\n .attr('y2', (_, index) => attrs[index].from?.y2);\n linesAnimation\n .transition()\n .duration(duration)\n .attr('opacity', 1)\n .attr('x2', (_, index) => attrs[index].to?.x2)\n .attr('y2', (_, index) => attrs[index].to?.y2);\n }\n if (labelsNodes.length > 0) {\n labelsAnimation.attr('opacity', 0);\n labelsAnimation.transition().duration(duration).attr('opacity', 1);\n }\n }\n\n componentDidUpdate(prevProps: RootAsProps) {\n if (prevProps.$rootProps.data?.length !== this.asProps.data?.length) {\n this.runAppearAnimation();\n }\n }\n\n componentDidMount() {\n this.runAppearAnimation();\n }\n\n handleRadianClick(key: string) {\n return (event: React.MouseEvent) => {\n const newKey = key !== this.asProps.activeKey ? key : null;\n this.handlers.activeKey(newKey, event);\n };\n }\n\n computeTextWidth() {\n const { data, textSize } = this.asProps;\n const widths = data.map(({ label }) => measureText(label, textSize));\n\n return Math.max(...widths);\n }\n\n getTitleProps() {\n const { uid, size, textSize } = this.asProps;\n\n const [width, height] = size;\n const center = [width / 2, height / 2];\n const [x, y] = center;\n return {\n x,\n y,\n textSize: textSize * 1.5,\n ['data-radial-animation']: `${uid}-label`,\n } as IRadialTreeTitleProps;\n }\n\n getRadianProps() {\n const { data, ...restRootProps } = this.asProps;\n const textWidth = this.computeTextWidth();\n\n return {\n ...restRootProps,\n radiansCount: data.length,\n data,\n textWidth,\n onRadianClick: this.handleRadianClick,\n } as IRadialTreeRadianProps;\n }\n\n render() {\n const SRadialTree = this.Element;\n const { Children } = this.asProps;\n this.asProps.dataHintsHandler.establishDataType('values-set');\n\n return sstyled(this.asProps.styles)(\n <SRadialTree render=\"g\">\n <Children />\n </SRadialTree>,\n );\n }\n}\n\nexport interface IRadialTreeRadianProps extends IRadialTreeProps {\n radiansCount?: number;\n textWidth?: number;\n onRadianClick?: (key: string) => (event: React.MouseEvent) => void;\n}\n\ntype RadianAsProps = RootAsProps & {\n radiansCount: number;\n textWidth: number;\n onRadianClick: (key: string) => (event: React.MouseEvent) => void;\n};\n\nclass RadialTreeRadian extends Component<RadianAsProps> {\n static displayName = 'RadialTreeRadian';\n static style = style;\n\n static defaultProps: Partial<IRadialTreeRadianProps> = {\n centralMargin: 50,\n labelMargin: 2,\n iconColor: '#fff',\n capSize: 16,\n iconSize: 16,\n textSize: 14,\n };\n Element!: React.FC<{ render: string }>;\n\n constructor(props: any) {\n super(props);\n this.renderRadian = this.renderRadian.bind(this);\n }\n\n getInteractiveAreaProps({ $rootProps }: { $rootProps: IRadialTreeProps }, index: number) {\n const data = $rootProps.data![index];\n const { xStart, yStart, xLabelCenter, yLabelCenter, capSize } = this.computeRadianPosition(\n data,\n index,\n );\n\n return {\n x1: xStart,\n y1: yStart,\n x2: xLabelCenter,\n y2: yLabelCenter,\n strokeWidth: capSize * 3,\n } as IRadialTreeRadianInteractiveAreaProps;\n }\n getLineProps({ $rootProps }: { $rootProps: IRadialTreeProps }, index: number) {\n const data = $rootProps.data![index];\n const { xStart, yStart, xEnd, yEnd } = this.computeRadianPosition(data, index);\n const { uid } = this.asProps;\n const color = data.color ?? this.asProps.color;\n\n return {\n x1: xStart,\n y1: yStart,\n x2: xEnd,\n y2: yEnd,\n stroke: color,\n ['data-radial-animation']: `${uid}-line`,\n ['data-radian-index']: index,\n } as IRadialTreeRadianLineProps;\n }\n getCapProps({ $rootProps }: { $rootProps: IRadialTreeProps }, index: number) {\n const data = $rootProps.data![index];\n const { xEnd, yEnd, capSize } = this.computeRadianPosition(data, index);\n const { uid } = this.asProps;\n const color = data.color ?? this.asProps.color;\n\n return {\n x: xEnd,\n y: yEnd,\n radius: capSize,\n color,\n ['data-radial-animation']: `${uid}-cap-circle`,\n ['data-radian-index']: index,\n } as IRadialTreeRadianCapProps;\n }\n getIconProps({ $rootProps }: { $rootProps: IRadialTreeProps }, index: number) {\n const data = $rootProps.data![index];\n const { xEnd, yEnd, isActive } = this.computeRadianPosition(data, index);\n const { uid } = this.asProps;\n const iconColor = data.iconColor ?? this.asProps.iconColor;\n const iconSize = data.iconSize ?? this.asProps.iconSize;\n const icon = data.icon ?? this.asProps.icon;\n\n return {\n x: xEnd - iconSize! / 2,\n y: yEnd - iconSize! / 2,\n iconSize,\n color: iconColor ?? '#fff',\n ['data-radial-animation']: `${uid}-cap-icon`,\n ['data-radian-index']: index,\n icon,\n isActive,\n } as IRadialTreeRadianIconProps;\n }\n getLabelProps({ $rootProps }: { $rootProps: IRadialTreeProps }, index: number) {\n const data = $rootProps.data![index];\n const { xLabelCenter, yLabelCenter, labelAngle, isHorizontal } = this.computeRadianPosition(\n data,\n index,\n );\n const { uid, textSize } = this.asProps;\n const { label } = data;\n const color = data.color ?? this.asProps.color;\n\n return {\n x: xLabelCenter,\n y: yLabelCenter,\n angle: labelAngle,\n ['data-radial-animation']: `${uid}-label`,\n ['data-radian-index']: index,\n label,\n color,\n isHorizontal,\n textSize,\n } as IRadialTreeRadianLabelProps;\n }\n\n getRadianKey(data: RadianData, index: number) {\n return data.key ?? `radian-${index}`;\n }\n\n computeRadianPosition(data: RadianData, index: number) {\n const { centralMargin, labelMargin, angleOffset, activeKey, size, radiansCount, textWidth } =\n this.asProps;\n const [width, height] = size;\n const key = this.getRadianKey(data, index);\n const isActive = activeKey === key;\n const baseCapSize = data.capSize ?? this.asProps.capSize;\n const capSize = baseCapSize * (isActive ? 1 : 0.5);\n\n const minDemSize = Math.min(width, height) / 2;\n const length = Math.max(\n minDemSize - textWidth - baseCapSize - centralMargin - labelMargin * 2,\n 10,\n );\n\n const angle = baseAngle + angleOffset + (index / radiansCount) * (Math.PI * 2);\n const isHorizontal =\n (angle - baseAngle > (1 / 6) * Math.PI && angle - baseAngle < (5 / 6) * Math.PI) ||\n (angle - baseAngle > (7 / 6) * Math.PI && angle - baseAngle < (11 / 6) * Math.PI);\n const topAngle = -Math.PI / 2;\n const labelAngle = ((angle - topAngle) % Math.PI) + topAngle;\n\n const center = [width / 2, height / 2];\n const [xCenter, yCenter] = center;\n const start = [\n xCenter + Math.cos(angle) * centralMargin,\n yCenter + Math.sin(angle) * centralMargin,\n ];\n const end = [\n xCenter + Math.cos(angle) * (centralMargin + length),\n yCenter + Math.sin(angle) * (centralMargin + length),\n ];\n const [xStart, yStart] = start;\n const [xEnd, yEnd] = end;\n\n const labelCenter = [\n xCenter +\n Math.cos(angle) * (centralMargin + length + baseCapSize + textWidth / 2 + labelMargin),\n yCenter +\n Math.sin(angle) * (centralMargin + length + baseCapSize + textWidth / 2 + labelMargin),\n ];\n const [xLabelCenter, yLabelCenter] = labelCenter;\n\n return {\n xStart,\n yStart,\n xEnd,\n yEnd,\n xLabelCenter,\n yLabelCenter,\n labelAngle,\n isHorizontal,\n capSize,\n isActive,\n };\n }\n\n renderRadian(data: RadianData, index: number) {\n const { styles, Children, onRadianClick } = this.asProps;\n const key = this.getRadianKey(data, index);\n const SRadian = 'g';\n\n let children = getOriginChildren(Children);\n\n if (typeof children === 'function') {\n const _child = this.asProps.children;\n const mergedProps = assignProps(children(this.asProps), this.asProps);\n children = mergedProps.children;\n mergedProps.children = _child;\n }\n\n this.asProps.dataHintsHandler.describeValueEntity(`${index}.${data.label}`, data.label);\n\n // hidden from publicly typed export\n const InteractiveArea = (RadialTree.Radian as any).InteractiveArea;\n\n return sstyled(styles)(\n <SRadian aria-hidden key={key} onClick={onRadianClick(key)}>\n <InteractiveArea />\n {children}\n </SRadian>,\n );\n }\n\n render() {\n const { data } = this.asProps;\n const SRadianList = 'g';\n\n return sstyled(this.asProps.styles)(\n <SRadianList>{data.map((data, index) => this.renderRadian(data, index))}</SRadianList>,\n );\n }\n}\n\nexport interface IRadialTreeRadianInteractiveAreaProps {\n x1?: number;\n y1?: number;\n x2?: number;\n y2?: number;\n strokeWidth?: number;\n}\ntype RadialTreeRadianInteractiveAreaAsProps = IRadialTreeRadianInteractiveAreaProps & {\n Element: React.FC<{ render: string } & React.SVGProps<any>>;\n styles: React.CSSProperties;\n};\nconst InteractiveArea: React.FC<RadialTreeRadianInteractiveAreaAsProps> = ({\n Element: SInteractiveArea,\n styles,\n}) => {\n return sstyled(styles)(\n <SInteractiveArea stroke=\"transparent\" render=\"line\" />,\n ) as React.ReactElement;\n};\n\nexport interface IRadialTreeRadianLineProps {\n x1?: number;\n y1?: number;\n x2?: number;\n y2?: number;\n stroke?: string;\n ['data-radial-animation']?: `${string}-line`;\n ['data-radian-index']?: number;\n}\ntype RadialTreeRadianLineAsProps = IRadialTreeRadianLineProps & {\n Element: React.FC<{ render: string } & React.SVGProps<any>>;\n styles: React.CSSProperties;\n};\nconst Line: React.FC<RadialTreeRadianLineAsProps> = ({ Element: SLine, styles, stroke }) => {\n return sstyled(styles)(<SLine render=\"line\" stroke={stroke} />) as React.ReactElement;\n};\n\nexport interface IRadialTreeRadianCapProps {\n x?: number;\n y?: number;\n radius?: number;\n color?: string;\n ['data-radial-animation']?: `${string}-cap-circle`;\n ['data-radian-index']?: number;\n}\ntype RadialTreeRadianCapAsProps = IRadialTreeRadianCapProps & {\n Element: React.FC<{ render: string } & React.SVGProps<any>>;\n styles: React.CSSProperties;\n};\nconst Cap: React.FC<RadialTreeRadianCapAsProps> = ({\n Element: SCap,\n styles,\n x,\n y,\n radius,\n color,\n}) => {\n return sstyled(styles)(\n <SCap render=\"circle\" cx={x} cy={y} r={radius} fill={color} />,\n ) as React.ReactElement;\n};\n\nexport interface IRadialTreeRadianIconProps {\n x?: number;\n y?: number;\n iconSize?: number;\n color?: string;\n ['data-radial-animation']?: `${string}-cap-icon`;\n ['data-radian-index']?: number;\n tag?: React.FC;\n isActive?: boolean;\n}\ntype RadialTreeRadianIconAsProps = IRadialTreeRadianIconProps & {\n Element: React.FC<{ render: string | React.FC } & React.SVGProps<any>>;\n x: number;\n y: number;\n iconSize: number;\n styles: React.CSSProperties;\n};\nconst Icon: React.FC<RadialTreeRadianIconAsProps> = ({\n Element: SIcon,\n styles,\n isActive,\n tag,\n x,\n y,\n iconSize,\n}) => {\n if (!(isActive && tag)) return null;\n const width = iconSize;\n const height = iconSize;\n return sstyled(styles)(\n <SIcon x={x} y={y} width={width} height={height} render={tag} />,\n ) as React.ReactElement;\n};\n\nexport interface IRadialTreeRadianLabelProps {\n x?: number;\n y?: number;\n color?: string;\n textSize?: number;\n ['data-radial-animation']?: `${string}-label`;\n ['data-radian-index']?: number;\n label?: string;\n isHorizontal?: boolean;\n angle?: number;\n}\ntype RadialTreeRadianLabelAsProps = IRadialTreeRadianLabelProps & {\n Element: React.FC<{ render: string } & React.SVGProps<any>>;\n Children: React.FC;\n styles: React.CSSProperties;\n x: number;\n y: number;\n angle: number;\n textSize: number;\n};\nconst Label: React.FC<RadialTreeRadianLabelAsProps> = ({\n Element: SLabel,\n Children,\n styles,\n label,\n color,\n isHorizontal,\n x,\n y,\n textSize,\n angle,\n}) => {\n const lines = String(label).split('\\n');\n const linesCount = lines.length;\n const SLabelLine = 'tspan';\n\n const angleDegs = ((angle / Math.PI) * 180).toFixed(2);\n const transformOrigin = [x.toFixed(2), y.toFixed(2)];\n const transform = `rotate(${[angleDegs, ...transformOrigin].join(', ')})`;\n\n const sstyles = sstyled(styles);\n const sLabelStyles = sstyles.cn('SLabel', {\n color,\n 'color-hovered': shade(color, -0.12),\n 'text-cursor': isHorizontal ? 'text' : 'vertical-text',\n });\n\n return (\n <SLabel\n aria-hidden\n render=\"text\"\n textAnchor=\"middle\"\n dominantBaseline=\"central\"\n className={sLabelStyles.className}\n style={sLabelStyles.style}\n x={x.toFixed(2)}\n y={y.toFixed(2)}\n transform={transform}\n >\n {lines.map((lineText, lineIndex) => (\n <SLabelLine\n x={x}\n y={y + (lineIndex - (linesCount - 1) / 2) * textSize}\n key={`#${lineIndex}-${lineText}`}\n >\n {lineText}\n </SLabelLine>\n ))}\n <Children />\n </SLabel>\n ) as React.ReactElement;\n};\n\nconst Radian = createElement(RadialTreeRadian, {\n InteractiveArea,\n Line,\n Cap,\n Icon,\n Label,\n});\n\nexport interface IRadialTreeTitleProps {\n x?: number;\n y?: number;\n textSize?: number;\n ['data-radial-animation']?: `${string}-label`;\n color?: string;\n}\ntype RadialTreeTitleAsProps = IRadialTreeTitleProps & {\n Element: React.FC<{ render: string } & React.SVGProps<any>>;\n Children: React.FC;\n styles: React.CSSProperties;\n dataHintsHandler: DataHintsHandler;\n};\nconst Title: React.FC<RadialTreeTitleAsProps> = ({\n Element: STitle,\n Children,\n children,\n styles,\n textSize,\n color,\n x,\n y,\n dataHintsHandler,\n}) => {\n if (typeof children === 'string') {\n dataHintsHandler.setTitle('vertical', children);\n }\n return sstyled(styles)(\n <STitle\n aria-hidden\n render=\"text\"\n textAnchor=\"middle\"\n dominantBaseline=\"central\"\n fontSize={textSize}\n fill={color}\n x={x}\n y={y}\n >\n <Children />\n </STitle>,\n ) as React.ReactElement;\n};\n\nconst RadialTree = createElement(RadialTreeBase, { Title, Radian }) as (<T>(\n props: CProps<IRadialTreeProps & T>,\n) => ReturnEl) & {\n Title: <T>(props: CProps<IRadialTreeTitleProps & T>) => ReturnEl;\n Radian: (<T>(props: CProps<IRadialTreeRadianProps & T>) => ReturnEl) & {\n Line: <T>(props: CProps<IRadialTreeRadianLineProps & T>) => ReturnEl;\n Cap: <T>(props: CProps<IRadialTreeRadianCapProps & T>) => ReturnEl;\n Icon: <T>(props: CProps<IRadialTreeRadianIconProps & T>) => ReturnEl;\n Label: <T>(props: CProps<IRadialTreeRadianLabelProps & T>) => ReturnEl;\n };\n};\n\nexport default RadialTree;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SAASC,UAAT,QAA2B,eAA3B;AACA,SAASC,SAAT,EAAoBC,OAApB,QAAqD,eAArD;AACA,OAAOC,mBAAP,MAAgC,6BAAhC;AACA,SAASC,KAAT,QAAsB,0BAAtB;AACA,OAAOC,WAAP,MAAwB,gCAAxB;AACA,OAAOC,iBAAP,MAA8B,sCAA9B;AACA,OAAOC,aAAP,MAA0B,iBAA1B;AACA,SAASC,WAAT,QAA4B,SAA5B;;;;;;;;;;;;;;;;;;;;;;AAKA,IAAMC,SAAS,GAAG,CAACC,IAAI,CAACC,EAAN,GAAW,CAA7B,C,CAAgC;;IAsH1BC,c;;;;;EAmBJ,wBAAYC,KAAZ,EAAwB;IAAA;;IAAA;;IACtB,0BAAMA,KAAN;;IADsB;;IAEtB,MAAKC,iBAAL,GAAyB,MAAKA,iBAAL,CAAuBC,IAAvB,+BAAzB;IAFsB;EAGvB;;;;WAED,6BAAoB;MAClB,OAAO;QACLC,SAAS,EAAE;MADN,CAAP;IAGD;;;WAED,8BAAqB;MAAA;;MACnB,oBAA0B,KAAKC,OAA/B;M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AAG1H,aAAa,CAACK,cAAD,EAAiB;EAAEkJ,KAAK,EAALA,KAAF;EAAS5B,MAAM,EAANA;AAAT,CAAjB,CAAhC;AAYA,eAAeD,UAAf"}
1
+ {"version":3,"file":"RadialTree.js","names":["React","transition","Component","sstyled","uniqueIDEnhancement","shade","assignProps","getOriginChildren","createElement","measureText","baseAngle","Math","PI","RadialTreeBase","props","handleRadianClick","bind","activeKey","asProps","duration","uid","preferReduceMotion","window","matchMedia","matches","circlesAnimation","selection","selectAll","iconsAnimation","linesAnimation","labelsAnimation","circlesNodes","nodes","iconsNodes","linesNodes","labelsNodes","length","attrs","map","node","cx","baseVal","value","cy","radianIndex","parseInt","dataset","lineNode","from","x1","y1","to","attr","_","index","x","y","width","height","x2","y2","prevProps","$rootProps","data","runAppearAnimation","key","event","newKey","handlers","textSize","widths","label","max","size","center","restRootProps","textWidth","computeTextWidth","radiansCount","onRadianClick","SRadialTree","Element","Children","dataHintsHandler","establishDataType","styles","style","angleOffset","centralMargin","labelMargin","iconColor","capSize","iconSize","defaultActiveKey","RadialTreeRadian","renderRadian","computeRadianPosition","xStart","yStart","xLabelCenter","yLabelCenter","strokeWidth","xEnd","yEnd","color","stroke","radius","isActive","icon","labelAngle","isHorizontal","angle","getRadianKey","baseCapSize","minDemSize","min","topAngle","xCenter","yCenter","start","cos","sin","end","labelCenter","SRadian","children","_child","mergedProps","describeValueEntity","InteractiveArea","RadialTree","Radian","SRadianList","SInteractiveArea","Line","SLine","Cap","SCap","Icon","SIcon","tag","Label","SLabel","lines","String","split","linesCount","SLabelLine","angleDegs","toFixed","transformOrigin","transform","join","sstyles","sLabelStyles","cn","className","lineText","lineIndex","Title","STitle","setTitle"],"sources":["../../src/RadialTree.tsx"],"sourcesContent":["import React from 'react';\nimport { transition } from 'd3-transition';\nimport { Component, sstyled, CProps, ReturnEl } from '@semcore/core';\nimport uniqueIDEnhancement from '@semcore/utils/lib/uniqueID';\nimport { shade } from '@semcore/utils/lib/color';\nimport assignProps from '@semcore/utils/lib/assignProps';\nimport getOriginChildren from '@semcore/utils/lib/getOriginChildren';\nimport createElement from './createElement';\nimport { measureText } from './utils';\nimport { DataHintsHandler } from './a11y/hints';\n\nimport style from './style/radial-tree.shadow.css';\n\nconst baseAngle = -Math.PI / 2; // The top vertical line\n\ntype RadianData = {\n /**\n * Text label on the end of radian.\n */\n label: string;\n /**\n * Radian key. Radian, which `key` is equal to `activeKey` is displayed as active.\n */\n key: string;\n /**\n * Size of the cap (filled circle on the end of the radian).\n * @default 16\n */\n capSize?: number;\n /**\n * Icon, that displayed in the cap of the active radian (usage example `icon: UserM`).\n */\n icon?: React.FC;\n /**\n * Color of radian's line, cap and label.\n * @default #008FF8\n */\n color?: string;\n /**\n * Color of icon.\n * @default #fff\n */\n iconColor?: string;\n /**\n * Size of icon.\n * @default 16\n */\n iconSize?: number;\n};\n\nexport interface IRadialTreeProps {\n /**\n * List of radians. `{ label: string; key: string; capSize?: number; icon?: React.FC; color?: string; iconColor?: string; iconSize?: number; }`\n */\n data: RadianData[];\n /**\n * Angel (in rads) that rotates chart. 0 means that first radian is exactly on top vertical line.\n * @default 0\n */\n angleOffset?: number;\n /**\n * Duration of appear and update animation.\n * @default 300\n */\n duration?: number;\n /**\n * Gap between the chart center and radians start point.\n * @default 50\n */\n centralMargin?: number;\n /**\n * Gap around text label.\n * @default 2\n */\n labelMargin?: number;\n /**\n * Color of all radian's line, cap and label.\n * @default #008FF8\n */\n color?: string;\n /**\n * Size of the cap (filled circle on the end of the radian).\n * @default 16\n */\n capSize?: number;\n /**\n * Icon, that displayed in the cap of the active radian (usage example `icon: UserM`).\n */\n icon?: React.FC;\n /**\n * Color of icon.\n * @default #fff\n */\n iconColor?: string;\n /**\n * Size of icon.\n * @default 16\n */\n iconSize?: number;\n /**\n * Text size in radians' labels. 1.5x is used as default text size of center text.\n * @default 14\n */\n textSize?: number;\n /**\n * Used to define the active radian in controlled way. Active radian is highligted with inreased cap size.\n */\n activeKey?: string | null;\n /**\n * Default value for `activeKey` property.\n */\n defaultActiveKey?: string | null;\n}\n\ntype RootAsProps = IRadialTreeProps & {\n uid: string;\n styles: React.CSSProperties;\n activeKey: string | null;\n Children: React.FC;\n size: [width: number, height: number];\n data: RadianData[];\n duration: number;\n textSize: number;\n capSize: number;\n centralMargin: number;\n labelMargin: number;\n angleOffset: number;\n $rootProps: RootAsProps;\n dataHintsHandler: DataHintsHandler;\n};\n\nclass RadialTreeBase extends Component<RootAsProps> {\n static displayName = 'RadialTree';\n static style = style;\n static enhance = [uniqueIDEnhancement()];\n\n static defaultProps: Partial<IRadialTreeProps> = {\n angleOffset: 0,\n duration: 300,\n centralMargin: 50,\n labelMargin: 5,\n iconColor: '#fff',\n capSize: 8,\n iconSize: 8,\n textSize: 14,\n defaultActiveKey: null,\n };\n\n Element!: React.FC<{ children?: React.ReactNode; render: string }>;\n\n constructor(props: any) {\n super(props);\n this.handleRadianClick = this.handleRadianClick.bind(this);\n }\n\n uncontrolledProps() {\n return {\n activeKey: null,\n };\n }\n\n runAppearAnimation() {\n const { duration, uid } = this.asProps;\n const preferReduceMotion = window.matchMedia('(prefers-reduced-motion: reduce)')?.matches;\n\n /** using `!(>)` instead of `<=` to get true on NaN and non numbers stuff */\n if (!(duration > 0)) return;\n if (preferReduceMotion) return;\n\n const circlesAnimation = transition()\n .selection()\n .selectAll(`[data-radial-animation=${uid}-cap-circle]`);\n const iconsAnimation = transition()\n .selection()\n .selectAll(`[data-radial-animation=${uid}-cap-icon]`);\n const linesAnimation = transition()\n .selection()\n .selectAll(`[data-radial-animation=${uid}-line]`);\n const labelsAnimation = transition()\n .selection()\n .selectAll(`[data-radial-animation=${uid}-label]`);\n const circlesNodes = circlesAnimation.nodes() as SVGCircleElement[];\n const iconsNodes = iconsAnimation.nodes() as SVGRectElement[];\n const linesNodes = linesAnimation.nodes() as SVGLineElement[];\n const labelsNodes = linesAnimation.nodes() as SVGTextElement[];\n\n if (circlesNodes.length > 0) {\n const attrs = circlesNodes.map((node) => {\n const cx = node.cx?.baseVal?.value;\n const cy = node.cy?.baseVal?.value;\n const radianIndex = parseInt(node.dataset.radianIndex!, 10);\n const lineNode = linesNodes[radianIndex];\n return {\n from: {\n cx: lineNode.x1?.baseVal?.value,\n cy: lineNode.y1?.baseVal?.value,\n },\n to: { cx, cy },\n };\n });\n\n circlesAnimation\n .attr('opacity', 0)\n .attr('cx', (_, index) => attrs[index].from?.cx)\n .attr('cy', (_, index) => attrs[index].from?.cy);\n circlesAnimation\n .transition()\n .duration(duration)\n .attr('opacity', 1)\n .attr('cx', (_, index) => attrs[index].to?.cx)\n .attr('cy', (_, index) => attrs[index].to?.cy);\n }\n if (iconsNodes.length > 0) {\n const attrs = iconsNodes.map((node) => {\n const x = node.x?.baseVal?.value;\n const y = node.y?.baseVal?.value;\n const width = node.width?.baseVal?.value;\n const height = node.height?.baseVal?.value;\n const radianIndex = parseInt(node.dataset.radianIndex!, 10);\n const lineNode = linesNodes[radianIndex];\n return {\n from: {\n x: lineNode.x1?.baseVal?.value - width / 2,\n y: lineNode.y1?.baseVal?.value - height / 2,\n },\n to: {\n x,\n y,\n },\n };\n });\n\n iconsAnimation\n .attr('opacity', 0)\n .attr('x', (_, index) => attrs[index].from?.x)\n .attr('y', (_, index) => attrs[index].from?.y);\n iconsAnimation\n .transition()\n .duration(duration)\n .attr('opacity', 1)\n .attr('x', (_, index) => attrs[index].to?.x)\n .attr('y', (_, index) => attrs[index].to?.y);\n }\n if (linesNodes.length > 0) {\n const attrs = linesNodes.map((node) => {\n const x2 = node.x2?.baseVal?.value;\n const y2 = node.y2?.baseVal?.value;\n return {\n from: {\n x2: node.x1?.baseVal?.value,\n y2: node.y1?.baseVal?.value,\n },\n to: {\n x2,\n y2,\n },\n };\n });\n\n linesAnimation\n .attr('opacity', 0)\n .attr('x2', (_, index) => attrs[index].from?.x2)\n .attr('y2', (_, index) => attrs[index].from?.y2);\n linesAnimation\n .transition()\n .duration(duration)\n .attr('opacity', 1)\n .attr('x2', (_, index) => attrs[index].to?.x2)\n .attr('y2', (_, index) => attrs[index].to?.y2);\n }\n if (labelsNodes.length > 0) {\n labelsAnimation.attr('opacity', 0);\n labelsAnimation.transition().duration(duration).attr('opacity', 1);\n }\n }\n\n componentDidUpdate(prevProps: RootAsProps) {\n if (prevProps.$rootProps.data?.length !== this.asProps.data?.length) {\n this.runAppearAnimation();\n }\n }\n\n componentDidMount() {\n this.runAppearAnimation();\n }\n\n handleRadianClick(key: string) {\n return (event: React.MouseEvent) => {\n const newKey = key !== this.asProps.activeKey ? key : null;\n this.handlers.activeKey(newKey, event);\n };\n }\n\n computeTextWidth() {\n const { data, textSize } = this.asProps;\n const widths = data.map(({ label }) => measureText(label, textSize));\n\n return Math.max(...widths);\n }\n\n getTitleProps() {\n const { uid, size, textSize } = this.asProps;\n\n const [width, height] = size;\n const center = [width / 2, height / 2];\n const [x, y] = center;\n return {\n x,\n y,\n textSize: textSize * 1.5,\n ['data-radial-animation']: `${uid}-label`,\n } as IRadialTreeTitleProps;\n }\n\n getRadianProps() {\n const { data, ...restRootProps } = this.asProps;\n const textWidth = this.computeTextWidth();\n\n return {\n ...restRootProps,\n radiansCount: data.length,\n data,\n textWidth,\n onRadianClick: this.handleRadianClick,\n } as IRadialTreeRadianProps;\n }\n\n render() {\n const SRadialTree = this.Element;\n const { Children } = this.asProps;\n this.asProps.dataHintsHandler.establishDataType('values-set');\n\n return sstyled(this.asProps.styles)(\n <SRadialTree render=\"g\">\n <Children />\n </SRadialTree>,\n );\n }\n}\n\nexport interface IRadialTreeRadianProps extends IRadialTreeProps {\n radiansCount?: number;\n textWidth?: number;\n onRadianClick?: (key: string) => (event: React.MouseEvent) => void;\n}\n\ntype RadianAsProps = RootAsProps & {\n radiansCount: number;\n textWidth: number;\n onRadianClick: (key: string) => (event: React.MouseEvent) => void;\n};\n\nclass RadialTreeRadian extends Component<RadianAsProps> {\n static displayName = 'RadialTreeRadian';\n static style = style;\n\n static defaultProps: Partial<IRadialTreeRadianProps> = {\n centralMargin: 50,\n labelMargin: 2,\n iconColor: '#fff',\n capSize: 16,\n iconSize: 16,\n textSize: 14,\n };\n Element!: React.FC<{ render: string }>;\n\n constructor(props: any) {\n super(props);\n this.renderRadian = this.renderRadian.bind(this);\n }\n\n getInteractiveAreaProps({ $rootProps }: { $rootProps: IRadialTreeProps }, index: number) {\n const data = $rootProps.data![index];\n const { xStart, yStart, xLabelCenter, yLabelCenter, capSize } = this.computeRadianPosition(\n data,\n index,\n );\n\n return {\n x1: xStart,\n y1: yStart,\n x2: xLabelCenter,\n y2: yLabelCenter,\n strokeWidth: capSize * 3,\n } as IRadialTreeRadianInteractiveAreaProps;\n }\n getLineProps({ $rootProps }: { $rootProps: IRadialTreeProps }, index: number) {\n const data = $rootProps.data![index];\n const { xStart, yStart, xEnd, yEnd } = this.computeRadianPosition(data, index);\n const { uid } = this.asProps;\n const color = data.color ?? this.asProps.color;\n\n return {\n x1: xStart,\n y1: yStart,\n x2: xEnd,\n y2: yEnd,\n stroke: color,\n ['data-radial-animation']: `${uid}-line`,\n ['data-radian-index']: index,\n } as IRadialTreeRadianLineProps;\n }\n getCapProps({ $rootProps }: { $rootProps: IRadialTreeProps }, index: number) {\n const data = $rootProps.data![index];\n const { xEnd, yEnd, capSize } = this.computeRadianPosition(data, index);\n const { uid } = this.asProps;\n const color = data.color ?? this.asProps.color;\n\n return {\n x: xEnd,\n y: yEnd,\n radius: capSize,\n color,\n ['data-radial-animation']: `${uid}-cap-circle`,\n ['data-radian-index']: index,\n } as IRadialTreeRadianCapProps;\n }\n getIconProps({ $rootProps }: { $rootProps: IRadialTreeProps }, index: number) {\n const data = $rootProps.data![index];\n const { xEnd, yEnd, isActive } = this.computeRadianPosition(data, index);\n const { uid } = this.asProps;\n const iconColor = data.iconColor ?? this.asProps.iconColor;\n const iconSize = data.iconSize ?? this.asProps.iconSize;\n const icon = data.icon ?? this.asProps.icon;\n\n return {\n x: xEnd - iconSize! / 2,\n y: yEnd - iconSize! / 2,\n iconSize,\n color: iconColor ?? '#fff',\n ['data-radial-animation']: `${uid}-cap-icon`,\n ['data-radian-index']: index,\n icon,\n isActive,\n } as IRadialTreeRadianIconProps;\n }\n getLabelProps({ $rootProps }: { $rootProps: IRadialTreeProps }, index: number) {\n const data = $rootProps.data![index];\n const { xLabelCenter, yLabelCenter, labelAngle, isHorizontal } = this.computeRadianPosition(\n data,\n index,\n );\n const { uid, textSize } = this.asProps;\n const { label } = data;\n const color = data.color ?? this.asProps.color;\n\n return {\n x: xLabelCenter,\n y: yLabelCenter,\n angle: labelAngle,\n ['data-radial-animation']: `${uid}-label`,\n ['data-radian-index']: index,\n label,\n color,\n isHorizontal,\n textSize,\n } as IRadialTreeRadianLabelProps;\n }\n\n getRadianKey(data: RadianData, index: number) {\n return data.key ?? `radian-${index}`;\n }\n\n computeRadianPosition(data: RadianData, index: number) {\n const { centralMargin, labelMargin, angleOffset, activeKey, size, radiansCount, textWidth } =\n this.asProps;\n const [width, height] = size;\n const key = this.getRadianKey(data, index);\n const isActive = activeKey === key;\n const baseCapSize = data.capSize ?? this.asProps.capSize;\n const capSize = baseCapSize * (isActive ? 1 : 0.5);\n\n const minDemSize = Math.min(width, height) / 2;\n const length = Math.max(\n minDemSize - textWidth - baseCapSize - centralMargin - labelMargin * 2,\n 10,\n );\n\n const angle = baseAngle + angleOffset + (index / radiansCount) * (Math.PI * 2);\n const isHorizontal =\n (angle - baseAngle > (1 / 6) * Math.PI && angle - baseAngle < (5 / 6) * Math.PI) ||\n (angle - baseAngle > (7 / 6) * Math.PI && angle - baseAngle < (11 / 6) * Math.PI);\n const topAngle = -Math.PI / 2;\n const labelAngle = ((angle - topAngle) % Math.PI) + topAngle;\n\n const center = [width / 2, height / 2];\n const [xCenter, yCenter] = center;\n const start = [\n xCenter + Math.cos(angle) * centralMargin,\n yCenter + Math.sin(angle) * centralMargin,\n ];\n const end = [\n xCenter + Math.cos(angle) * (centralMargin + length),\n yCenter + Math.sin(angle) * (centralMargin + length),\n ];\n const [xStart, yStart] = start;\n const [xEnd, yEnd] = end;\n\n const labelCenter = [\n xCenter +\n Math.cos(angle) * (centralMargin + length + baseCapSize + textWidth / 2 + labelMargin),\n yCenter +\n Math.sin(angle) * (centralMargin + length + baseCapSize + textWidth / 2 + labelMargin),\n ];\n const [xLabelCenter, yLabelCenter] = labelCenter;\n\n return {\n xStart,\n yStart,\n xEnd,\n yEnd,\n xLabelCenter,\n yLabelCenter,\n labelAngle,\n isHorizontal,\n capSize,\n isActive,\n };\n }\n\n renderRadian(data: RadianData, index: number) {\n const { styles, Children, onRadianClick } = this.asProps;\n const key = this.getRadianKey(data, index);\n const SRadian = 'g';\n\n let children = getOriginChildren(Children);\n\n if (typeof children === 'function') {\n const _child = this.asProps.children;\n const mergedProps = assignProps(children(this.asProps), this.asProps);\n children = mergedProps.children;\n mergedProps.children = _child;\n }\n\n this.asProps.dataHintsHandler.describeValueEntity(`${index}.${data.label}`, data.label);\n\n // hidden from publicly typed export\n const InteractiveArea = (RadialTree.Radian as any).InteractiveArea;\n\n return sstyled(styles)(\n <SRadian aria-hidden key={key} onClick={onRadianClick(key)}>\n <InteractiveArea />\n {children}\n </SRadian>,\n );\n }\n\n render() {\n const { data } = this.asProps;\n const SRadianList = 'g';\n\n return sstyled(this.asProps.styles)(\n <SRadianList>{data.map((data, index) => this.renderRadian(data, index))}</SRadianList>,\n );\n }\n}\n\nexport interface IRadialTreeRadianInteractiveAreaProps {\n x1?: number;\n y1?: number;\n x2?: number;\n y2?: number;\n strokeWidth?: number;\n}\ntype RadialTreeRadianInteractiveAreaAsProps = IRadialTreeRadianInteractiveAreaProps & {\n Element: React.FC<{ render: string } & React.SVGProps<any>>;\n styles: React.CSSProperties;\n};\nconst InteractiveArea: React.FC<RadialTreeRadianInteractiveAreaAsProps> = ({\n Element: SInteractiveArea,\n styles,\n}) => {\n return sstyled(styles)(\n <SInteractiveArea stroke=\"transparent\" render=\"line\" />,\n ) as React.ReactElement;\n};\n\nexport interface IRadialTreeRadianLineProps {\n x1?: number;\n y1?: number;\n x2?: number;\n y2?: number;\n stroke?: string;\n ['data-radial-animation']?: `${string}-line`;\n ['data-radian-index']?: number;\n}\ntype RadialTreeRadianLineAsProps = IRadialTreeRadianLineProps & {\n Element: React.FC<{ render: string } & React.SVGProps<any>>;\n styles: React.CSSProperties;\n};\nconst Line: React.FC<RadialTreeRadianLineAsProps> = ({ Element: SLine, styles, stroke }) => {\n return sstyled(styles)(<SLine render=\"line\" stroke={stroke} />) as React.ReactElement;\n};\n\nexport interface IRadialTreeRadianCapProps {\n x?: number;\n y?: number;\n radius?: number;\n color?: string;\n ['data-radial-animation']?: `${string}-cap-circle`;\n ['data-radian-index']?: number;\n}\ntype RadialTreeRadianCapAsProps = IRadialTreeRadianCapProps & {\n Element: React.FC<{ render: string } & React.SVGProps<any>>;\n styles: React.CSSProperties;\n};\nconst Cap: React.FC<RadialTreeRadianCapAsProps> = ({\n Element: SCap,\n styles,\n x,\n y,\n radius,\n color,\n}) => {\n return sstyled(styles)(\n <SCap render=\"circle\" cx={x} cy={y} r={radius} fill={color} />,\n ) as React.ReactElement;\n};\n\nexport interface IRadialTreeRadianIconProps {\n x?: number;\n y?: number;\n iconSize?: number;\n color?: string;\n ['data-radial-animation']?: `${string}-cap-icon`;\n ['data-radian-index']?: number;\n tag?: React.FC;\n isActive?: boolean;\n}\ntype RadialTreeRadianIconAsProps = IRadialTreeRadianIconProps & {\n Element: React.FC<{ render: string | React.FC } & React.SVGProps<any>>;\n x: number;\n y: number;\n iconSize: number;\n styles: React.CSSProperties;\n};\nconst Icon: React.FC<RadialTreeRadianIconAsProps> = ({\n Element: SIcon,\n styles,\n isActive,\n tag,\n x,\n y,\n iconSize,\n}) => {\n if (!(isActive && tag)) return null;\n const width = iconSize;\n const height = iconSize;\n return sstyled(styles)(\n <SIcon x={x} y={y} width={width} height={height} render={tag} />,\n ) as React.ReactElement;\n};\n\nexport interface IRadialTreeRadianLabelProps {\n x?: number;\n y?: number;\n color?: string;\n textSize?: number;\n ['data-radial-animation']?: `${string}-label`;\n ['data-radian-index']?: number;\n label?: string;\n isHorizontal?: boolean;\n angle?: number;\n}\ntype RadialTreeRadianLabelAsProps = IRadialTreeRadianLabelProps & {\n Element: React.FC<{ render: string } & React.SVGProps<any>>;\n Children: React.FC;\n styles: React.CSSProperties;\n x: number;\n y: number;\n angle: number;\n textSize: number;\n};\nconst Label: React.FC<RadialTreeRadianLabelAsProps> = ({\n Element: SLabel,\n Children,\n styles,\n label,\n color,\n isHorizontal,\n x,\n y,\n textSize,\n angle,\n}) => {\n const lines = String(label).split('\\n');\n const linesCount = lines.length;\n const SLabelLine = 'tspan';\n\n const angleDegs = ((angle / Math.PI) * 180).toFixed(2);\n const transformOrigin = [x.toFixed(2), y.toFixed(2)];\n const transform = `rotate(${[angleDegs, ...transformOrigin].join(', ')})`;\n\n const sstyles = sstyled(styles);\n const sLabelStyles = sstyles.cn('SLabel', {\n color,\n 'color-hovered': shade(color, -0.12),\n 'text-cursor': isHorizontal ? 'text' : 'vertical-text',\n });\n\n return (\n <SLabel\n aria-hidden\n render=\"text\"\n textAnchor=\"middle\"\n dominantBaseline=\"central\"\n className={sLabelStyles.className}\n style={sLabelStyles.style}\n x={x.toFixed(2)}\n y={y.toFixed(2)}\n transform={transform}\n >\n {lines.map((lineText, lineIndex) => (\n <SLabelLine\n x={x}\n y={y + (lineIndex - (linesCount - 1) / 2) * textSize}\n key={`#${lineIndex}-${lineText}`}\n >\n {lineText}\n </SLabelLine>\n ))}\n <Children />\n </SLabel>\n ) as React.ReactElement;\n};\n\nconst Radian = createElement(RadialTreeRadian, {\n InteractiveArea,\n Line,\n Cap,\n Icon,\n Label,\n});\n\nexport interface IRadialTreeTitleProps {\n x?: number;\n y?: number;\n textSize?: number;\n ['data-radial-animation']?: `${string}-label`;\n color?: string;\n}\ntype RadialTreeTitleAsProps = IRadialTreeTitleProps & {\n Element: React.FC<{ render: string } & React.SVGProps<any>>;\n Children: React.FC;\n children: React.ReactNode;\n styles: React.CSSProperties;\n dataHintsHandler: DataHintsHandler;\n};\nconst Title: React.FC<RadialTreeTitleAsProps> = ({\n Element: STitle,\n Children,\n children,\n styles,\n textSize,\n color,\n x,\n y,\n dataHintsHandler,\n}) => {\n if (typeof children === 'string') {\n dataHintsHandler.setTitle('vertical', children);\n }\n return sstyled(styles)(\n <STitle\n aria-hidden\n render=\"text\"\n textAnchor=\"middle\"\n dominantBaseline=\"central\"\n fontSize={textSize}\n fill={color}\n x={x}\n y={y}\n >\n <Children />\n </STitle>,\n ) as React.ReactElement;\n};\n\nconst RadialTree = createElement(RadialTreeBase, { Title, Radian }) as (<T>(\n props: CProps<IRadialTreeProps & T>,\n) => ReturnEl) & {\n Title: <T>(props: CProps<IRadialTreeTitleProps & T>) => ReturnEl;\n Radian: (<T>(props: CProps<IRadialTreeRadianProps & T>) => ReturnEl) & {\n Line: <T>(props: CProps<IRadialTreeRadianLineProps & T>) => ReturnEl;\n Cap: <T>(props: CProps<IRadialTreeRadianCapProps & T>) => ReturnEl;\n Icon: <T>(props: CProps<IRadialTreeRadianIconProps & T>) => ReturnEl;\n Label: <T>(props: CProps<IRadialTreeRadianLabelProps & T>) => ReturnEl;\n };\n};\n\nexport default RadialTree;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SAASC,UAAT,QAA2B,eAA3B;AACA,SAASC,SAAT,EAAoBC,OAApB,QAAqD,eAArD;AACA,OAAOC,mBAAP,MAAgC,6BAAhC;AACA,SAASC,KAAT,QAAsB,0BAAtB;AACA,OAAOC,WAAP,MAAwB,gCAAxB;AACA,OAAOC,iBAAP,MAA8B,sCAA9B;AACA,OAAOC,aAAP,MAA0B,iBAA1B;AACA,SAASC,WAAT,QAA4B,SAA5B;;;;;;;;;;;;;;;;;;;;;;AAKA,IAAMC,SAAS,GAAG,CAACC,IAAI,CAACC,EAAN,GAAW,CAA7B,C,CAAgC;;IAsH1BC,c;;;;;EAmBJ,wBAAYC,KAAZ,EAAwB;I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,MAAD,CAAd,eACE,oBAAC,MAAD;IAAA;IAAA,UAES,MAFT;IAAA,cAGa,QAHb;IAAA,oBAImB,SAJnB;IAAA,YAKYhB,QALZ;IAAA,QAMQmC,KANR;IAAA,KAOKjD,CAPL;IAAA,KAQKC;EARL,iBAUE,oBAAC,QAAD,2BAVF,CADF;AAcD,CA5BD;;AA8BA,IAAM0E,UAAU,GAAG1H,aAAa,CAACK,cAAD,EAAiB;EAAEkJ,KAAK,EAALA,KAAF;EAAS5B,MAAM,EAANA;AAAT,CAAjB,CAAhC;AAYA,eAAeD,UAAf"}
@@ -25,19 +25,19 @@ var style = (
25
25
  /*__reshadow_css_start__*/
26
26
  _sstyled.insert(
27
27
  /*__inner_css_start__*/
28
- ".___SReferenceLine_1rx9u_gg_{fill:none;stroke:#a9abb6}.___STitle_1rx9u_gg_{font-size:12px;fill:#6c6e79;transform-origin:var(--transform-origin_1rx9u)}.___STitle_1rx9u_gg_._position_top_1rx9u_gg_{text-anchor:middle}.___STitle_1rx9u_gg_._position_bottom_1rx9u_gg_{text-anchor:middle;alignment-baseline:hanging}.___STitle_1rx9u_gg_._position_right_1rx9u_gg_{transform:rotate(-90deg);alignment-baseline:middle;text-anchor:middle}.___STitle_1rx9u_gg_._position_left_1rx9u_gg_{transform:rotate(-90deg);text-anchor:middle;alignment-baseline:middle}.___SBackground_1rx9u_gg_{fill:rgba(196,199,207,.2)}"
28
+ ":root {\n\n /* DEPRECATED START\n Deprecated variables should never be used in\n components styles but preserved for backward\n compatibility if they used in projects\n like `<Badge bg=\"red\">alpha</Badge>`\n */\n /* DEPRECATED END */\n}\n\n.___SReferenceLine_15v4q_gg_ {\n fill: none;\n stroke: #a9abb6;\n}\n\n.___STitle_15v4q_gg_ {\n font-size: 12px;\n fill: #6c6e79;\n transform-origin: var(--transform-origin_15v4q);\n}\n\n.___STitle_15v4q_gg_._position_top_15v4q_gg_ {\n text-anchor: middle;\n}\n\n.___STitle_15v4q_gg_._position_bottom_15v4q_gg_ {\n text-anchor: middle;\n alignment-baseline: hanging;\n}\n\n.___STitle_15v4q_gg_._position_right_15v4q_gg_ {\n transform: rotate(-90deg);\n alignment-baseline: middle;\n text-anchor: middle;\n}\n\n.___STitle_15v4q_gg_._position_left_15v4q_gg_ {\n transform: rotate(-90deg);\n text-anchor: middle;\n alignment-baseline: middle;\n}\n\n.___SBackground_15v4q_gg_ {\n fill: rgba(196, 199, 207, 0.2);\n}\n"
29
29
  /*__inner_css_end__*/
30
- , "1rx9u_gg_")
30
+ , "15v4q_gg_")
31
31
  /*__reshadow_css_end__*/
32
32
  , {
33
- "__SReferenceLine": "___SReferenceLine_1rx9u_gg_",
34
- "__STitle": "___STitle_1rx9u_gg_",
35
- "--transform-origin": "--transform-origin_1rx9u",
36
- "_position_top": "_position_top_1rx9u_gg_",
37
- "_position_bottom": "_position_bottom_1rx9u_gg_",
38
- "_position_right": "_position_right_1rx9u_gg_",
39
- "_position_left": "_position_left_1rx9u_gg_",
40
- "__SBackground": "___SBackground_1rx9u_gg_"
33
+ "__SReferenceLine": "___SReferenceLine_15v4q_gg_",
34
+ "__STitle": "___STitle_15v4q_gg_",
35
+ "--transform-origin": "--transform-origin_15v4q",
36
+ "_position_top": "_position_top_15v4q_gg_",
37
+ "_position_bottom": "_position_bottom_15v4q_gg_",
38
+ "_position_right": "_position_right_15v4q_gg_",
39
+ "_position_left": "_position_left_15v4q_gg_",
40
+ "__SBackground": "___SBackground_15v4q_gg_"
41
41
  });
42
42
  var MAP_ORIENTATION = {
43
43
  left: 'vertical',
@@ -30,16 +30,16 @@ var style = (
30
30
  /*__reshadow_css_start__*/
31
31
  _sstyled.insert(
32
32
  /*__inner_css_start__*/
33
- ".___SScatterPlot_1t8iw_gg_{fill:#2bb3ff;transition-property:cx,cy;transition-duration:var(--duration_1t8iw);transition-timing-function:ease-in-out;opacity:.5}.___SScatterPlot_1t8iw_gg_:hover{opacity:.8}.___SScatterPlot_1t8iw_gg_.__color_1t8iw_gg_{fill:var(--color_1t8iw)}.___SValue_1t8iw_gg_{text-anchor:middle;font-size:10px;stroke:#008ff8}.___SValue_1t8iw_gg_.__color_1t8iw_gg_{stroke:var(--color_1t8iw)}"
33
+ ":root {\n\n /* DEPRECATED START\n Deprecated variables should never be used in\n components styles but preserved for backward\n compatibility if they used in projects\n like `<Badge bg=\"red\">alpha</Badge>`\n */\n /* DEPRECATED END */\n}\n\n.___SScatterPlot_16tth_gg_ {\n fill: #2bb3ff;\n transition-property: cx, cy;\n transition-duration: var(--duration_16tth);\n transition-timing-function: ease-in-out;\n opacity: 0.5\n}\n\n.___SScatterPlot_16tth_gg_:hover {\n opacity: 0.8;\n }\n\n.___SScatterPlot_16tth_gg_.__color_16tth_gg_ {\n fill: var(--color_16tth);\n}\n\n.___SValue_16tth_gg_ {\n text-anchor: middle;\n font-size: 10px;\n stroke: #008ff8;\n}\n\n.___SValue_16tth_gg_.__color_16tth_gg_ {\n stroke: var(--color_16tth);\n}\n"
34
34
  /*__inner_css_end__*/
35
- , "1t8iw_gg_")
35
+ , "16tth_gg_")
36
36
  /*__reshadow_css_end__*/
37
37
  , {
38
- "__SScatterPlot": "___SScatterPlot_1t8iw_gg_",
39
- "--duration": "--duration_1t8iw",
40
- "_color": "__color_1t8iw_gg_",
41
- "--color": "--color_1t8iw",
42
- "__SValue": "___SValue_1t8iw_gg_"
38
+ "__SScatterPlot": "___SScatterPlot_16tth_gg_",
39
+ "--duration": "--duration_16tth",
40
+ "_color": "__color_16tth_gg_",
41
+ "--color": "--color_16tth",
42
+ "__SValue": "___SValue_16tth_gg_"
43
43
  });
44
44
 
45
45
  var ScatterPlotRoot = /*#__PURE__*/function (_Component) {
@@ -34,17 +34,17 @@ var style = (
34
34
  /*__reshadow_css_start__*/
35
35
  _sstyled.insert(
36
36
  /*__inner_css_start__*/
37
- ".___STooltip_1q94t_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_1q94t_gg_{color:#6c6e79;margin-bottom:8px}.___SDotGroup_1q94t_gg_{display:flex;align-items:center}.___SDot_1q94t_gg_{width:8px;height:8px;border-radius:50%;margin-right:8px;background:#2bb3ff}.___SDot_1q94t_gg_.__color_1q94t_gg_{background:var(--color_1q94t)}"
37
+ ":root {\n\n /* DEPRECATED START\n Deprecated variables should never be used in\n components styles but preserved for backward\n compatibility if they used in projects\n like `<Badge bg=\"red\">alpha</Badge>`\n */\n /* DEPRECATED END */\n}\n\n.___STooltip_p3nrf_gg_ {\n font-size: 12px;\n line-height: 1.33;\n position: relative;\n background-color: #fff;\n border-radius: 6px;\n border: 1px solid #e0e1e9;\n box-sizing: border-box;\n box-shadow: 0px 1px 12px 0px rgba(25, 27, 35, 0.15);\n padding: 12px;\n}\n\n.___STitle_p3nrf_gg_ {\n color: #6c6e79;\n margin-bottom: 8px;\n}\n\n.___SDotGroup_p3nrf_gg_ {\n display: flex;\n align-items: center;\n}\n\n.___SDot_p3nrf_gg_ {\n width: 8px;\n height: 8px;\n border-radius: 50%;\n margin-right: 8px;\n background: #2bb3ff;\n}\n\n.___SDot_p3nrf_gg_.__color_p3nrf_gg_ {\n background: var(--color_p3nrf);\n}\n"
38
38
  /*__inner_css_end__*/
39
- , "1q94t_gg_")
39
+ , "p3nrf_gg_")
40
40
  /*__reshadow_css_end__*/
41
41
  , {
42
- "__STooltip": "___STooltip_1q94t_gg_",
43
- "__STitle": "___STitle_1q94t_gg_",
44
- "__SDotGroup": "___SDotGroup_1q94t_gg_",
45
- "__SDot": "___SDot_1q94t_gg_",
46
- "_color": "__color_1q94t_gg_",
47
- "--color": "--color_1q94t"
42
+ "__STooltip": "___STooltip_p3nrf_gg_",
43
+ "__STitle": "___STitle_p3nrf_gg_",
44
+ "__SDotGroup": "___SDotGroup_p3nrf_gg_",
45
+ "__SDot": "___SDot_p3nrf_gg_",
46
+ "_color": "__color_p3nrf_gg_",
47
+ "--color": "--color_p3nrf"
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_1uyw5_gg_{fill:#59ddaa;stroke:#fff;stroke-width:2px;fill-opacity:.5;transition-property:cx,cy;transition-duration:var(--duration_1uyw5);transition-timing-function:ease-in-out}.___SCircle_1uyw5_gg_:hover{fill-opacity:.7}.___SCircle_1uyw5_gg_.__color_1uyw5_gg_{fill:var(--color_1uyw5)}.___SIntersection_1uyw5_gg_{stroke:#fff;stroke-width:2px;fill-opacity:0}.___SIntersection_1uyw5_gg_:hover{fill-opacity:.1}"
29
+ ".___SCircle_utflp_gg_ {\n fill: #59ddaa;\n stroke: #fff;\n stroke-width: 2px;\n fill-opacity: 0.5;\n transition-property: cx, cy;\n transition-duration: var(--duration_utflp);\n transition-timing-function: ease-in-out\n}\n\n.___SCircle_utflp_gg_:hover {\n fill-opacity: 0.7;\n }\n\n.___SCircle_utflp_gg_.__color_utflp_gg_ {\n fill: var(--color_utflp);\n}\n\n.___SIntersection_utflp_gg_ {\n stroke: #fff;\n stroke-width: 2px;\n fill-opacity: 0\n}\n\n.___SIntersection_utflp_gg_:hover {\n fill-opacity: 0.1;\n }\n"
30
30
  /*__inner_css_end__*/
31
- , "1uyw5_gg_")
31
+ , "utflp_gg_")
32
32
  /*__reshadow_css_end__*/
33
33
  , {
34
- "__SCircle": "___SCircle_1uyw5_gg_",
35
- "--duration": "--duration_1uyw5",
36
- "_color": "__color_1uyw5_gg_",
37
- "--color": "--color_1uyw5",
38
- "__SIntersection": "___SIntersection_1uyw5_gg_"
34
+ "__SCircle": "___SCircle_utflp_gg_",
35
+ "--duration": "--duration_utflp",
36
+ "_color": "__color_utflp_gg_",
37
+ "--color": "--color_utflp",
38
+ "__SIntersection": "___SIntersection_utflp_gg_"
39
39
  });
40
40
 
41
41
  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
- ".___SPlotA11yModule_9npn1_gg_{-webkit-user-select:none;-moz-user-select:none;user-select:none;pointer-events:none;opacity:0}.___SPlotA11yModule_9npn1_gg_:focus{-webkit-user-select:all;-moz-user-select:all;user-select:all;pointer-events:all;opacity:1}"
23
+ ":root {\n\n /* DEPRECATED START\n Deprecated variables should never be used in\n components styles but preserved for backward\n compatibility if they used in projects\n like `<Badge bg=\"red\">alpha</Badge>`\n */\n /* DEPRECATED END */\n}\n\n.___SPlotA11yModule_13565_gg_ {\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n pointer-events: none;\n opacity: 0;\n}\n\n.___SPlotA11yModule_13565_gg_:focus {\n -webkit-user-select: all;\n -moz-user-select: all;\n user-select: all;\n pointer-events: all;\n opacity: 1;\n}\n"
24
24
  /*__inner_css_end__*/
25
- , "9npn1_gg_")
25
+ , "13565_gg_")
26
26
  /*__reshadow_css_end__*/
27
27
  , {
28
- "__SPlotA11yModule": "___SPlotA11yModule_9npn1_gg_"
28
+ "__SPlotA11yModule": "___SPlotA11yModule_13565_gg_"
29
29
  });
30
30
  import { Context as I18nContext } 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
- ".___SPlotA11yView_f421s_gg_{-webkit-user-select:none;-moz-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_f421s_gg_:focus,.___SPlotA11yView_f421s_gg_.__focus-within_f421s_gg_{-webkit-user-select:all;-moz-user-select:all;user-select:all;pointer-events:all;opacity:1;z-index:100;position:relative;display:block}.___SPlotA11yView_f421s_gg_:focus,.___SPlotA11yView_f421s_gg_:focus-within{-webkit-user-select:all;-moz-user-select:all;user-select:all;pointer-events:all;opacity:1;z-index:100;position:relative;display:block}.___SPlotA11yView_f421s_gg_ a{cursor:pointer;text-decoration:underline;margin-bottom:8px;display:block}.___SPlotA11yView_f421s_gg_ table,.___SPlotA11yView_f421s_gg_ td,.___SPlotA11yView_f421s_gg_ th{border:1px solid #000}"
30
+ ":root {\n\n /* DEPRECATED START\n Deprecated variables should never be used in\n components styles but preserved for backward\n compatibility if they used in projects\n like `<Badge bg=\"red\">alpha</Badge>`\n */\n /* DEPRECATED END */\n}\n\n.___SPlotA11yView_r249z_gg_ {\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n pointer-events: none;\n opacity: 0;\n background-color: white;\n color: black;\n border: 3px solid black;\n font-size: 10px;\n padding: 2px;\n width: 200px;\n height: 200px;\n max-width: 80%;\n max-height: 80%;\n overflow: auto;\n}\n\n.___SPlotA11yView_r249z_gg_.__focus-within_r249z_gg_,\n.___SPlotA11yView_r249z_gg_:focus {\n -webkit-user-select: all;\n -moz-user-select: all;\n user-select: all;\n pointer-events: all;\n opacity: 1;\n z-index: 100;\n position: relative;\n display: block;\n}\n\n.___SPlotA11yView_r249z_gg_:focus-within,\n.___SPlotA11yView_r249z_gg_:focus {\n -webkit-user-select: all;\n -moz-user-select: all;\n user-select: all;\n pointer-events: all;\n opacity: 1;\n z-index: 100;\n position: relative;\n display: block;\n}\n\n.___SPlotA11yView_r249z_gg_ a {\n cursor: pointer;\n text-decoration: underline;\n margin-bottom: 8px;\n display: block;\n}\n\n.___SPlotA11yView_r249z_gg_ table,\n.___SPlotA11yView_r249z_gg_ td,\n.___SPlotA11yView_r249z_gg_ th {\n border: 1px solid black;\n}\n"
31
31
  /*__inner_css_end__*/
32
- , "f421s_gg_")
32
+ , "r249z_gg_")
33
33
  /*__reshadow_css_end__*/
34
34
  , {
35
- "__SPlotA11yView": "___SPlotA11yView_f421s_gg_",
36
- "_focus-within": "__focus-within_f421s_gg_"
35
+ "__SPlotA11yView": "___SPlotA11yView_r249z_gg_",
36
+ "_focus-within": "__focus-within_r249z_gg_"
37
37
  });
38
38
  import { Box } from '@semcore/flex-box';
39
39
  export var PlotA11yView = function PlotA11yView(_ref3) {
package/package.json CHANGED
@@ -1,17 +1,13 @@
1
1
  {
2
2
  "name": "@semcore/d3-chart",
3
3
  "description": "Semrush D3 Chart Component",
4
- "version": "2.3.7",
4
+ "version": "2.4.0",
5
5
  "main": "lib/cjs/index.js",
6
6
  "module": "lib/es6/index.js",
7
7
  "typings": "lib/types/index.d.ts",
8
8
  "sideEffects": false,
9
9
  "author": "UI-kit team <ui-kit-team@semrush.com>",
10
10
  "license": "MIT",
11
- "scripts": {
12
- "build": "pnpm semcore-builder --source=js,ts",
13
- "test": "jest"
14
- },
15
11
  "dependencies": {
16
12
  "@formatjs/intl": "2.3.0",
17
13
  "@semcore/animation": "^1",
@@ -29,8 +25,8 @@
29
25
  "resize-observer-polyfill": "1.5.1"
30
26
  },
31
27
  "peerDependencies": {
32
- "@semcore/core": "^1.11",
33
- "react": "16.8 - 17"
28
+ "@semcore/core": "^1.12",
29
+ "react": "16.8 - 18"
34
30
  },
35
31
  "jest": {
36
32
  "preset": "@semcore/jest-preset-ui"
@@ -41,7 +37,7 @@
41
37
  "directory": "semcore/d3-chart"
42
38
  },
43
39
  "devDependencies": {
44
- "@types/react": "16.8 - 17",
40
+ "@types/react": "18.0.21",
45
41
  "@semcore/babel-plugin-react-semcore": "^4.2.1",
46
42
  "@semcore/button": "*",
47
43
  "@semcore/checkbox": "*",
@@ -51,6 +47,11 @@
51
47
  "@semcore/typography": "*",
52
48
  "@types/d3-array": "^3.0.2",
53
49
  "@types/d3-scale": "^4.0.2",
54
- "@types/d3-transition": "^3.0.1"
50
+ "@types/d3-transition": "^3.0.1",
51
+ "jest": "29.0.1"
52
+ },
53
+ "scripts": {
54
+ "build": "pnpm semcore-builder --source=js,ts",
55
+ "test": "jest"
55
56
  }
56
- }
57
+ }