@neo4j-ndl/react-charts 1.3.0 → 1.3.1-alpha.c774957.15.1

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.
@@ -48,10 +48,10 @@ const ChartTooltipTitle = function ChartTooltipTitle({ children, ref, }) {
48
48
  };
49
49
  const ChartTooltipContent = function ChartTooltipContent({ leadingElement, trailingElement, indentSquareColor, notifications, ref, }) {
50
50
  const classes = (0, classnames_1.default)(`ndl-charts-chart-tooltip-content`);
51
- return ((0, jsx_runtime_1.jsxs)("div", { ref: ref, className: classes, children: [(0, jsx_runtime_1.jsxs)("div", { className: "ndl-charts-chart-tooltip-content-line", children: [indentSquareColor && ((0, jsx_runtime_1.jsx)("div", { className: "ndl-charts-chart-tooltip-content-indent-square", style: { backgroundColor: indentSquareColor } })), leadingElement && ((0, jsx_runtime_1.jsx)(react_1.Typography, { variant: trailingElement ? 'body-medium' : 'label', className: "ndl-charts-chart-tooltip-content-left-element", children: leadingElement })), trailingElement && ((0, jsx_runtime_1.jsx)(react_1.Typography, { variant: "label", className: "ndl-charts-chart-tooltip-content-trailing-element", children: trailingElement }))] }), notifications &&
51
+ return ((0, jsx_runtime_1.jsxs)("div", { ref: ref, className: classes, children: [(0, jsx_runtime_1.jsxs)("div", { className: "ndl-charts-chart-tooltip-content-line", children: [indentSquareColor && ((0, jsx_runtime_1.jsx)("div", { className: "ndl-charts-chart-tooltip-content-indent-square", style: { backgroundColor: indentSquareColor } })), leadingElement && ((0, jsx_runtime_1.jsx)(react_1.Typography, { variant: trailingElement ? 'body-medium' : 'label', className: "ndl-charts-chart-tooltip-content-left-element", children: leadingElement })), trailingElement && ((0, jsx_runtime_1.jsx)(react_1.Typography, { variant: "title-4", className: "ndl-charts-chart-tooltip-content-trailing-element", children: trailingElement }))] }), notifications &&
52
52
  notifications.map((notification) => {
53
53
  const { id, notificationType, leadingElement, trailingElement } = notification;
54
- return ((0, jsx_runtime_1.jsxs)("div", { className: `ndl-charts-chart-tooltip-content-notification ndl-notification-${notificationType}`, children: [(0, jsx_runtime_1.jsx)(react_1.StatusIndicator, { variant: notificationType }), (0, jsx_runtime_1.jsx)(react_1.Typography, { variant: "body-medium", className: "ndl-charts-chart-tooltip-content-notification-left-element", children: leadingElement }), (0, jsx_runtime_1.jsx)(react_1.Typography, { variant: "label", className: "ndl-charts-chart-tooltip-content-notification-trailing-element", children: trailingElement })] }, `notification-${id}`));
54
+ return ((0, jsx_runtime_1.jsxs)("div", { className: `ndl-charts-chart-tooltip-content-notification ndl-notification-${notificationType}`, children: [(0, jsx_runtime_1.jsx)(react_1.StatusIndicator, { variant: notificationType }), (0, jsx_runtime_1.jsx)(react_1.Typography, { variant: "body-medium", className: "ndl-charts-chart-tooltip-content-notification-left-element", children: leadingElement }), (0, jsx_runtime_1.jsx)(react_1.Typography, { variant: "title-4", className: "ndl-charts-chart-tooltip-content-notification-trailing-element", children: trailingElement })] }, `notification-${id}`));
55
55
  })] }));
56
56
  };
57
57
  const ChartTooltipLink = function ChartTooltipAction(_a) {
@@ -1 +1 @@
1
- {"version":3,"file":"ChartTooltip.js","sourceRoot":"","sources":["../../../src/charts/ChartTooltip.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,4CAK0B;AAC1B,4DAAoC;AAQ7B,MAAM,qBAAqB,GAAG,SAAS,qBAAqB,CAAC,EAClE,QAAQ,EACR,MAAM,EACN,KAAK,EACL,cAAc,EACd,GAAG,GACe;IAClB,OAAO,CACL,uBAAC,eAAO,IACN,MAAM,EAAE,MAAM,EACd,cAAc,EAAE,cAAc,EAC9B,SAAS,EAAC,yBAAyB,YAEnC,uBAAC,eAAO,CAAC,OAAO,IAAC,GAAG,EAAE,GAAG,EAAE,KAAK,EAAE,KAAK,YACpC,QAAQ,GACO,GACV,CACX,CAAC;AACJ,CAAC,CAAC;AAlBW,QAAA,qBAAqB,yBAkBhC;AAOF,MAAM,iBAAiB,G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T,OAAO,EAAC,aAAa,EACrB,SAAS,EAAC,4DAA4D,YAErE,cAAc,GACJ,EACb,uBAAC,kBAAU,IACT,OAAO,EAAC,OAAO,EACf,SAAS,EAAC,gEAAgE,YAEzE,eAAe,GACL,KAfR,gBAAgB,EAAE,EAAE,CAgBrB,CACP,CAAC;gBACJ,CAAC,CAAC,IACA,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,gBAAgB,GAAG,SAAS,kBAAkB,CAAC,EAGb;QAHa,EACnD,GAAG,OAEmC,EADnC,SAAS,cAFuC,OAGpD,CADa;IAEZ,OAAO,uBAAC,gBAAQ,kBAAC,GAAG,EAAE,GAAG,IAAM,SAAS,EAAI,CAAC;AAC/C,CAAC,CAAC;AAEF,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,CAAC,6BAAqB,EAAE;IACxD,OAAO,EAAE,mBAAmB;IAC5B,IAAI,EAAE,gBAAgB;IACtB,KAAK,EAAE,iBAAiB;CACzB,CAAC,CAAC;AAEM,oCAAY","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\nimport {\n Popover,\n StatusIndicator,\n TextLink,\n Typography,\n} from '@neo4j-ndl/react';\nimport classNames from 'classnames';\nimport type React from 'react';\n\nimport {\n type ChartTooltipContentProps,\n type ChartTooltipProps,\n} from './utils/chart-types';\n\nexport const ChartTooltipComponent = function ChartTooltipComponent({\n children,\n isOpen,\n style,\n anchorPosition,\n ref,\n}: ChartTooltipProps) {\n return (\n <Popover\n isOpen={isOpen}\n anchorPosition={anchorPosition}\n placement=\"middle-end-middle-start\"\n >\n <Popover.Content ref={ref} style={style}>\n {children}\n </Popover.Content>\n </Popover>\n );\n};\n\ntype ChartTooltipTitleProps = {\n children: React.ReactNode;\n ref?: React.Ref<HTMLSpanElement>;\n};\n\nconst ChartTooltipTitle = function ChartTooltipTitle({\n children,\n ref,\n}: ChartTooltipTitleProps) {\n const classes = classNames(`ndl-charts-chart-tooltip-title`);\n\n return (\n <Typography ref={ref} variant=\"body-small\" className={classes}>\n {children}\n </Typography>\n );\n};\n\nconst ChartTooltipContent = function ChartTooltipContent({\n leadingElement,\n trailingElement,\n indentSquareColor,\n notifications,\n ref,\n}: ChartTooltipContentProps) {\n const classes = classNames(`ndl-charts-chart-tooltip-content`);\n\n return (\n <div ref={ref} className={classes}>\n <div className=\"ndl-charts-chart-tooltip-content-line\">\n {indentSquareColor && (\n <div\n className=\"ndl-charts-chart-tooltip-content-indent-square\"\n style={{ backgroundColor: indentSquareColor }}\n />\n )}\n {leadingElement && (\n <Typography\n variant={trailingElement ? 'body-medium' : 'label'}\n className=\"ndl-charts-chart-tooltip-content-left-element\"\n >\n {leadingElement}\n </Typography>\n )}\n {trailingElement && (\n <Typography\n variant=\"label\"\n className=\"ndl-charts-chart-tooltip-content-trailing-element\"\n >\n {trailingElement}\n </Typography>\n )}\n </div>\n\n {notifications &&\n notifications.map((notification) => {\n const { id, notificationType, leadingElement, trailingElement } =\n notification;\n\n return (\n <div\n key={`notification-${id}`}\n className={`ndl-charts-chart-tooltip-content-notification ndl-notification-${notificationType}`}\n >\n <StatusIndicator variant={notificationType} />\n <Typography\n variant=\"body-medium\"\n className=\"ndl-charts-chart-tooltip-content-notification-left-element\"\n >\n {leadingElement}\n </Typography>\n <Typography\n variant=\"label\"\n className=\"ndl-charts-chart-tooltip-content-notification-trailing-element\"\n >\n {trailingElement}\n </Typography>\n </div>\n );\n })}\n </div>\n );\n};\n\nconst ChartTooltipLink = function ChartTooltipAction({\n ref,\n ...restProps\n}: React.ComponentProps<typeof TextLink>) {\n return <TextLink ref={ref} {...restProps} />;\n};\n\nconst ChartTooltip = Object.assign(ChartTooltipComponent, {\n Content: ChartTooltipContent,\n Link: ChartTooltipLink,\n Title: ChartTooltipTitle,\n});\n\nexport { ChartTooltip };\n"]}
1
+ {"version":3,"file":"ChartTooltip.js","sourceRoot":"","sources":["../../../src/charts/ChartTooltip.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,4CAK0B;AAC1B,4DAAoC;AAQ7B,MAAM,qBAAqB,GAAG,SAAS,qBAAqB,CAAC,EAClE,QAAQ,EACR,MAAM,EACN,KAAK,EACL,cAAc,EACd,GAAG,GACe;IAClB,OAAO,CACL,uBAAC,eAAO,IACN,MAAM,EAAE,MAAM,EACd,cAAc,EAAE,cAAc,EAC9B,SAAS,EAAC,yBAAyB,YAEnC,uBAAC,eAAO,CAAC,OAAO,IAAC,GAAG,EAAE,GAAG,EAAE,KAAK,EAAE,KAAK,YACpC,QAAQ,GACO,GACV,CACX,CAAC;AACJ,CAAC,CAAC;AAlBW,QAAA,qBAAqB,yBAkBhC;AAOF,MAAM,iBAAiB,GAAG,SAAS,iBAAiB,CAAC,EACnD,QAAQ,EACR,GAAG,GACoB;IACvB,MAAM,OAAO,GAAG,IAAA,oBAAU,EAAC,gCAAgC,CAAC,CAAC;IAE7D,OAAO,CACL,uBAAC,kBAAU,IAAC,GAAG,EAAE,GAAG,EAAE,OAAO,EAAC,YAAY,EAAC,SAAS,EAAE,OAAO,YAC1D,QAAQ,GACE,CACd,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,mBAAmB,GAAG,SAAS,mBAAmB,CAAC,EACvD,cAAc,EACd,eAAe,EACf,iBAAiB,EACjB,aAAa,EACb,GAAG,GACsB;IACzB,MAAM,OAAO,GAAG,IAAA,oBAAU,EAAC,kCAAkC,CAAC,C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/C,CAAC,CAAC;AAEF,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,CAAC,6BAAqB,EAAE;IACxD,OAAO,EAAE,mBAAmB;IAC5B,IAAI,EAAE,gBAAgB;IACtB,KAAK,EAAE,iBAAiB;CACzB,CAAC,CAAC;AAEM,oCAAY","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\nimport {\n Popover,\n StatusIndicator,\n TextLink,\n Typography,\n} from '@neo4j-ndl/react';\nimport classNames from 'classnames';\nimport type React from 'react';\n\nimport {\n type ChartTooltipContentProps,\n type ChartTooltipProps,\n} from './utils/chart-types';\n\nexport const ChartTooltipComponent = function ChartTooltipComponent({\n children,\n isOpen,\n style,\n anchorPosition,\n ref,\n}: ChartTooltipProps) {\n return (\n <Popover\n isOpen={isOpen}\n anchorPosition={anchorPosition}\n placement=\"middle-end-middle-start\"\n >\n <Popover.Content ref={ref} style={style}>\n {children}\n </Popover.Content>\n </Popover>\n );\n};\n\ntype ChartTooltipTitleProps = {\n children: React.ReactNode;\n ref?: React.Ref<HTMLSpanElement>;\n};\n\nconst ChartTooltipTitle = function ChartTooltipTitle({\n children,\n ref,\n}: ChartTooltipTitleProps) {\n const classes = classNames(`ndl-charts-chart-tooltip-title`);\n\n return (\n <Typography ref={ref} variant=\"body-small\" className={classes}>\n {children}\n </Typography>\n );\n};\n\nconst ChartTooltipContent = function ChartTooltipContent({\n leadingElement,\n trailingElement,\n indentSquareColor,\n notifications,\n ref,\n}: ChartTooltipContentProps) {\n const classes = classNames(`ndl-charts-chart-tooltip-content`);\n\n return (\n <div ref={ref} className={classes}>\n <div className=\"ndl-charts-chart-tooltip-content-line\">\n {indentSquareColor && (\n <div\n className=\"ndl-charts-chart-tooltip-content-indent-square\"\n style={{ backgroundColor: indentSquareColor }}\n />\n )}\n {leadingElement && (\n <Typography\n variant={trailingElement ? 'body-medium' : 'label'}\n className=\"ndl-charts-chart-tooltip-content-left-element\"\n >\n {leadingElement}\n </Typography>\n )}\n {trailingElement && (\n <Typography\n variant=\"title-4\"\n className=\"ndl-charts-chart-tooltip-content-trailing-element\"\n >\n {trailingElement}\n </Typography>\n )}\n </div>\n\n {notifications &&\n notifications.map((notification) => {\n const { id, notificationType, leadingElement, trailingElement } =\n notification;\n\n return (\n <div\n key={`notification-${id}`}\n className={`ndl-charts-chart-tooltip-content-notification ndl-notification-${notificationType}`}\n >\n <StatusIndicator variant={notificationType} />\n <Typography\n variant=\"body-medium\"\n className=\"ndl-charts-chart-tooltip-content-notification-left-element\"\n >\n {leadingElement}\n </Typography>\n <Typography\n variant=\"title-4\"\n className=\"ndl-charts-chart-tooltip-content-notification-trailing-element\"\n >\n {trailingElement}\n </Typography>\n </div>\n );\n })}\n </div>\n );\n};\n\nconst ChartTooltipLink = function ChartTooltipAction({\n ref,\n ...restProps\n}: React.ComponentProps<typeof TextLink>) {\n return <TextLink ref={ref} {...restProps} />;\n};\n\nconst ChartTooltip = Object.assign(ChartTooltipComponent, {\n Content: ChartTooltipContent,\n Link: ChartTooltipLink,\n Title: ChartTooltipTitle,\n});\n\nexport { ChartTooltip };\n"]}
@@ -41,10 +41,10 @@ const ChartTooltipTitle = function ChartTooltipTitle({ children, ref, }) {
41
41
  };
42
42
  const ChartTooltipContent = function ChartTooltipContent({ leadingElement, trailingElement, indentSquareColor, notifications, ref, }) {
43
43
  const classes = classNames(`ndl-charts-chart-tooltip-content`);
44
- return (_jsxs("div", { ref: ref, className: classes, children: [_jsxs("div", { className: "ndl-charts-chart-tooltip-content-line", children: [indentSquareColor && (_jsx("div", { className: "ndl-charts-chart-tooltip-content-indent-square", style: { backgroundColor: indentSquareColor } })), leadingElement && (_jsx(Typography, { variant: trailingElement ? 'body-medium' : 'label', className: "ndl-charts-chart-tooltip-content-left-element", children: leadingElement })), trailingElement && (_jsx(Typography, { variant: "label", className: "ndl-charts-chart-tooltip-content-trailing-element", children: trailingElement }))] }), notifications &&
44
+ return (_jsxs("div", { ref: ref, className: classes, children: [_jsxs("div", { className: "ndl-charts-chart-tooltip-content-line", children: [indentSquareColor && (_jsx("div", { className: "ndl-charts-chart-tooltip-content-indent-square", style: { backgroundColor: indentSquareColor } })), leadingElement && (_jsx(Typography, { variant: trailingElement ? 'body-medium' : 'label', className: "ndl-charts-chart-tooltip-content-left-element", children: leadingElement })), trailingElement && (_jsx(Typography, { variant: "title-4", className: "ndl-charts-chart-tooltip-content-trailing-element", children: trailingElement }))] }), notifications &&
45
45
  notifications.map((notification) => {
46
46
  const { id, notificationType, leadingElement, trailingElement } = notification;
47
- return (_jsxs("div", { className: `ndl-charts-chart-tooltip-content-notification ndl-notification-${notificationType}`, children: [_jsx(StatusIndicator, { variant: notificationType }), _jsx(Typography, { variant: "body-medium", className: "ndl-charts-chart-tooltip-content-notification-left-element", children: leadingElement }), _jsx(Typography, { variant: "label", className: "ndl-charts-chart-tooltip-content-notification-trailing-element", children: trailingElement })] }, `notification-${id}`));
47
+ return (_jsxs("div", { className: `ndl-charts-chart-tooltip-content-notification ndl-notification-${notificationType}`, children: [_jsx(StatusIndicator, { variant: notificationType }), _jsx(Typography, { variant: "body-medium", className: "ndl-charts-chart-tooltip-content-notification-left-element", children: leadingElement }), _jsx(Typography, { variant: "title-4", className: "ndl-charts-chart-tooltip-content-notification-trailing-element", children: trailingElement })] }, `notification-${id}`));
48
48
  })] }));
49
49
  };
50
50
  const ChartTooltipLink = function ChartTooltipAction(_a) {
@@ -1 +1 @@
1
- {"version":3,"file":"Ch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["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\nimport {\n Popover,\n StatusIndicator,\n TextLink,\n Typography,\n} from '@neo4j-ndl/react';\nimport classNames from 'classnames';\nimport type React from 'react';\n\nimport {\n type ChartTooltipContentProps,\n type ChartTooltipProps,\n} from './utils/chart-types';\n\nexport const ChartTooltipComponent = function ChartTooltipComponent({\n children,\n isOpen,\n style,\n anchorPosition,\n ref,\n}: ChartTooltipProps) {\n return (\n <Popover\n isOpen={isOpen}\n anchorPosition={anchorPosition}\n placement=\"middle-end-middle-start\"\n >\n <Popover.Content ref={ref} style={style}>\n {children}\n </Popover.Content>\n </Popover>\n );\n};\n\ntype ChartTooltipTitleProps = {\n children: React.ReactNode;\n ref?: React.Ref<HTMLSpanElement>;\n};\n\nconst ChartTooltipTitle = function ChartTooltipTitle({\n children,\n ref,\n}: ChartTooltipTitleProps) {\n const classes = classNames(`ndl-charts-chart-tooltip-title`);\n\n return (\n <Typography ref={ref} variant=\"body-small\" className={classes}>\n {children}\n </Typography>\n );\n};\n\nconst ChartTooltipContent = function ChartTooltipContent({\n leadingElement,\n trailingElement,\n indentSquareColor,\n notifications,\n ref,\n}: ChartTooltipContentProps) {\n const classes = classNames(`ndl-charts-chart-tooltip-content`);\n\n return (\n <div ref={ref} className={classes}>\n <div className=\"ndl-charts-chart-tooltip-content-line\">\n {indentSquareColor && (\n <div\n className=\"ndl-charts-chart-tooltip-content-indent-square\"\n style={{ backgroundColor: indentSquareColor }}\n />\n )}\n {leadingElement && (\n <Typography\n variant={trailingElement ? 'body-medium' : 'label'}\n className=\"ndl-charts-chart-tooltip-content-left-element\"\n >\n {leadingElement}\n </Typography>\n )}\n {trailingElement && (\n <Typography\n variant=\"label\"\n className=\"ndl-charts-chart-tooltip-content-trailing-element\"\n >\n {trailingElement}\n </Typography>\n )}\n </div>\n\n {notifications &&\n notifications.map((notification) => {\n const { id, notificationType, leadingElement, trailingElement } =\n notification;\n\n return (\n <div\n key={`notification-${id}`}\n className={`ndl-charts-chart-tooltip-content-notification ndl-notification-${notificationType}`}\n >\n <StatusIndicator variant={notificationType} />\n <Typography\n variant=\"body-medium\"\n className=\"ndl-charts-chart-tooltip-content-notification-left-element\"\n >\n {leadingElement}\n </Typography>\n <Typography\n variant=\"label\"\n className=\"ndl-charts-chart-tooltip-content-notification-trailing-element\"\n >\n {trailingElement}\n </Typography>\n </div>\n );\n })}\n </div>\n );\n};\n\nconst ChartTooltipLink = function ChartTooltipAction({\n ref,\n ...restProps\n}: React.ComponentProps<typeof TextLink>) {\n return <TextLink ref={ref} {...restProps} />;\n};\n\nconst ChartTooltip = Object.assign(ChartTooltipComponent, {\n Content: ChartTooltipContent,\n Link: ChartTooltipLink,\n Title: ChartTooltipTitle,\n});\n\nexport { ChartTooltip };\n"]}
1
+ {"version":3,"file":"ChartTooltip.js","sourceRoot":"","sources":["../../../src/charts/ChartTooltip.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,EACL,OAAO,EACP,eAAe,EACf,QAAQ,EACR,UAAU,GACX,MAAM,kBAAkB,CAAC;AAC1B,OAAO,UAAU,MAAM,YAAY,CAAC;AAQpC,MAAM,CAAC,MAAM,qBAAqB,GAAG,SAAS,qBAAqB,CAAC,EAClE,QAAQ,EACR,MAAM,EACN,KAAK,EACL,cAAc,EACd,GAAG,GACe;IAClB,OAAO,CACL,KAAC,OAAO,IACN,MAAM,EAAE,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AE,cAAc,EAAE,eAAe,EAAE,GAC7D,YAAY,CAAC;oBAEf,OAAO,CACL,eAEE,SAAS,EAAE,kEAAkE,gBAAgB,EAAE,aAE/F,KAAC,eAAe,IAAC,OAAO,EAAE,gBAAgB,GAAI,EAC9C,KAAC,UAAU,IACT,OAAO,EAAC,aAAa,EACrB,SAAS,EAAC,4DAA4D,YAErE,cAAc,GACJ,EACb,KAAC,UAAU,IACT,OAAO,EAAC,SAAS,EACjB,SAAS,EAAC,gEAAgE,YAEzE,eAAe,GACL,KAfR,gBAAgB,EAAE,EAAE,CAgBrB,CACP,CAAC;gBACJ,CAAC,CAAC,IACA,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,gBAAgB,GAAG,SAAS,kBAAkB,CAAC,EAGb;QAHa,EACnD,GAAG,OAEmC,EADnC,SAAS,cAFuC,OAGpD,CADa;IAEZ,OAAO,KAAC,QAAQ,kBAAC,GAAG,EAAE,GAAG,IAAM,SAAS,EAAI,CAAC;AAC/C,CAAC,CAAC;AAEF,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,CAAC,qBAAqB,EAAE;IACxD,OAAO,EAAE,mBAAmB;IAC5B,IAAI,EAAE,gBAAgB;IACtB,KAAK,EAAE,iBAAiB;CACzB,CAAC,CAAC;AAEH,OAAO,EAAE,YAAY,EAAE,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\nimport {\n Popover,\n StatusIndicator,\n TextLink,\n Typography,\n} from '@neo4j-ndl/react';\nimport classNames from 'classnames';\nimport type React from 'react';\n\nimport {\n type ChartTooltipContentProps,\n type ChartTooltipProps,\n} from './utils/chart-types';\n\nexport const ChartTooltipComponent = function ChartTooltipComponent({\n children,\n isOpen,\n style,\n anchorPosition,\n ref,\n}: ChartTooltipProps) {\n return (\n <Popover\n isOpen={isOpen}\n anchorPosition={anchorPosition}\n placement=\"middle-end-middle-start\"\n >\n <Popover.Content ref={ref} style={style}>\n {children}\n </Popover.Content>\n </Popover>\n );\n};\n\ntype ChartTooltipTitleProps = {\n children: React.ReactNode;\n ref?: React.Ref<HTMLSpanElement>;\n};\n\nconst ChartTooltipTitle = function ChartTooltipTitle({\n children,\n ref,\n}: ChartTooltipTitleProps) {\n const classes = classNames(`ndl-charts-chart-tooltip-title`);\n\n return (\n <Typography ref={ref} variant=\"body-small\" className={classes}>\n {children}\n </Typography>\n );\n};\n\nconst ChartTooltipContent = function ChartTooltipContent({\n leadingElement,\n trailingElement,\n indentSquareColor,\n notifications,\n ref,\n}: ChartTooltipContentProps) {\n const classes = classNames(`ndl-charts-chart-tooltip-content`);\n\n return (\n <div ref={ref} className={classes}>\n <div className=\"ndl-charts-chart-tooltip-content-line\">\n {indentSquareColor && (\n <div\n className=\"ndl-charts-chart-tooltip-content-indent-square\"\n style={{ backgroundColor: indentSquareColor }}\n />\n )}\n {leadingElement && (\n <Typography\n variant={trailingElement ? 'body-medium' : 'label'}\n className=\"ndl-charts-chart-tooltip-content-left-element\"\n >\n {leadingElement}\n </Typography>\n )}\n {trailingElement && (\n <Typography\n variant=\"title-4\"\n className=\"ndl-charts-chart-tooltip-content-trailing-element\"\n >\n {trailingElement}\n </Typography>\n )}\n </div>\n\n {notifications &&\n notifications.map((notification) => {\n const { id, notificationType, leadingElement, trailingElement } =\n notification;\n\n return (\n <div\n key={`notification-${id}`}\n className={`ndl-charts-chart-tooltip-content-notification ndl-notification-${notificationType}`}\n >\n <StatusIndicator variant={notificationType} />\n <Typography\n variant=\"body-medium\"\n className=\"ndl-charts-chart-tooltip-content-notification-left-element\"\n >\n {leadingElement}\n </Typography>\n <Typography\n variant=\"title-4\"\n className=\"ndl-charts-chart-tooltip-content-notification-trailing-element\"\n >\n {trailingElement}\n </Typography>\n </div>\n );\n })}\n </div>\n );\n};\n\nconst ChartTooltipLink = function ChartTooltipAction({\n ref,\n ...restProps\n}: React.ComponentProps<typeof TextLink>) {\n return <TextLink ref={ref} {...restProps} />;\n};\n\nconst ChartTooltip = Object.assign(ChartTooltipComponent, {\n Content: ChartTooltipContent,\n Link: ChartTooltipLink,\n Title: ChartTooltipTitle,\n});\n\nexport { ChartTooltip };\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@neo4j-ndl/react-charts",
3
- "version": "1.3.0",
3
+ "version": "1.3.1-alpha.c774957.15.1",
4
4
  "sideEffects": false,
5
5
  "description": "React implementation of charts from Neo4j Design System",
6
6
  "keywords": [
@@ -56,12 +56,14 @@
56
56
  "peerDependencies": {
57
57
  "react": ">=19.0.0",
58
58
  "react-dom": ">=19.0.0",
59
- "@neo4j-ndl/react": "^4.21.1",
60
- "@neo4j-ndl/base": "^4.20.1"
59
+ "@neo4j-ndl/react": "^4.21.2-alpha.c774957.15.1",
60
+ "@neo4j-ndl/base": "^4.20.2-alpha.c774957.15.1"
61
61
  },
62
62
  "dependencies": {
63
63
  "classnames": "2.5.1",
64
- "echarts": "6.1.0"
64
+ "echarts": "6.1.0",
65
+ "@neo4j-ndl/base": "4.20.2-alpha.c774957.15.1",
66
+ "@neo4j-ndl/react": "4.21.2-alpha.c774957.15.1"
65
67
  },
66
68
  "scripts": {
67
69
  "test": "pnpm run test:playwright",