@semcore/d3-chart 18.0.0-prerelease.2 → 18.0.0-prerelease.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +45 -3
- package/README.md +0 -1
- package/lib/cjs/Area.js +12 -12
- package/lib/cjs/Bar.js +16 -16
- package/lib/cjs/Bubble.js +14 -14
- package/lib/cjs/CompactHorizontalBar.js +17 -17
- package/lib/cjs/CompactHorizontalBar.js.map +1 -1
- package/lib/cjs/Donut.js +9 -9
- package/lib/cjs/Dots.js +12 -12
- package/lib/cjs/GroupBar.js +5 -2
- package/lib/cjs/GroupBar.js.map +1 -1
- package/lib/cjs/HorizontalBar.js +16 -16
- package/lib/cjs/Hover.js +2 -13
- package/lib/cjs/Hover.js.map +1 -1
- package/lib/cjs/Line.js +9 -9
- package/lib/cjs/RadialTree.js +12 -12
- package/lib/cjs/Reference.js +12 -12
- package/lib/cjs/ScatterPlot.js +9 -9
- package/lib/cjs/Tooltip.js +12 -12
- package/lib/cjs/Venn.js +9 -9
- package/lib/cjs/component/Chart/AbstractChart.js +20 -17
- package/lib/cjs/component/Chart/AbstractChart.js.map +1 -1
- package/lib/cjs/component/Chart/AbstractChart.type.js.map +1 -1
- package/lib/cjs/component/Chart/AreaChart.js +1 -1
- package/lib/cjs/component/Chart/AreaChart.js.map +1 -1
- package/lib/cjs/component/Chart/AreaChart.type.js.map +1 -1
- package/lib/cjs/component/Chart/BarChart.js +12 -6
- package/lib/cjs/component/Chart/BarChart.js.map +1 -1
- package/lib/cjs/component/Chart/BarChart.type.js.map +1 -1
- package/lib/cjs/component/Chart/CigaretteChart.js +5 -1
- package/lib/cjs/component/Chart/CigaretteChart.js.map +1 -1
- package/lib/cjs/component/Chart/HistogramChart.js +1 -1
- package/lib/cjs/component/Chart/HistogramChart.js.map +1 -1
- package/lib/cjs/component/Chart/HistogramChart.type.js.map +1 -1
- package/lib/cjs/component/Chart/LineChart.js +1 -1
- package/lib/cjs/component/Chart/LineChart.js.map +1 -1
- package/lib/cjs/component/Chart/LineChart.type.js.map +1 -1
- package/lib/cjs/component/ChartLegend/BaseLegend.js +0 -4
- package/lib/cjs/component/ChartLegend/BaseLegend.js.map +1 -1
- package/lib/cjs/component/ChartLegend/LegendItem/LegendItem.js +3 -1
- package/lib/cjs/component/ChartLegend/LegendItem/LegendItem.js.map +1 -1
- package/lib/cjs/component/ChartLegend/LegendTable/LegendTable.js +28 -21
- package/lib/cjs/component/ChartLegend/LegendTable/LegendTable.js.map +1 -1
- package/lib/cjs/component/ChartLegend/LegendTable/LegendTable.type.js.map +1 -1
- package/lib/cjs/component/ChartLegend/LegendTable/legend-table.shadow.css +30 -14
- package/lib/cjs/component/Cigarette/Cigarette.js +0 -1
- package/lib/cjs/component/Cigarette/Cigarette.js.map +1 -1
- package/lib/cjs/component/Metric/Metric.js +78 -0
- package/lib/cjs/component/Metric/Metric.js.map +1 -0
- package/lib/cjs/component/Metric/Metric.type.js +2 -0
- package/lib/cjs/component/Metric/Metric.type.js.map +1 -0
- package/lib/cjs/index.js +8 -8
- package/lib/cjs/index.js.map +1 -1
- package/lib/cjs/style/abstract-chart.shadow.css +1 -1
- package/lib/cjs/style/area.shadow.css +0 -2
- package/lib/cjs/style/bar.shadow.css +1 -3
- package/lib/cjs/style/bubble.shadow.css +1 -3
- package/lib/cjs/style/donut.shadow.css +1 -3
- package/lib/cjs/style/dot.shadow.css +1 -3
- package/lib/cjs/style/line.shadow.css +0 -2
- package/lib/cjs/style/radial-tree.shadow.css +1 -3
- package/lib/cjs/style/reference.shadow.css +1 -1
- package/lib/cjs/style/scatterplot.shadow.css +1 -3
- package/lib/cjs/style/tooltip.shadow.css +0 -2
- package/lib/cjs/style/venn.shadow.css +0 -2
- package/lib/cjs/types/index.d.js +20 -0
- package/lib/cjs/types/index.d.js.map +1 -1
- package/lib/es6/Area.js +12 -12
- package/lib/es6/Bar.js +16 -16
- package/lib/es6/Bubble.js +14 -14
- package/lib/es6/CompactHorizontalBar.js +17 -17
- package/lib/es6/CompactHorizontalBar.js.map +1 -1
- package/lib/es6/Donut.js +9 -9
- package/lib/es6/Dots.js +12 -12
- package/lib/es6/GroupBar.js +5 -2
- package/lib/es6/GroupBar.js.map +1 -1
- package/lib/es6/HorizontalBar.js +16 -16
- package/lib/es6/Hover.js +2 -13
- package/lib/es6/Hover.js.map +1 -1
- package/lib/es6/Line.js +9 -9
- package/lib/es6/RadialTree.js +12 -12
- package/lib/es6/Reference.js +12 -12
- package/lib/es6/ScatterPlot.js +9 -9
- package/lib/es6/Tooltip.js +12 -12
- package/lib/es6/Venn.js +9 -9
- package/lib/es6/component/Chart/AbstractChart.js +20 -17
- package/lib/es6/component/Chart/AbstractChart.js.map +1 -1
- package/lib/es6/component/Chart/AbstractChart.type.js.map +1 -1
- package/lib/es6/component/Chart/AreaChart.js +1 -1
- package/lib/es6/component/Chart/AreaChart.js.map +1 -1
- package/lib/es6/component/Chart/AreaChart.type.js.map +1 -1
- package/lib/es6/component/Chart/BarChart.js +12 -6
- package/lib/es6/component/Chart/BarChart.js.map +1 -1
- package/lib/es6/component/Chart/BarChart.type.js.map +1 -1
- package/lib/es6/component/Chart/CigaretteChart.js +5 -1
- package/lib/es6/component/Chart/CigaretteChart.js.map +1 -1
- package/lib/es6/component/Chart/HistogramChart.js +1 -1
- package/lib/es6/component/Chart/HistogramChart.js.map +1 -1
- package/lib/es6/component/Chart/HistogramChart.type.js.map +1 -1
- package/lib/es6/component/Chart/LineChart.js +1 -1
- package/lib/es6/component/Chart/LineChart.js.map +1 -1
- package/lib/es6/component/Chart/LineChart.type.js.map +1 -1
- package/lib/es6/component/ChartLegend/BaseLegend.js +0 -4
- package/lib/es6/component/ChartLegend/BaseLegend.js.map +1 -1
- package/lib/es6/component/ChartLegend/LegendItem/LegendItem.js +3 -1
- package/lib/es6/component/ChartLegend/LegendItem/LegendItem.js.map +1 -1
- package/lib/es6/component/ChartLegend/LegendTable/LegendTable.js +28 -21
- package/lib/es6/component/ChartLegend/LegendTable/LegendTable.js.map +1 -1
- package/lib/es6/component/ChartLegend/LegendTable/LegendTable.type.js.map +1 -1
- package/lib/es6/component/ChartLegend/LegendTable/legend-table.shadow.css +30 -14
- package/lib/es6/component/Cigarette/Cigarette.js +0 -1
- package/lib/es6/component/Cigarette/Cigarette.js.map +1 -1
- package/lib/es6/component/Metric/Metric.js +72 -0
- package/lib/es6/component/Metric/Metric.js.map +1 -0
- package/lib/es6/component/Metric/Metric.type.js +2 -0
- package/lib/es6/component/Metric/Metric.type.js.map +1 -0
- package/lib/es6/index.js +1 -1
- package/lib/es6/index.js.map +1 -1
- package/lib/es6/style/abstract-chart.shadow.css +1 -1
- package/lib/es6/style/area.shadow.css +0 -2
- package/lib/es6/style/bar.shadow.css +1 -3
- package/lib/es6/style/bubble.shadow.css +1 -3
- package/lib/es6/style/donut.shadow.css +1 -3
- package/lib/es6/style/dot.shadow.css +1 -3
- package/lib/es6/style/line.shadow.css +0 -2
- package/lib/es6/style/radial-tree.shadow.css +1 -3
- package/lib/es6/style/reference.shadow.css +1 -1
- package/lib/es6/style/scatterplot.shadow.css +1 -3
- package/lib/es6/style/tooltip.shadow.css +0 -2
- package/lib/es6/style/venn.shadow.css +0 -2
- package/lib/es6/types/index.d.js +5 -7
- package/lib/es6/types/index.d.js.map +1 -1
- package/lib/esm/Area.mjs +13 -13
- package/lib/esm/Bar.mjs +17 -17
- package/lib/esm/Bubble.mjs +15 -15
- package/lib/esm/CompactHorizontalBar.mjs +18 -18
- package/lib/esm/Donut.mjs +10 -10
- package/lib/esm/Dots.mjs +13 -13
- package/lib/esm/GroupBar.mjs +5 -2
- package/lib/esm/HorizontalBar.mjs +17 -17
- package/lib/esm/Hover.mjs +2 -13
- package/lib/esm/Line.mjs +10 -10
- package/lib/esm/RadialTree.mjs +13 -13
- package/lib/esm/Reference.mjs +13 -13
- package/lib/esm/ScatterPlot.mjs +10 -10
- package/lib/esm/Tooltip.mjs +13 -13
- package/lib/esm/Venn.mjs +10 -10
- package/lib/esm/component/Chart/AbstractChart.mjs +19 -18
- package/lib/esm/component/Chart/AreaChart.mjs +1 -1
- package/lib/esm/component/Chart/BarChart.mjs +12 -6
- package/lib/esm/component/Chart/CigaretteChart.mjs +5 -1
- package/lib/esm/component/Chart/HistogramChart.mjs +1 -1
- package/lib/esm/component/Chart/LineChart.mjs +1 -1
- package/lib/esm/component/ChartLegend/BaseLegend.mjs +0 -4
- package/lib/esm/component/ChartLegend/LegendItem/LegendItem.mjs +3 -1
- package/lib/esm/component/ChartLegend/LegendTable/LegendTable.mjs +29 -22
- package/lib/esm/component/ChartLegend/LegendTable/legend-table.shadow.css +30 -14
- package/lib/esm/component/Cigarette/Cigarette.mjs +0 -1
- package/lib/esm/component/Metric/Metric.mjs +62 -0
- package/lib/esm/index.mjs +34 -34
- package/lib/esm/style/abstract-chart.shadow.css +1 -1
- package/lib/esm/style/area.shadow.css +0 -2
- package/lib/esm/style/bar.shadow.css +1 -3
- package/lib/esm/style/bubble.shadow.css +1 -3
- package/lib/esm/style/donut.shadow.css +1 -3
- package/lib/esm/style/dot.shadow.css +1 -3
- package/lib/esm/style/line.shadow.css +0 -2
- package/lib/esm/style/radial-tree.shadow.css +1 -3
- package/lib/esm/style/reference.shadow.css +1 -1
- package/lib/esm/style/scatterplot.shadow.css +1 -3
- package/lib/esm/style/tooltip.shadow.css +0 -2
- package/lib/esm/style/venn.shadow.css +0 -2
- package/lib/types/component/Chart/AbstractChart.d.ts +8 -4
- package/lib/types/component/Chart/AbstractChart.d.ts.map +1 -1
- package/lib/types/component/Chart/AbstractChart.type.d.ts +9 -7
- package/lib/types/component/Chart/AbstractChart.type.d.ts.map +1 -1
- package/lib/types/component/Chart/AreaChart.type.d.ts +1 -1
- package/lib/types/component/Chart/AreaChart.type.d.ts.map +1 -1
- package/lib/types/component/Chart/BarChart.d.ts.map +1 -1
- package/lib/types/component/Chart/BarChart.type.d.ts +3 -1
- package/lib/types/component/Chart/BarChart.type.d.ts.map +1 -1
- package/lib/types/component/Chart/CigaretteChart.d.ts.map +1 -1
- package/lib/types/component/Chart/HistogramChart.type.d.ts +1 -1
- package/lib/types/component/Chart/HistogramChart.type.d.ts.map +1 -1
- package/lib/types/component/Chart/LineChart.type.d.ts +1 -1
- package/lib/types/component/Chart/LineChart.type.d.ts.map +1 -1
- package/lib/types/component/ChartLegend/BaseLegend.d.ts.map +1 -1
- package/lib/types/component/ChartLegend/LegendTable/LegendTable.d.ts.map +1 -1
- package/lib/types/component/ChartLegend/LegendTable/LegendTable.type.d.ts +5 -3
- package/lib/types/component/ChartLegend/LegendTable/LegendTable.type.d.ts.map +1 -1
- package/lib/types/component/Metric/Metric.d.ts +9 -0
- package/lib/types/component/Metric/Metric.d.ts.map +1 -0
- package/lib/types/component/Metric/Metric.type.d.ts +33 -0
- package/lib/types/component/Metric/Metric.type.d.ts.map +1 -0
- package/lib/types/index.d.ts +5 -7
- package/package.json +16 -15
- package/lib/cjs/color.js +0 -132
- package/lib/cjs/color.js.map +0 -1
- package/lib/cjs/style/var.css +0 -125
- package/lib/es6/color.js +0 -127
- package/lib/es6/color.js.map +0 -1
- package/lib/es6/style/var.css +0 -125
- package/lib/esm/color.mjs +0 -127
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LegendTable.js","names":["Box","createComponent","sstyled","Root","React","style","_sstyled","insert","BaseLegend","LegendItemComponent","LegendTableRoot","render","_ref","asProps","_ref3","SLegendTable","styles","Children","size","items","highlightedItem","
|
|
1
|
+
{"version":3,"file":"LegendTable.js","names":["Box","createComponent","sstyled","Root","React","style","_sstyled","insert","BaseLegend","LegendItemComponent","LegendTableRoot","render","_ref","asProps","_ref3","SLegendTable","styles","Children","size","items","highlightedItem","direction","additionsCount","columns","length","rows","createElement","cn","_assignProps","map","legendItem","_index","id","additions","isTransparent","undefined","Fragment","key","additionItem","index","LegendTable","Column","transparent","onMouseEnter","checked","bindOnMouseEnterItem","onMouseLeave","bindOnMouseLeaveItem","_defineProperty","children","LegendItem","ColumnComponent","props","_ref2","arguments[0]","_ref4","SColumnItem","_assignProps2"],"sources":["../../../../../src/component/ChartLegend/LegendTable/LegendTable.tsx"],"sourcesContent":["import { Box } from '@semcore/base-components';\nimport { createComponent, sstyled, Root, type IRootComponentProps } from '@semcore/core';\nimport React from 'react';\n\nimport style from './legend-table.shadow.css';\nimport type { LegendTableType, LegendTableProps, LegendColumnProps, LegendTableDefaultProps } from './LegendTable.type';\nimport { BaseLegend } from '../BaseLegend';\nimport { LegendItemComponent } from '../LegendItem/LegendItem';\n\nclass LegendTableRoot extends BaseLegend<LegendTableProps, [], LegendTableDefaultProps> {\n static displayName = 'LegendTable';\n static style = style;\n\n static defaultProps = () => ({\n children: <LegendTable.LegendItem />,\n });\n\n render() {\n const SLegendTable = Root;\n const { styles, Children, size = 'm', items, highlightedItem } = this.asProps;\n\n if (!items[0]) {\n return null;\n }\n\n const direction = 'columns' in items[0] ? 'columns' : 'rows';\n const additionsCount = ('columns' in items[0]) ? items[0]?.columns.length : items[0]?.rows.length;\n\n return sstyled(styles)(\n <SLegendTable render={Box} additions-count={additionsCount} role='group' additions-direction={direction} items-count={items.length}>\n {items.map((legendItem, _index) => {\n const id = legendItem.id;\n const additions = ('columns' in legendItem) ? legendItem.columns : legendItem.rows;\n const isTransparent = highlightedItem !== undefined && (highlightedItem !== -1 && highlightedItem !== _index);\n\n return (\n <React.Fragment key={id}>\n <Children />\n {additions.map((additionItem, index) => {\n return (\n <React.Fragment key={`${id}__${index}`}>\n <LegendTable.Column\n index={index}\n size={size}\n styles={styles}\n transparent={isTransparent}\n onMouseEnter={legendItem.checked ? this.bindOnMouseEnterItem(legendItem.id) : undefined}\n onMouseLeave={this.bindOnMouseLeaveItem(legendItem.id)}\n >\n {additionItem}\n </LegendTable.Column>\n </React.Fragment>\n );\n })}\n </React.Fragment>\n );\n })}\n </SLegendTable>,\n );\n }\n}\n\nfunction ColumnComponent(props: LegendColumnProps & IRootComponentProps) {\n const SColumnItem = Root;\n const { styles, index, size, Children } = props;\n\n return sstyled(styles)(\n <SColumnItem\n render={Box}\n size={size}\n >\n <Children />\n </SColumnItem>,\n );\n}\n\n/**\n * LegendTable\n *\n * {@link https://developer.semrush.com/intergalactic/data-display/chart-legend/chart-legend-api/|API} | {@link https://developer.semrush.com/intergalactic/data-display/chart-legend/chart-legend-code/|Examples}\n */\nexport const LegendTable = createComponent<\n LegendTableType,\n typeof LegendTableRoot\n>(LegendTableRoot, {\n LegendItem: LegendItemComponent,\n Column: ColumnComponent,\n});\n"],"mappings":";;;;AAAA,SAASA,GAAG,QAAQ,0BAA0B;AAC9C,SAASC,eAAe,EAAEC,OAAO,EAAEC,IAAI,QAAkC,eAAe;AACxF,OAAOC,KAAK,MAAM,OAAO;AAAC;AAAA,MAAAC,KAAA,8BAAAC,QAAA,CAAAC,MAAA;AAAA;AAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;AAAA;AAI1B,SAASC,UAAU,QAAQ,eAAe;AAC1C,SAASC,mBAAmB,QAAQ,0BAA0B;AAE9D,MAAMC,eAAe,SAASF,UAAU,CAAgD;EAQtFG,MAAMA,CAAA,EAAG;IAAA,IAAAC,IAAA,QAAAC,OAAA;MAAAC,KAAA;IACP,MAAMC,YAAY,GAWMf,GAAG;IAV3B,MAAM;MAAEgB,MAAM;MAAEC,QAAQ;MAAEC,IAAI,GAAG,GAAG;MAAEC,KAAK;MAAEC;IAAgB,CAAC,GAAG,IAAI,CAACP,OAAO;IAE7E,IAAI,CAACM,KAAK,CAAC,CAAC,CAAC,EAAE;MACb,OAAO,IAAI;IACb;IAEA,MAAME,SAAS,GAAG,SAAS,IAAIF,KAAK,CAAC,CAAC,CAAC,GAAG,SAAS,GAAG,MAAM;IAC5D,MAAMG,cAAc,GAAI,SAAS,IAAIH,KAAK,CAAC,CAAC,CAAC,GAAIA,KAAK,CAAC,CAAC,CAAC,EAAEI,OAAO,CAACC,MAAM,GAAGL,KAAK,CAAC,CAAC,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CAACE,EAAE;QAAE,GAEtDM,YACiB,CACN,CAAC;MAErB,CAAC,CACa,CAAC;IAErB,CAAC,CACW,CAAC;EAEnB;AACF;AAACU,eAAA,CAnDKtC,eAAe,iBACE,aAAa;AAAAsC,eAAA,CAD9BtC,eAAe,WAEJL,KAAK;AAAA2C,eAAA,CAFhBtC,eAAe,kBAIG,OAAO;EAC3BuC,QAAQ,eAAE7C,KAAA,CAAAsB,aAAA,CAACc,WAAW,CAACU,UAAU,MAAE;AACrC,CAAC,CAAC;AA+CJ,SAASC,eAAeA,CAACC,KAA8C,EAAE;EAAA,IAAAC,KAAA,GAAAC,YAAA;IAAAC,KAAA;EACvE,MAAMC,WAAW,GAKLxD,GAAG;EAJf,MAAM;IAAEgB,MAAM;IAAEuB,KAAK;IAAErB,IAAI;IAAED;EAAS,CAAC,GAAGmC,KAAK;EAE/C,OAAAG,KAAA,GAAOrD,OAAO,CAACc,MAAM,CAAC,eACpBZ,KAAA,CAAAsB,aAAA,CAAC8B,WAAW,EAAAD,KAAA,CAAA5B,EAAA;IAAA,GAAA8B,aAAA;MAAA,QAEJvC;IAAI,GAAAmC,KAAA;EAAA,iBAEVjD,KAAA,CAAAsB,aAAA,CAACT,QAAQ,EAAAsC,KAAA,CAAA5B,EAAA,gBAAE,CACA,CAAC;AAElB;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMa,WAAW,GAAGvC,eAAe,CAGxCS,eAAe,EAAE;EACjBwC,UAAU,EAAEzC,mBAAmB;EAC/BgC,MAAM,EAAEU;AACV,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LegendTable.type.js","names":[],"sources":["../../../../../src/component/ChartLegend/LegendTable/LegendTable.type.ts"],"sourcesContent":["import type { Box } from '@semcore/base-components';\nimport type { Intergalactic } from '@semcore/core';\nimport type React from 'react';\n\nimport type { LegendProps, LSize } from '../BaseLegend.type';\nimport type { LegendItem, LegendItemType } from '../LegendItem/LegendItem.type';\n\nexport type LegendTableProps = Intergalactic.InternalTypings.EfficientOmit<LegendProps, 'items'> & {\n /**\n * Legend items
|
|
1
|
+
{"version":3,"file":"LegendTable.type.js","names":[],"sources":["../../../../../src/component/ChartLegend/LegendTable/LegendTable.type.ts"],"sourcesContent":["import type { Box } from '@semcore/base-components';\nimport type { Intergalactic } from '@semcore/core';\nimport type React from 'react';\n\nimport type { LegendProps, LSize } from '../BaseLegend.type';\nimport type { LegendItem, LegendItemType } from '../LegendItem/LegendItem.type';\n\nexport type LegendTableProps = Intergalactic.InternalTypings.EfficientOmit<LegendProps, 'items'> & {\n /**\n * Legend items. Passing a column or a row will result in a different layout.\n */\n items: Array<LegendItem & ({ columns: Array<React.ReactNode> } | { rows: Array<React.ReactNode> })>;\n};\n\nexport type LegendTableDefaultProps = {\n children: React.JSX.Element;\n};\n\nexport type LegendColumnProps = {\n index: number;\n size: LSize;\n /** Enables element transparency */\n transparent?: boolean;\n};\n\nexport type LegendTableType = Intergalactic.Component<typeof Box, LegendTableProps> & {\n LegendItem: LegendItemType;\n Column: Intergalactic.Component<typeof Box, Partial<LegendColumnProps>>;\n};\n"],"mappings":"","ignoreList":[]}
|
|
@@ -1,23 +1,39 @@
|
|
|
1
|
-
SLegendTable[
|
|
1
|
+
SLegendTable[additions-count] {
|
|
2
2
|
font-variant-numeric: tabular-nums;
|
|
3
3
|
display: grid;
|
|
4
|
-
grid-template-columns: auto 0.2fr;
|
|
5
4
|
align-items: center;
|
|
6
|
-
height: fit-content;
|
|
7
5
|
grid-column-gap: var(--intergalactic-spacing-2x, 8px);
|
|
8
|
-
grid-row-gap: var(--intergalactic-spacing-2x, 8px);
|
|
9
|
-
}
|
|
10
6
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
7
|
+
&[additions-direction='columns'] {
|
|
8
|
+
grid-template-columns: auto repeat(var(--additions-count), 0.2fr);
|
|
9
|
+
height: fit-content;
|
|
10
|
+
grid-row-gap: var(--intergalactic-spacing-2x, 8px);
|
|
15
11
|
|
|
16
|
-
SColumnItem
|
|
17
|
-
|
|
18
|
-
|
|
12
|
+
& > SColumnItem {
|
|
13
|
+
text-align: right;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
&[additions-direction='rows'] {
|
|
17
|
+
grid-template-rows: auto repeat(var(--additions-count), 0.2fr);
|
|
18
|
+
grid-auto-flow: column;
|
|
19
|
+
grid-row-gap: var(--intergalactic-spacing-1x, 4px);
|
|
20
|
+
grid-column-gap: var(--intergalactic-spacing-14x, 56px);
|
|
21
|
+
grid-template-columns: repeat(var(--items-count), max-content);
|
|
22
|
+
}
|
|
19
23
|
}
|
|
20
24
|
|
|
21
|
-
SColumnItem
|
|
22
|
-
|
|
25
|
+
SColumnItem {
|
|
26
|
+
white-space: nowrap;
|
|
27
|
+
|
|
28
|
+
&[size='l'] {
|
|
29
|
+
font-size: var(--intergalactic-fs-300, 16px);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
&[size='m'] {
|
|
33
|
+
font-size: var(--intergalactic-fs-200, 14px);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
&[transparent] {
|
|
37
|
+
opacity: 0.3;
|
|
38
|
+
}
|
|
23
39
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Cigarette.js","names":["Component","sstyled","callAllEventHandlers","uniqueIDEnhancement","React","createElement","PatternFill","roundedPath","CigaretteBarRoot","constructor","args","_defineProperty","createRef","handlers","hovered","setCursor","e","onClick","dataKey","asProps","currentTarget","tagName","stopPropagation","value","refElement","current","style","setProperty","componentDidMount","forceUpdate","uncontrolledProps","getPath","x","y","width","height","r","radius","direction","
|
|
1
|
+
{"version":3,"file":"Cigarette.js","names":["Component","sstyled","callAllEventHandlers","uniqueIDEnhancement","React","createElement","PatternFill","roundedPath","CigaretteBarRoot","constructor","args","_defineProperty","createRef","handlers","hovered","setCursor","e","onClick","dataKey","asProps","currentTarget","tagName","stopPropagation","value","refElement","current","style","setProperty","componentDidMount","forceUpdate","uncontrolledProps","getPath","x","y","width","height","r","radius","direction","xV","yV","widthV","heightV","hasPrev","Boolean","previousSibling","hasNext","nextSibling","render","_ref","SBar","Element","styles","color","data","index","hide","uid","duration","onMouseMove","onMouseLeave","transparent","resolveColor","patterns","dSvg","Fragment","key","cn","undefined","handleMouseMove","handleMouseLeave","handleClick","offset","defaultHovered"],"sources":["../../../../src/component/Cigarette/Cigarette.tsx"],"sourcesContent":["import { Component, sstyled } from '@semcore/core';\nimport { callAllEventHandlers } from '@semcore/core/lib/utils/assignProps';\nimport uniqueIDEnhancement from '@semcore/core/lib/utils/uniqueID';\nimport React from 'react';\n\nimport createElement from '../../createElement';\nimport { PatternFill } from '../../Pattern';\nimport { roundedPath } from '../../utils';\n\nclass CigaretteBarRoot extends Component<any, [], { hovered: boolean }> {\n static displayName = 'Cigarette.BarItem';\n static enhance = [uniqueIDEnhancement()];\n static style = {};\n\n static defaultProps = {\n offset: [0, 0],\n duration: 500,\n direction: 'horizontal',\n defaultHovered: false,\n };\n\n refElement = React.createRef<SVGPathElement>();\n\n componentDidMount(): void {\n this.forceUpdate();\n }\n\n uncontrolledProps() {\n return {\n hovered: false,\n };\n }\n\n handleMouseMove = () => {\n this.handlers.hovered(true);\n this.setCursor('pointer');\n };\n\n handleMouseLeave = () => {\n this.handlers.hovered(false);\n this.setCursor('auto');\n };\n\n handleClick = (e: React.SyntheticEvent) => {\n const { onClick, dataKey } = this.asProps;\n\n if (onClick && e.currentTarget.tagName === 'path') {\n e.stopPropagation();\n\n onClick(dataKey, e);\n\n return false;\n }\n };\n\n setCursor = (value: 'pointer' | 'auto') => {\n const { onClick } = this.asProps;\n\n if (onClick) {\n this.refElement.current?.style.setProperty('cursor', value);\n }\n };\n\n getPath() {\n const { x, y, width, height, r: radius, direction, hovered } = this.asProps;\n\n let xV = x;\n let yV = y;\n let widthV = width;\n let heightV = height;\n\n if (hovered && direction === 'horizontal') {\n yV = yV - 2;\n heightV = heightV + 4;\n }\n\n if (hovered && direction === 'vertical') {\n xV = xV - 2;\n widthV = widthV + 4;\n }\n\n if (radius) {\n const hasPrev = Boolean(this.refElement.current?.previousSibling);\n const hasNext = Boolean(this.refElement.current?.nextSibling);\n\n if (direction === 'horizontal') {\n return roundedPath(\n xV,\n yV,\n widthV,\n heightV,\n radius,\n !hasPrev,\n !hasNext,\n !hasPrev,\n !hasNext,\n );\n } else {\n return roundedPath(\n xV,\n yV,\n widthV,\n heightV,\n radius,\n !hasPrev,\n !hasPrev,\n !hasNext,\n !hasNext,\n );\n }\n }\n\n return roundedPath(xV, yV, widthV, heightV, radius);\n }\n\n render() {\n // @ts-ignore\n const SBar = this.Element;\n const {\n styles,\n color,\n data,\n dataKey,\n index,\n hide,\n uid,\n duration,\n onMouseMove,\n onMouseLeave,\n transparent,\n resolveColor,\n patterns,\n } = this.asProps;\n\n const dSvg = this.getPath();\n\n return (\n <React.Fragment key={`horizontal-bar-${index}`}>\n {sstyled(styles)(\n <SBar\n ref={this.refElement}\n aria-hidden\n render='path'\n clipPath={`url(#${uid})`}\n __excludeProps={['data', 'scale', 'value', 'offset']}\n childrenPosition='above'\n value={data[dataKey]}\n index={index}\n hide={hide}\n fill={resolveColor(color)}\n pattern={patterns ? `url(#${uid}-${index}-pattern)` : undefined}\n transparent={transparent}\n d={dSvg}\n use:duration={`${duration}ms`}\n onMouseMove={callAllEventHandlers(onMouseMove, this.handleMouseMove)}\n onMouseLeave={callAllEventHandlers(onMouseLeave, this.handleMouseLeave)}\n use:onClick={this.handleClick}\n />,\n )}\n {patterns && (\n <PatternFill\n id={`${uid}-${index}-pattern`}\n patternKey={color}\n color={resolveColor(color)}\n patterns={patterns}\n />\n )}\n </React.Fragment>\n );\n }\n}\n\n/**\n * CigaretteBar\n *\n * {@link https://developer.semrush.com/intergalactic/data-display/cigarette-chart/cigarette-chart-api/|API} | {@link https://developer.semrush.com/intergalactic/data-display/cigarette-chart/cigarette-chart-code/|Examples}\n */\nexport default createElement(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eAAe,CAAC;MAAA,gBACtDnE,oBAAoB,CAAC0D,YAAY,EAAE,IAAI,CAACU,gBAAgB,CAAC;MAAA,eAC1D,IAAI,CAACC;IAAW,EAC9B,CAAC,GAEHR,QAAQ,iBACP3D,KAAA,CAAAC,aAAA,CAACC,WAAW,EAAA2C,IAAA,CAAAkB,EAAA;MAAA,MACN,GAAGV,GAAG,IAAIF,KAAK,UAAU;MAAA,cACjBF,KAAK;MAAA,SACVS,YAAY,CAACT,KAAK,CAAC;MAAA,YAChBU;IAAQ,EACnB,CAEW,CAAC;EAErB;AACF;;AAEA;AACA;AACA;AACA;AACA;AAJApD,eAAA,CAnKMH,gBAAgB,iBACC,mBAAmB;AAAAG,eAAA,CADpCH,gBAAgB,aAEH,CAACL,mBAAmB,CAAC,CAAC,CAAC;AAAAQ,eAAA,CAFpCH,gBAAgB,WAGL,CAAC,CAAC;AAAAG,eAAA,CAHbH,gBAAgB,kBAKE;EACpBgE,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;EACdd,QAAQ,EAAE,GAAG;EACbpB,SAAS,EAAE,YAAY;EACvBmC,cAAc,EAAE;AAClB,CAAC;AA8JH,eAAepE,aAAa,CAACG,gBAAgB,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
+
import { assignProps as _assignProps } from "@semcore/core";
|
|
3
|
+
import { Flex } from '@semcore/base-components';
|
|
4
|
+
import { Root, sstyled, Component, createComponent } from '@semcore/core';
|
|
5
|
+
import Link from '@semcore/link';
|
|
6
|
+
import { Text } from '@semcore/typography';
|
|
7
|
+
import React from 'react';
|
|
8
|
+
class MetricRoot extends Component {
|
|
9
|
+
getDiffColor() {
|
|
10
|
+
const {
|
|
11
|
+
diffUse
|
|
12
|
+
} = this.asProps;
|
|
13
|
+
switch (diffUse) {
|
|
14
|
+
case 'good':
|
|
15
|
+
{
|
|
16
|
+
return 'var(--intergalactic-text-success)';
|
|
17
|
+
}
|
|
18
|
+
case 'bad':
|
|
19
|
+
{
|
|
20
|
+
return 'var(--intergalactic-text-critical)';
|
|
21
|
+
}
|
|
22
|
+
default:
|
|
23
|
+
{
|
|
24
|
+
return 'var(--intergalactic-text-secondary)';
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
render() {
|
|
29
|
+
var _ref = this.asProps,
|
|
30
|
+
_ref2;
|
|
31
|
+
const SMetric = Flex;
|
|
32
|
+
const {
|
|
33
|
+
styles,
|
|
34
|
+
value,
|
|
35
|
+
diffValue,
|
|
36
|
+
href,
|
|
37
|
+
diffIcon: DiffIcon
|
|
38
|
+
} = this.asProps;
|
|
39
|
+
return _ref2 = sstyled(styles), /*#__PURE__*/React.createElement(SMetric, _ref2.cn("SMetric", {
|
|
40
|
+
..._assignProps({
|
|
41
|
+
"mt": -2,
|
|
42
|
+
"pt": 2,
|
|
43
|
+
"gap": 1,
|
|
44
|
+
"alignItems": 'baseline',
|
|
45
|
+
"__excludeProps": ['value', 'href']
|
|
46
|
+
}, _ref)
|
|
47
|
+
}), href ? /*#__PURE__*/React.createElement(Link, _ref2.cn("Link", {
|
|
48
|
+
"href": href
|
|
49
|
+
}), /*#__PURE__*/React.createElement(Link.Text, {
|
|
50
|
+
size: 500,
|
|
51
|
+
bold: true
|
|
52
|
+
}, value)) : /*#__PURE__*/React.createElement(Text, _ref2.cn("Text", {
|
|
53
|
+
"size": 500,
|
|
54
|
+
"bold": true
|
|
55
|
+
}), value), /*#__PURE__*/React.createElement(Text, _ref2.cn("Text", {
|
|
56
|
+
"size": 100,
|
|
57
|
+
"color": this.getDiffColor()
|
|
58
|
+
}), DiffIcon && /*#__PURE__*/React.createElement(DiffIcon, _ref2.cn("DiffIcon", {
|
|
59
|
+
"height": '8px'
|
|
60
|
+
})), diffValue));
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Metric
|
|
66
|
+
*
|
|
67
|
+
* {@link https://developer.semrush.com/intergalactic/data-display/chart-legend/chart-legend-code}
|
|
68
|
+
*/
|
|
69
|
+
_defineProperty(MetricRoot, "displayName", 'Metric');
|
|
70
|
+
const Metric = createComponent(MetricRoot);
|
|
71
|
+
export default Metric;
|
|
72
|
+
//# sourceMappingURL=Metric.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Metric.js","names":["Flex","Root","sstyled","Component","createComponent","Link","Text","React","MetricRoot","getDiffColor","diffUse","asProps","render","_ref","_ref2","SMetric","styles","value","diffValue","href","diffIcon","DiffIcon","createElement","cn","_assignProps","size","bold","_defineProperty","Metric"],"sources":["../../../../src/component/Metric/Metric.tsx"],"sourcesContent":["import { Flex } from '@semcore/base-components';\nimport type { Intergalactic } from '@semcore/core';\nimport { Root, sstyled, Component, createComponent } from '@semcore/core';\nimport resolveColorEnhance from '@semcore/core/lib/utils/enhances/resolveColorEnhance';\nimport logger from '@semcore/core/lib/utils/logger';\nimport DiffDown from '@semcore/icon/DiffDown/m';\nimport DiffUp from '@semcore/icon/DiffUp/m';\nimport Link from '@semcore/link';\nimport { Text } from '@semcore/typography';\nimport React from 'react';\n\nimport type { NSMetric } from './Metric.type';\n\nclass MetricRoot extends Component<\n Intergalactic.InternalTypings.InferComponentProps<NSMetric.Component>\n> {\n static displayName = 'Metric';\n\n getDiffColor() {\n const { diffUse } = this.asProps;\n\n switch (diffUse) {\n case 'good': {\n return 'var(--intergalactic-text-success)';\n }\n case 'bad': {\n return 'var(--intergalactic-text-critical)';\n }\n default: {\n return 'var(--intergalactic-text-secondary)';\n }\n }\n }\n\n render(): React.ReactNode {\n const SMetric = Root;\n const { styles, value, diffValue, href, diffIcon: DiffIcon } = this.asProps;\n\n return sstyled(styles)(\n <SMetric mt={-2} pt={2} render={Flex} gap={1} alignItems='baseline' __excludeProps={['value', 'href']}>\n {href\n ? (<Link href={href}><Link.Text size={500} bold>{value}</Link.Text></Link>)\n : (<Text size={500} bold>{value}</Text>)}\n <Text size={100} color={this.getDiffColor()}>\n {DiffIcon && <DiffIcon height='8px' />}\n {diffValue}\n </Text>\n </SMetric>,\n );\n }\n}\n\n/**\n * Metric\n *\n * {@link https://developer.semrush.com/intergalactic/data-display/chart-legend/chart-legend-code}\n */\nconst Metric = createComponent<\n NSMetric.Component,\n typeof MetricRoot\n>(MetricRoot);\n\nexport default Metric;\n"],"mappings":";;AAAA,SAASA,IAAI,QAAQ,0BAA0B;AAE/C,SAASC,IAAI,EAAEC,OAAO,EAAEC,SAAS,EAAEC,eAAe,QAAQ,eAAe;AAKzE,OAAOC,IAAI,MAAM,eAAe;AAChC,SAASC,IAAI,QAAQ,qBAAqB;AAC1C,OAAOC,KAAK,MAAM,OAAO;AAIzB,MAAMC,UAAU,SAASL,SAAS,CAEhC;EAGAM,YAAYA,CAAA,EAAG;IACb,MAAM;MAAEC;IAAQ,CAAC,GAAG,IAAI,CAACC,OAAO;IAEhC,QAAQD,OAAO;MACb,KAAK,MAAM;QAAE;UACX,OAAO,mCAAmC;QAC5C;MACA,KAAK,KAAK;QAAE;UACV,OAAO,oCAAoC;QAC7C;MACA;QAAS;UACP,OAAO,qCAAqC;QAC9C;IACF;EACF;EAEAE,MAAMA,CAAA,EAAoB;IAAA,IAAAC,IAAA,QAAAF,OAAA;MAAAG,KAAA;IACxB,MAAMC,OAAO,GAIqBf,IAAI;IAHtC,MAAM;MAAEgB,MAAM;MAAEC,KAAK;MAAEC,SAAS;MAAEC,IAAI;MAAEC,QAAQ,EAAEC;IAAS,CAAC,GAAG,IAAI,CAACV,OAAO;IAE3E,OAAAG,KAAA,GAAOZ,OAAO,CAACc,MAAM,CAAC,eACpBT,KAAA,CAAAe,aAAA,CAACP,OAAO,EAAAD,KAAA,CAAAS,EAAA;MAAA,GAAAC,YAAA;QAAA,MAAK,CAAC,CAAC;QAAA,MAAM,CAAC;QAAA,OAAqB,CAAC;QAAA,cAAa,UAAU;QAAA,kBAAiB,CAAC,OAAO,EAAE,MAAM;MAAC,GAAAX,IAAA;IAAA,IAClGM,IAAI,gBACAZ,KAAA,CAAAe,aAAA,CAACjB,IAAI,EAAAS,KAAA,CAAAS,EAAA;MAAA,QAAOJ;IAAI,iBAAEZ,KAAA,CAAAe,aAAA,CAACjB,IAAI,CAACC,IAAI;MAACmB,IAAI,EAAE,GAAI;MAACC,IAAI;IAAA,GAAET,KAAiB,CAAO,CAAC,gBACvEV,KAAA,CAAAe,aAAA,CAAChB,IAAI,EAAAQ,KAAA,CAAAS,EAAA;MAAA,QAAO,GAAG;MAAA;IAAA,IAAQN,KAAY,CAAE,eAC1CV,KAAA,CAAAe,aAAA,CAAChB,IAAI,EAAAQ,KAAA,CAAAS,EAAA;MAAA,QAAO,GAAG;MAAA,SAAS,IAAI,CAACd,YAAY,CAAC;IAAC,IACxCY,QAAQ,iBAAId,KAAA,CAAAe,aAAA,CAACD,QAAQ,EAAAP,KAAA,CAAAS,EAAA;MAAA,UAAQ;IAAK,EAAE,CAAC,EACrCL,SACG,CACC,CAAC;EAEd;AACF;;AAEA;AACA;AACA;AACA;AACA;AAJAS,eAAA,CAvCMnB,UAAU,iBAGO,QAAQ;AAyC/B,MAAMoB,MAAM,GAAGxB,eAAe,CAG5BI,UAAU,CAAC;AAEb,eAAeoB,MAAM","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Metric.type.js","names":[],"sources":["../../../../src/component/Metric/Metric.type.ts"],"sourcesContent":["import type { NSBox } from '@semcore/base-components';\nimport type { Intergalactic } from '@semcore/core';\nimport type { IconComponent } from '@semcore/icon';\n\ndeclare namespace NSMetric {\n type DiffUse = 'good' | 'bad' | 'neutral';\n type DiffIcon = IconComponent;\n\n type Props = NSBox.Props & {\n /**\n * Value to render in the Metric\n */\n value: string;\n\n /**\n * Value to render in diff\n */\n diffValue: string;\n\n /**\n * Diff color\n */\n diffUse: DiffUse;\n\n /**\n * Link to another tool or whatever\n */\n href?: string;\n\n /**\n * Diff arrow direction\n * @default no icon\n */\n diffIcon?: DiffIcon;\n };\n\n type Component = Intergalactic.Component<'span', Props>;\n}\n\nexport {\n type NSMetric,\n};\n"],"mappings":"","ignoreList":[]}
|
package/lib/es6/index.js
CHANGED
|
@@ -4,6 +4,7 @@ export { default as Chart } from './component/Chart';
|
|
|
4
4
|
export * from './component/Chart';
|
|
5
5
|
export { default as StackGroupBar } from './component/StackGroupBar/StackGroupBar';
|
|
6
6
|
export { SvgElement } from './component/SvgElement';
|
|
7
|
+
export { default as Metric } from './component/Metric/Metric';
|
|
7
8
|
export { XAxis, YAxis } from './Axis';
|
|
8
9
|
export { default as Line } from './Line';
|
|
9
10
|
export { default as Bar } from './Bar';
|
|
@@ -24,7 +25,6 @@ export { default as ResponsiveContainer } from './ResponsiveContainer';
|
|
|
24
25
|
export { ReferenceLine, ReferenceBackground, ReferenceStripes } from './Reference';
|
|
25
26
|
export { HoverLine, HoverRect } from './Hover';
|
|
26
27
|
export { minMax, interpolateValue, getBubbleChartValueScale, getScatterPlotRadius, calculateBubbleDomain, PlotEventEmitter } from './utils';
|
|
27
|
-
export { colors } from './color';
|
|
28
28
|
export { makeDataHintsContainer } from './a11y/hints';
|
|
29
29
|
export { PatternFill, PatternSymbol, getPatternSymbolSize } from './Pattern';
|
|
30
30
|
//# sourceMappingURL=index.js.map
|
package/lib/es6/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["default","Plot","ChartLegend","ChartLegendTable","Chart","StackGroupBar","SvgElement","XAxis","YAxis","Line","Bar","CompactHorizontalBar","HorizontalBar","GroupBar","StackBar","Area","StackedArea","ScatterPlot","Bubble","RadialTree","Donut","Venn","Radar","getLabelOffsetPosition","Tooltip","ResponsiveContainer","ReferenceLine","ReferenceBackground","ReferenceStripes","HoverLine","HoverRect","minMax","interpolateValue","getBubbleChartValueScale","getScatterPlotRadius","calculateBubbleDomain","PlotEventEmitter","
|
|
1
|
+
{"version":3,"file":"index.js","names":["default","Plot","ChartLegend","ChartLegendTable","Chart","StackGroupBar","SvgElement","Metric","XAxis","YAxis","Line","Bar","CompactHorizontalBar","HorizontalBar","GroupBar","StackBar","Area","StackedArea","ScatterPlot","Bubble","RadialTree","Donut","Venn","Radar","getLabelOffsetPosition","Tooltip","ResponsiveContainer","ReferenceLine","ReferenceBackground","ReferenceStripes","HoverLine","HoverRect","minMax","interpolateValue","getBubbleChartValueScale","getScatterPlotRadius","calculateBubbleDomain","PlotEventEmitter","makeDataHintsContainer","PatternFill","PatternSymbol","getPatternSymbolSize"],"sources":["../../src/index.js"],"sourcesContent":["export { default as Plot } from './Plot';\nexport { ChartLegend, ChartLegendTable } from './component/ChartLegend';\nexport { default as Chart } from './component/Chart';\nexport * from './component/Chart';\nexport { default as StackGroupBar } from './component/StackGroupBar/StackGroupBar';\nexport { SvgElement } from './component/SvgElement';\nexport { default as Metric } from './component/Metric/Metric';\nexport { XAxis, YAxis } from './Axis';\n\nexport { default as Line } from './Line';\n\nexport { default as Bar } from './Bar';\nexport { default as CompactHorizontalBar } from './CompactHorizontalBar';\nexport { default as HorizontalBar } from './HorizontalBar';\nexport { default as GroupBar } from './GroupBar';\nexport { default as StackBar } from './StackBar';\nexport { default as Area } from './Area';\nexport { default as StackedArea } from './StackedArea';\nexport { default as ScatterPlot } from './ScatterPlot';\nexport { default as Bubble } from './Bubble';\nexport { default as RadialTree } from './RadialTree';\nexport { default as Donut } from './Donut';\nexport { default as Venn } from './Venn';\nexport { default as Radar, getLabelOffsetPosition } from './Radar';\n\nexport { default as Tooltip } from './Tooltip';\n\nexport { default as ResponsiveContainer } from './ResponsiveContainer';\nexport { ReferenceLine, ReferenceBackground, ReferenceStripes } from './Reference';\n\nexport { HoverLine, HoverRect } from './Hover';\n\nexport {\n minMax,\n interpolateValue,\n getBubbleChartValueScale,\n getScatterPlotRadius,\n calculateBubbleDomain,\n PlotEventEmitter,\n} from './utils';\n\nexport { makeDataHintsContainer } from './a11y/hints';\n\nexport { PatternF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AAS,EAAEC,SAAS,QAAQ,SAAS;AAE9C,SACEC,MAAM,EACNC,gBAAgB,EAChBC,wBAAwB,EACxBC,oBAAoB,EACpBC,qBAAqB,EACrBC,gBAAgB,QACX,SAAS;AAEhB,SAASC,sBAAsB,QAAQ,cAAc;AAErD,SAASC,WAAW,EAAEC,aAAa,EAAEC,oBAAoB,QAAQ,WAAW","ignoreList":[]}
|
|
@@ -43,7 +43,7 @@ STooltipDeltaWrapper {
|
|
|
43
43
|
color: var(--intergalactic-text-secondary-invert, oklch(0.953 0.025 240.1 / 0.726));
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
-
&[deltaPercentGrowthColor='
|
|
46
|
+
&[deltaPercentGrowthColor='bad'] {
|
|
47
47
|
&[trend='upward'] {
|
|
48
48
|
color: var(--intergalactic-chart-data-critical, oklch(0.74 0.19 22));
|
|
49
49
|
}
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
@import './var.css';
|
|
2
|
-
|
|
3
1
|
SBar {
|
|
4
2
|
fill: var(--intergalactic-chart-palette-order-1, oklch(0.23 0.009 245));
|
|
5
3
|
transition-property: height, width, y;
|
|
@@ -64,4 +62,4 @@ SBarValue {
|
|
|
64
62
|
}
|
|
65
63
|
SCompactHorizontalBarHoverRect {
|
|
66
64
|
fill: var(--intergalactic-chart-grid-bar-hover, oklch(0.375 0.09 242.7 / 0.05));
|
|
67
|
-
}
|
|
65
|
+
}
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
@import './var.css';
|
|
2
|
-
|
|
3
1
|
SPie {
|
|
4
2
|
stroke: var(--intergalactic-chart-grid-border, #ffffff);
|
|
5
3
|
fill: var(--intergalactic-chart-palette-order-1, oklch(0.23 0.009 245));
|
|
@@ -33,4 +31,4 @@ SLabel {
|
|
|
33
31
|
font-size: var(--intergalactic-fs-200, 14px);
|
|
34
32
|
line-height: var(--intergalactic-lh-200, 1.4286);
|
|
35
33
|
|
|
36
|
-
}
|
|
34
|
+
}
|
package/lib/es6/types/index.d.js
CHANGED
|
@@ -4,13 +4,6 @@
|
|
|
4
4
|
import { PlotEventEmitter } from './utils';
|
|
5
5
|
export { PlotEventEmitter };
|
|
6
6
|
export { makeDataHintsContainer } from './a11y/hints';
|
|
7
|
-
|
|
8
|
-
// Color
|
|
9
|
-
/**
|
|
10
|
-
* @deprecated
|
|
11
|
-
* This export will be removed in the next major release.
|
|
12
|
-
*/
|
|
13
|
-
|
|
14
7
|
export { default as Plot } from './Plot';
|
|
15
8
|
export * from './Plot';
|
|
16
9
|
export * from './Axis';
|
|
@@ -65,6 +58,11 @@ export * from './component/ChartLegend/LegendTable/LegendTable.type';
|
|
|
65
58
|
// @ts-ignore
|
|
66
59
|
export * from './component/ChartLegend/LegendItem/LegendItem.type';
|
|
67
60
|
|
|
61
|
+
// @ts-ignore
|
|
62
|
+
export * from './component/Metric/Metric.type';
|
|
63
|
+
// @ts-ignore
|
|
64
|
+
export { default as Metric } from './component/Metric/Metric';
|
|
65
|
+
|
|
68
66
|
// @ts-ignore
|
|
69
67
|
export * from './Pattern';
|
|
70
68
|
export { default as Chart } from './component/Chart';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.js","names":["PlotEventEmitter","makeDataHintsContainer","default","Plot","ResponsiveContainer","Line","Bar","HorizontalBar","CompactHorizontalBar","GroupBar","StackBar","Area","StackedArea","Radar","Donut","Tooltip","ScatterPlot","Bubble","Venn","RadialTree","ChartLegend","ChartLegendTable","Chart","StackGroupBar"],"sources":["../../../src/types/index.d.ts"],"sourcesContent":["// Utils\n// @ts-ignore\nimport type { interpolateValue as intValue } from './utils';\nimport { PlotEventEmitter } from './utils';\n\nexport declare const interpolateValue: typeof intValue;\nexport declare function minMax(data: any, key: string | number): any;\nexport declare function calculateBubbleDomain(\n data: Array<{ value: number; x: number; y: number }>,\n key: 'x' | 'y',\n range: [number, number],\n): [min: number, max: number];\nexport { PlotEventEmitter };\n\nexport { makeDataHintsContainer } from './a11y/hints';\n\
|
|
1
|
+
{"version":3,"file":"index.d.js","names":["PlotEventEmitter","makeDataHintsContainer","default","Plot","ResponsiveContainer","Line","Bar","HorizontalBar","CompactHorizontalBar","GroupBar","StackBar","Area","StackedArea","Radar","Donut","Tooltip","ScatterPlot","Bubble","Venn","RadialTree","ChartLegend","ChartLegendTable","Metric","Chart","StackGroupBar"],"sources":["../../../src/types/index.d.ts"],"sourcesContent":["// Utils\n// @ts-ignore\nimport type { interpolateValue as intValue } from './utils';\nimport { PlotEventEmitter } from './utils';\n\nexport declare const interpolateValue: typeof intValue;\nexport declare function minMax(data: any, key: string | number): any;\nexport declare function calculateBubbleDomain(\n data: Array<{ value: number; x: number; y: number }>,\n key: 'x' | 'y',\n range: [number, number],\n): [min: number, max: number];\nexport { PlotEventEmitter };\n\nexport { makeDataHintsContainer } from './a11y/hints';\n\nexport { default as Plot } from './Plot';\nexport * from './Plot';\n\nexport * from './Axis';\nexport * from './Hover';\n\nexport { default as ResponsiveContainer } from './ResponsiveContainer';\nexport * from './ResponsiveContainer';\n\nexport { default as Line } from './Line';\nexport * from './Line';\n\nexport { default as Bar } from './Bar';\nexport * from './Bar';\n\nexport { default as HorizontalBar } from './HorizontalBar';\nexport * from './HorizontalBar';\n\nexport { default as CompactHorizontalBar } from './CompactHorizontalBar';\nexport * from './CompactHorizontalBar';\n\nexport { default as GroupBar } from './GroupBar';\nexport * from './GroupBar';\n\nexport { default as StackBar } from './StackBar';\nexport * from './StackBar';\n\nexport { default as Area } from './Area';\nexport * from './Area';\n\nexport { default as StackedArea } from './StackedArea';\nexport * from './StackedArea';\n\nexport { default as Radar } from './Radar';\nexport * from './Radar';\n\nexport { default as Donut } from './Donut';\nexport * from './Donut';\n\nexport { default as Tooltip } from './Tooltip';\nexport * from './Tooltip';\n\nexport { default as ScatterPlot } from './ScatterPlot';\nexport * from './ScatterPlot';\n\nexport { default as Bubble } from './Bubble';\nexport * from './Bubble';\n\nexport * from './Reference';\n\nexport { default as Venn } from './Venn';\nexport * from './Venn';\n\n/** It becomes resolvable after building and moving file to lib dir */\n\n// @ts-ignore\nexport { default as RadialTree } from './RadialTree';\n\n// @ts-ignore\nexport * from './RadialTree';\n\n// @ts-ignore\nexport { ChartLegend, ChartLegendTable } from './component/ChartLegend';\n\n// @ts-ignore\nexport * from './component/ChartLegend/LegendFlex/LegendFlex.type';\n// @ts-ignore\nexport * from './component/ChartLegend/LegendTable/LegendTable.type';\n// @ts-ignore\nexport * from './component/ChartLegend/LegendItem/LegendItem.type';\n\n// @ts-ignore\nexport * from './component/Metric/Metric.type';\n// @ts-ignore\nexport { default as Metric } from './component/Metric/Metric';\n\n// @ts-ignore\nexport * from './Pattern';\n\nexport { default as Chart } from './component/Chart';\nexport * from './component/Chart/AbstractChart.type';\nexport * from './component/Chart/LineChart.type';\nexport * from './component/Chart/BarChart.type';\nexport * from './component/Chart/HistogramChart.type';\nexport * from './component/Chart/CompactHorizontalBarChart.type';\nexport * from './component/Chart/ScatterPlotChart.type';\nexport * from './component/Chart/AreaChart.type';\nexport * from './component/Chart/BubbleChart.type';\nexport * from './component/Chart/DonutChart.type';\nexport * from './component/Chart/VennChart.type';\nexport * from './component/Chart/RadarChart.type';\nexport * from './component/Chart/ScatterPlotChart.type';\nexport * from './component/Chart/CigaretteChart.type';\n\nexport { default as StackGroupBar } from './component/StackGroupBar/StackGroupBar';\n"],"mappings":"AAAA;AACA;;AAEA,SAASA,gBAAgB,QAAQ,SAAS;AAS1C,SAASA,gBAAgB;AAEzB,SAASC,sBAAsB,QAAQ,cAAc;AAErD,SAASC,OAAO,IAAIC,IAAI,QAAQ,QAAQ;AACxC,cAAc,QAAQ;AAEtB,cAAc,QAAQ;AACtB,cAAc,SAAS;AAEvB,SAASD,OAAO,IAAIE,mBAAmB,QAAQ,uBAAuB;AACtE,cAAc,uBAAuB;AAErC,SAASF,OAAO,IAAIG,IAAI,QAAQ,QAAQ;AACxC,cAAc,QAAQ;AAEtB,SAASH,OAAO,IAAII,GAAG,QAAQ,OAAO;AACtC,cA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,kCAAkC;AAChD,cAAc,iCAAiC;AAC/C,cAAc,uCAAuC;AACrD,cAAc,kDAAkD;AAChE,cAAc,yCAAyC;AACvD,cAAc,kCAAkC;AAChD,cAAc,oCAAoC;AAClD,cAAc,mCAAmC;AACjD,cAAc,kCAAkC;AAChD,cAAc,mCAAmC;AACjD,cAAc,yCAAyC;AACvD,cAAc,uCAAuC;AAErD,SAASrB,OAAO,IAAIsB,aAAa,QAAQ,yCAAyC","ignoreList":[]}
|
package/lib/esm/Area.mjs
CHANGED
|
@@ -18,22 +18,22 @@ const style = (
|
|
|
18
18
|
/*__reshadow_css_start__*/
|
|
19
19
|
(sstyled.insert(
|
|
20
20
|
/*__inner_css_start__*/
|
|
21
|
-
".
|
|
21
|
+
".___SArea_mf3t1_gg_{fill:var(--intergalactic-chart-palette-order-1,oklch(.23 .009 245));fill-opacity:.1}.___SArea_mf3t1_gg_.__withGradient_mf3t1_gg_{-webkit-mask-image:linear-gradient(180deg,#000 0,#0000007a 60%,#0000);mask-image:linear-gradient(180deg,#000 0,#0000007a 60%,#0000)}.___SArea_mf3t1_gg_.__color_mf3t1_gg_{fill:var(--color_mf3t1)}.___SArea_mf3t1_gg_.__pattern_mf3t1_gg_{fill:var(--pattern_mf3t1);fill-opacity:.5}.___SArea_mf3t1_gg_.__transparent_mf3t1_gg_{opacity:.3}.___SAreaLine_mf3t1_gg_{stroke:var(--intergalactic-chart-palette-order-1,oklch(.23 .009 245));stroke-width:2;fill:#0000}.___SAreaLine_mf3t1_gg_.__color_mf3t1_gg_{stroke:var(--color_mf3t1)}.___SAreaLine_mf3t1_gg_.__transparent_mf3t1_gg_{opacity:.3}.___SAreaLine_mf3t1_gg_,.___SArea_mf3t1_gg_{transition-property:d;transition-duration:var(--duration_mf3t1);transition-timing-function:ease-in-out}.___SNull_mf3t1_gg_{fill:#0000;stroke:var(--intergalactic-chart-palette-order-null,oklch(.9 .009 234));stroke-dasharray:4}.___SNull_mf3t1_gg_.__hide_mf3t1_gg_{display:none}",
|
|
22
22
|
/*__inner_css_end__*/
|
|
23
|
-
"
|
|
23
|
+
"mf3t1_gg_"
|
|
24
24
|
), /*__reshadow_css_end__*/
|
|
25
25
|
{
|
|
26
|
-
"__SArea": "
|
|
27
|
-
"_withGradient": "
|
|
28
|
-
"_color": "
|
|
29
|
-
"--color": "--
|
|
30
|
-
"_pattern": "
|
|
31
|
-
"--pattern": "--
|
|
32
|
-
"_transparent": "
|
|
33
|
-
"__SAreaLine": "
|
|
34
|
-
"--duration": "--
|
|
35
|
-
"__SNull": "
|
|
36
|
-
"_hide": "
|
|
26
|
+
"__SArea": "___SArea_mf3t1_gg_",
|
|
27
|
+
"_withGradient": "__withGradient_mf3t1_gg_",
|
|
28
|
+
"_color": "__color_mf3t1_gg_",
|
|
29
|
+
"--color": "--color_mf3t1",
|
|
30
|
+
"_pattern": "__pattern_mf3t1_gg_",
|
|
31
|
+
"--pattern": "--pattern_mf3t1",
|
|
32
|
+
"_transparent": "__transparent_mf3t1_gg_",
|
|
33
|
+
"__SAreaLine": "___SAreaLine_mf3t1_gg_",
|
|
34
|
+
"--duration": "--duration_mf3t1",
|
|
35
|
+
"__SNull": "___SNull_mf3t1_gg_",
|
|
36
|
+
"_hide": "__hide_mf3t1_gg_"
|
|
37
37
|
})
|
|
38
38
|
);
|
|
39
39
|
class AreaRoot extends Component {
|
package/lib/esm/Bar.mjs
CHANGED
|
@@ -12,26 +12,26 @@ const style = (
|
|
|
12
12
|
/*__reshadow_css_start__*/
|
|
13
13
|
(sstyled.insert(
|
|
14
14
|
/*__inner_css_start__*/
|
|
15
|
-
".
|
|
15
|
+
".___SBar_1d6up_gg_{fill:var(--intergalactic-chart-palette-order-1,oklch(.23 .009 245));transition-property:height,width,y;transition-duration:var(--duration_1d6up);transition-timing-function:ease-in-out}.___SBar_1d6up_gg_.__color_1d6up_gg_{fill:var(--color_1d6up)}.___SBar_1d6up_gg_.__pattern_1d6up_gg_.__color_1d6up_gg_{fill:var(--pattern_1d6up);stroke:var(--color_1d6up);stroke-width:1px}.___SBar_1d6up_gg_.__hide_1d6up_gg_{display:none}.___SBar_1d6up_gg_.__transparent_1d6up_gg_{opacity:.3}.___SBar_1d6up_gg_.__onClick_1d6up_gg_{cursor:pointer}.___SBackground_1d6up_gg_{fill:var(--intergalactic-chart-grid-bar-base-bg,oklch(.92 .008 233.5));opacity:.4}.___SBackground_1d6up_gg_.__onClick_1d6up_gg_{cursor:pointer}.___SBarAnnotation_1d6up_gg_{display:flex;justify-content:space-between}.___SBarLabel_1d6up_gg_{color:var(--intergalactic-text-primary,oklch(.23 .009 245));margin-right:auto}.___SBarLabel_1d6up_gg_,.___SBarPercent_1d6up_gg_{font-size:var(--intergalactic-fs-200,14px);line-height:var(--intergalactic-lh-200,1.4286)}.___SBarPercent_1d6up_gg_{color:var(--intergalactic-text-secondary,oklch(.182 .045 244.8/.593));margin-right:var(--intergalactic-spacing-2x,8px)}.___SBarValue_1d6up_gg_{min-width:52px;display:flex;justify-content:flex-end;color:var(--intergalactic-text-primary,oklch(.23 .009 245));font-size:var(--intergalactic-fs-200,14px);line-height:var(--intergalactic-lh-200,1.4286);text-align:right}.___SCompactHorizontalBarHoverRect_1d6up_gg_{fill:var(--intergalactic-chart-grid-bar-hover,oklch(.375 .09 242.7/.05))}",
|
|
16
16
|
/*__inner_css_end__*/
|
|
17
|
-
"
|
|
17
|
+
"1d6up_gg_"
|
|
18
18
|
), /*__reshadow_css_end__*/
|
|
19
19
|
{
|
|
20
|
-
"__SBar": "
|
|
21
|
-
"--duration": "--
|
|
22
|
-
"_color": "
|
|
23
|
-
"--color": "--
|
|
24
|
-
"_pattern": "
|
|
25
|
-
"--pattern": "--
|
|
26
|
-
"_hide": "
|
|
27
|
-
"_transparent": "
|
|
28
|
-
"_onClick": "
|
|
29
|
-
"__SBackground": "
|
|
30
|
-
"__SBarAnnotation": "
|
|
31
|
-
"__SBarLabel": "
|
|
32
|
-
"__SBarPercent": "
|
|
33
|
-
"__SBarValue": "
|
|
34
|
-
"__SCompactHorizontalBarHoverRect": "
|
|
20
|
+
"__SBar": "___SBar_1d6up_gg_",
|
|
21
|
+
"--duration": "--duration_1d6up",
|
|
22
|
+
"_color": "__color_1d6up_gg_",
|
|
23
|
+
"--color": "--color_1d6up",
|
|
24
|
+
"_pattern": "__pattern_1d6up_gg_",
|
|
25
|
+
"--pattern": "--pattern_1d6up",
|
|
26
|
+
"_hide": "__hide_1d6up_gg_",
|
|
27
|
+
"_transparent": "__transparent_1d6up_gg_",
|
|
28
|
+
"_onClick": "__onClick_1d6up_gg_",
|
|
29
|
+
"__SBackground": "___SBackground_1d6up_gg_",
|
|
30
|
+
"__SBarAnnotation": "___SBarAnnotation_1d6up_gg_",
|
|
31
|
+
"__SBarLabel": "___SBarLabel_1d6up_gg_",
|
|
32
|
+
"__SBarPercent": "___SBarPercent_1d6up_gg_",
|
|
33
|
+
"__SBarValue": "___SBarValue_1d6up_gg_",
|
|
34
|
+
"__SCompactHorizontalBarHoverRect": "___SCompactHorizontalBarHoverRect_1d6up_gg_"
|
|
35
35
|
})
|
|
36
36
|
);
|
|
37
37
|
const MIN_HEIGHT = 2;
|