@cloudscape-design/chart-components 1.0.107 → 1.0.108

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.
@@ -33,6 +33,7 @@ function transformSeries(untransformedSeries, stacking) {
33
33
  switch (s.type) {
34
34
  case "area":
35
35
  case "areaspline":
36
+ return transformAreaSeries(s, untransformedSeries);
36
37
  case "line":
37
38
  case "spline":
38
39
  return transformLineLikeSeries(s, untransformedSeries);
@@ -89,6 +90,14 @@ function transformLineLikeSeries(s, allSeries) {
89
90
  data,
90
91
  };
91
92
  }
93
+ function transformAreaSeries(s, allSeries) {
94
+ const transformed = transformLineLikeSeries(s, allSeries);
95
+ // Only forward fillOpacity when set; spreading `undefined` would clear the default fill opacity.
96
+ if (transformed === null || s.fillOpacity === undefined) {
97
+ return transformed;
98
+ }
99
+ return { ...transformed, fillOpacity: s.fillOpacity };
100
+ }
92
101
  function transformColumnSeries(s, allSeries) {
93
102
  if (!validateLinkedTo(s, allSeries)) {
94
103
  return null;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/cartesian-chart/index.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AAEtC,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAEnC,OAAO,EAAE,QAAQ,EAAE,MAAM,+CAA+C,CAAC;AAGzE,OAAO,EAAE,iBAAiB,EAAE,MAAM,gDAAgD,CAAC;AACnF,OAAO,gBAAgB,MAAM,+CAA+C,CAAC;AAC7E,OAAO,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AACxE,OAAO,EAAE,SAAS,EAAgB,MAAM,yBAAyB,CAAC;AAClE,OAAO,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AAEpE,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAInE,MAAM,cAAc,GAAG,UAAU,CAC/B,CACE,EACE,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QAC5B,cAAc,EAAE,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,cAAc;KAChC,CAAC;AACT,CAAC;AAED,SAAS,gBAAgB,CACvB,OAA4C;;IAE5C,OAAO;QACL,GAAG,OAAO;QACV,OAAO,EAAE,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,OAAO,mCAAI,IAAI;QACjC,SAAS,EAAE,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,SAAS,mCAAI,QAAQ;QACzC,IAAI,EAAE,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,IAAI,mCAAI,QAAQ;KAChC,CAAC;AACJ,CAAC;AAED,SAAS,eAAe,CACtB,MAA0C;;IAE1C,OAAO,EAAE,GAAG,MAAM,EAAE,OAAO,EAAE,MAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,OAAO,mCAAI,IAAI,EAAE,CAAC;AACzD,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { forwardRef } from \"react\";\n\nimport { warnOnce } from \"@cloudscape-design/component-toolkit/internal\";\n\nimport { PointDataItemType, RangeDataItemOptions, SizePointDataItemOptions, WithZones } from \"../core/interfaces\";\nimport { getDataAttributes } from \"../internal/base-component/get-data-attributes\";\nimport useBaseComponent from \"../internal/base-component/use-base-component\";\nimport { applyDisplayName } from \"../internal/utils/apply-display-name\";\nimport { castArray, SomeRequired } from \"../internal/utils/utils\";\nimport { InternalCartesianChart } from \"./chart-cartesian-internal\";\nimport { CartesianChartProps } from \"./interfaces\";\nimport { getMasterSeries, isErrorBar, isThreshold } from \"./utils\";\n\nexport type { CartesianChartProps };\n\nconst CartesianChart = forwardRef(\n (\n {\n fitHeight = false,\n inverted = false,\n stacking = undefined,\n emphasizeBaseline = true,\n verticalAxisTitlePlacement = \"top\",\n ...props\n }: CartesianChartProps,\n ref: React.Ref<CartesianChartProps.Ref>,\n ) => {\n // We transform options before propagating them to the internal chart to ensure only those\n // defined in the component's contract can be propagated down to the underlying Highcharts.\n // Additionally, we assign all default options, including the nested ones.\n const series = transformSeries(props.series, stacking);\n const xAxis = transformXAxisOptions(props.xAxis);\n const yAxis = transformYAxisOptions(props.yAxis);\n const sizeAxis = transformSizeAxisOptions(props.sizeAxis);\n const tooltip = transformTooltip(props.tooltip);\n const legend = transformLegend(props.legend);\n\n const baseComponentProps = useBaseComponent(\"CartesianHighcharts\", {\n props: { fitHeight, inverted, stacking, emphasizeBaseline, verticalAxisTitlePlacement },\n metadata: {},\n });\n\n return (\n <InternalCartesianChart\n ref={ref}\n {...props}\n fitHeight={fitHeight}\n inverted={inverted}\n stacking={stacking}\n emphasizeBaseline={emphasizeBaseline}\n verticalAxisTitlePlacement={verticalAxisTitlePlacement}\n series={series}\n xAxis={xAxis}\n yAxis={yAxis}\n sizeAxis={sizeAxis}\n tooltip={tooltip}\n legend={legend}\n {...getDataAttributes(props)}\n {...baseComponentProps}\n />\n );\n },\n);\n\napplyDisplayName(CartesianChart, \"CartesianChart\");\n\nexport default CartesianChart;\n\nfunction transformSeries(\n untransformedSeries: readonly CartesianChartProps.SeriesOptions[],\n stacking?: \"normal\",\n): CartesianChartProps.SeriesOptions[] {\n const transformedSeries: CartesianChartProps.SeriesOptions[] = [];\n function transformSingleSeries(s: CartesianChartProps.SeriesOptions): null | CartesianChartProps.SeriesOptions {\n switch (s.type) {\n case \"area\":\n case \"areaspline\":\n case \"line\":\n case \"spline\":\n return transformLineLikeSeries(s, untransformedSeries);\n case \"column\":\n return transformColumnSeries(s, untransformedSeries);\n case \"scatter\":\n return transformScatterSeries(s, untransformedSeries);\n case \"bubble\":\n return transformBubbleSeries(s, untransformedSeries);\n case \"errorbar\":\n return transformErrorBarSeries(s, untransformedSeries, stacking);\n case \"x-threshold\":\n case \"y-threshold\":\n return transformThresholdSeries(s);\n default:\n return null;\n }\n }\n for (const series of untransformedSeries) {\n const transformed = transformSingleSeries(series);\n if (transformed) {\n transformedSeries.push(transformed);\n }\n }\n return transformedSeries;\n}\n\nfunction validateLinkedTo(\n series: CartesianChartProps.SeriesOptions,\n allSeries: readonly CartesianChartProps.SeriesOptions[],\n): boolean {\n if (isThreshold(series) || series.linkedTo === undefined) {\n return true;\n }\n // The incorrectly linked series will not appear in our custom legend and tooltip, so we remove them\n // from the series array. We also do not support linking series to errorbar or threshold series.\n const masterSeries = getMasterSeries(allSeries, series);\n if (!masterSeries || isErrorBar(masterSeries) || isThreshold(masterSeries)) {\n warnOnce(\"CartesianChart\", \"The `linkedTo` property points to a missing or unsupported series.\");\n return false;\n }\n return true;\n}\n\nfunction transformLineLikeSeries<\n S extends\n | CartesianChartProps.AreaSeriesOptions\n | CartesianChartProps.AreaSplineSeriesOptions\n | CartesianChartProps.LineSeriesOptions\n | CartesianChartProps.SplineSeriesOptions,\n>(s: S, allSeries: readonly CartesianChartProps.SeriesOptions[]): null | S {\n if (!validateLinkedTo(s, allSeries)) {\n return null;\n }\n const data = transformPointData(s.data);\n return {\n type: s.type,\n id: s.id,\n name: s.name,\n color: s.color,\n dashStyle: s.dashStyle,\n yAxis: s.yAxis,\n linkedTo: s.linkedTo,\n ...transformZones(s),\n data,\n } as S;\n}\n\nfunction transformColumnSeries<S extends CartesianChartProps.ColumnSeriesOptions>(\n s: S,\n allSeries: readonly CartesianChartProps.SeriesOptions[],\n): null | S {\n if (!validateLinkedTo(s, allSeries)) {\n return null;\n }\n const data = transformPointData(s.data);\n return {\n type: s.type,\n id: s.id,\n name: s.name,\n color: s.color,\n yAxis: s.yAxis,\n linkedTo: s.linkedTo,\n ...transformZones(s),\n data,\n } as S;\n}\n\nfunction transformScatterSeries<S extends CartesianChartProps.ScatterSeriesOptions>(\n s: S,\n allSeries: readonly CartesianChartProps.SeriesOptions[],\n): null | S {\n if (!validateLinkedTo(s, allSeries)) {\n return null;\n }\n const data = transformPointData(s.data);\n const marker = s.marker ?? {};\n return {\n type: s.type,\n id: s.id,\n name: s.name,\n color: s.color,\n yAxis: s.yAxis,\n linkedTo: s.linkedTo,\n data,\n marker,\n } as S;\n}\n\nfunction transformBubbleSeries<S extends CartesianChartProps.BubbleSeriesOptions>(\n s: S,\n allSeries: readonly CartesianChartProps.SeriesOptions[],\n): null | S {\n if (!validateLinkedTo(s, allSeries)) {\n return null;\n }\n const data = transformBubbleData(s.data);\n return {\n type: s.type,\n id: s.id,\n name: s.name,\n color: s.color,\n data,\n yAxis: s.yAxis,\n sizeAxis: s.sizeAxis,\n linkedTo: s.linkedTo,\n } as S;\n}\n\nfunction transformThresholdSeries<\n S extends CartesianChartProps.XThresholdSeriesOptions | CartesianChartProps.YThresholdSeriesOptions,\n>(s: S): null | S {\n const yAxis = s.type === \"y-threshold\" ? s.yAxis : undefined;\n return {\n type: s.type,\n id: s.id,\n name: s.name,\n color: s.color,\n yAxis,\n value: s.value,\n dashStyle: s.dashStyle,\n } as S;\n}\n\nfunction transformErrorBarSeries(\n series: CartesianChartProps.ErrorBarSeriesOptions,\n allSeries: readonly CartesianChartProps.SeriesOptions[],\n stacking?: \"normal\",\n): null | CartesianChartProps.ErrorBarSeriesOptions {\n // Highcharts only supports error bars for non-stacked series.\n // See: https://github.com/highcharts/highcharts/issues/23080.\n if (stacking) {\n warnOnce(\"CartesianChart\", \"Error bars are not supported for stacked series.\");\n return null;\n }\n // We only support error bars that are linked to some other series.\n if (!validateLinkedTo(series, allSeries)) {\n return null;\n }\n const data = transformRangeData(series.data);\n return {\n type: series.type,\n id: series.id,\n name: series.name,\n color: series.color,\n yAxis: series.yAxis,\n linkedTo: series.linkedTo,\n data,\n };\n}\n\nfunction transformPointData(data: readonly PointDataItemType[]): readonly PointDataItemType[] {\n return data.map((d) => (d && typeof d === \"object\" ? { x: d.x, y: d.y } : d));\n}\n\nfunction transformBubbleData(data: readonly SizePointDataItemOptions[]): readonly SizePointDataItemOptions[] {\n return data.map((d) => ({ x: d.x, y: d.y, size: d.size }));\n}\n\nfunction transformRangeData(data: readonly RangeDataItemOptions[]): readonly RangeDataItemOptions[] {\n return data.map((d) => ({ x: d.x, low: d.low, high: d.high }));\n}\n\nfunction transformZones(series: WithZones) {\n const zoneAxis = series.zoneAxis === \"x\" || series.zoneAxis === \"y\" ? series.zoneAxis : undefined;\n const zones = series.zones?.map(({ value, color, dashStyle }) => ({ value, color, dashStyle }));\n return { zoneAxis, zones };\n}\n\nfunction transformXAxisOptions(axis?: CartesianChartProps.XAxisOptions): CartesianChartProps.XAxisOptions {\n return transformAxisOptions(axis);\n}\n\nfunction transformYAxisOptions(\n axis?: CartesianChartProps.YAxisOptions | [CartesianChartProps.YAxisWithId, CartesianChartProps.YAxisWithId],\n): CartesianChartProps.YAxisOptions | [CartesianChartProps.YAxisWithId, CartesianChartProps.YAxisWithId] {\n if (Array.isArray(axis)) {\n return [transformSingleYAxisOptions(axis[0]), transformSingleYAxisOptions(axis[1])];\n }\n return transformSingleYAxisOptions(axis);\n}\n\nfunction transformSingleYAxisOptions<T extends CartesianChartProps.YAxisOptions>(axis?: T): T {\n return { ...transformAxisOptions(axis), reversedStacks: axis?.reversedStacks } as T;\n}\n\nfunction transformSizeAxisOptions(\n axis?: CartesianChartProps.SizeAxisOptions | readonly CartesianChartProps.SizeAxisOptions[],\n): undefined | CartesianChartProps.SizeAxisOptions[] {\n return castArray(axis as CartesianChartProps.SizeAxisOptions[])?.map((a) => ({\n id: a.id,\n title: a.title,\n valueFormatter: a.valueFormatter,\n }));\n}\n\nfunction transformAxisOptions<O extends CartesianChartProps.XAxisOptions | CartesianChartProps.YAxisOptions>(\n axis?: O,\n): O {\n return {\n id: axis?.id,\n type: axis?.type,\n title: axis?.title,\n min: axis?.min,\n max: axis?.max,\n tickInterval: axis?.tickInterval,\n categories: axis?.categories,\n valueFormatter: axis?.valueFormatter,\n } as O;\n}\n\nfunction transformTooltip(\n tooltip?: CartesianChartProps.TooltipOptions,\n): SomeRequired<CartesianChartProps.TooltipOptions, \"enabled\" | \"placement\" | \"size\"> {\n return {\n ...tooltip,\n enabled: tooltip?.enabled ?? true,\n placement: tooltip?.placement ?? \"middle\",\n size: tooltip?.size ?? \"medium\",\n };\n}\n\nfunction transformLegend(\n legend?: CartesianChartProps.LegendOptions,\n): SomeRequired<CartesianChartProps.LegendOptions, \"enabled\"> {\n return { ...legend, enabled: legend?.enabled ?? true };\n}\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/cartesian-chart/index.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AAEtC,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAEnC,OAAO,EAAE,QAAQ,EAAE,MAAM,+CAA+C,CAAC;AAGzE,OAAO,EAAE,iBAAiB,EAAE,MAAM,gDAAgD,CAAC;AACnF,OAAO,gBAAgB,MAAM,+CAA+C,CAAC;AAC7E,OAAO,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AACxE,OAAO,EAAE,SAAS,EAAgB,MAAM,yBAAyB,CAAC;AAClE,OAAO,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AAEpE,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAInE,MAAM,cAAc,GAAG,UAAU,CAC/B,CACE,EACE,SAAS,GAAG,KAAK,EACjB,QAAQ,GAAG,KAAK,EAChB,QAAQ,GAAG,SAAS,EACpB,iBAAiB,GAAG,IAAI,EACxB,0BAA0B,GAAG,KAAK,EAClC,GAAG,KAAK,EACY,EACtB,GAAuC,EACvC,EAAE;IACF,0FAA0F;IAC1F,2FAA2F;IAC3F,0EAA0E;IAC1E,MAAM,MAAM,GAAG,eAAe,CAAC,KAAK,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;IACvD,MAAM,KAAK,GAAG,qBAAqB,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IACjD,MAAM,KAAK,GAAG,qBAAqB,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IACjD,MAAM,Q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E,cAAc;KAChC,CAAC;AACT,CAAC;AAED,SAAS,gBAAgB,CACvB,OAA4C;;IAE5C,OAAO;QACL,GAAG,OAAO;QACV,OAAO,EAAE,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,OAAO,mCAAI,IAAI;QACjC,SAAS,EAAE,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,SAAS,mCAAI,QAAQ;QACzC,IAAI,EAAE,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,IAAI,mCAAI,QAAQ;KAChC,CAAC;AACJ,CAAC;AAED,SAAS,eAAe,CACtB,MAA0C;;IAE1C,OAAO,EAAE,GAAG,MAAM,EAAE,OAAO,EAAE,MAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,OAAO,mCAAI,IAAI,EAAE,CAAC;AACzD,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { forwardRef } from \"react\";\n\nimport { warnOnce } from \"@cloudscape-design/component-toolkit/internal\";\n\nimport { PointDataItemType, RangeDataItemOptions, SizePointDataItemOptions, WithZones } from \"../core/interfaces\";\nimport { getDataAttributes } from \"../internal/base-component/get-data-attributes\";\nimport useBaseComponent from \"../internal/base-component/use-base-component\";\nimport { applyDisplayName } from \"../internal/utils/apply-display-name\";\nimport { castArray, SomeRequired } from \"../internal/utils/utils\";\nimport { InternalCartesianChart } from \"./chart-cartesian-internal\";\nimport { CartesianChartProps } from \"./interfaces\";\nimport { getMasterSeries, isErrorBar, isThreshold } from \"./utils\";\n\nexport type { CartesianChartProps };\n\nconst CartesianChart = forwardRef(\n (\n {\n fitHeight = false,\n inverted = false,\n stacking = undefined,\n emphasizeBaseline = true,\n verticalAxisTitlePlacement = \"top\",\n ...props\n }: CartesianChartProps,\n ref: React.Ref<CartesianChartProps.Ref>,\n ) => {\n // We transform options before propagating them to the internal chart to ensure only those\n // defined in the component's contract can be propagated down to the underlying Highcharts.\n // Additionally, we assign all default options, including the nested ones.\n const series = transformSeries(props.series, stacking);\n const xAxis = transformXAxisOptions(props.xAxis);\n const yAxis = transformYAxisOptions(props.yAxis);\n const sizeAxis = transformSizeAxisOptions(props.sizeAxis);\n const tooltip = transformTooltip(props.tooltip);\n const legend = transformLegend(props.legend);\n\n const baseComponentProps = useBaseComponent(\"CartesianHighcharts\", {\n props: { fitHeight, inverted, stacking, emphasizeBaseline, verticalAxisTitlePlacement },\n metadata: {},\n });\n\n return (\n <InternalCartesianChart\n ref={ref}\n {...props}\n fitHeight={fitHeight}\n inverted={inverted}\n stacking={stacking}\n emphasizeBaseline={emphasizeBaseline}\n verticalAxisTitlePlacement={verticalAxisTitlePlacement}\n series={series}\n xAxis={xAxis}\n yAxis={yAxis}\n sizeAxis={sizeAxis}\n tooltip={tooltip}\n legend={legend}\n {...getDataAttributes(props)}\n {...baseComponentProps}\n />\n );\n },\n);\n\napplyDisplayName(CartesianChart, \"CartesianChart\");\n\nexport default CartesianChart;\n\nfunction transformSeries(\n untransformedSeries: readonly CartesianChartProps.SeriesOptions[],\n stacking?: \"normal\",\n): CartesianChartProps.SeriesOptions[] {\n const transformedSeries: CartesianChartProps.SeriesOptions[] = [];\n function transformSingleSeries(s: CartesianChartProps.SeriesOptions): null | CartesianChartProps.SeriesOptions {\n switch (s.type) {\n case \"area\":\n case \"areaspline\":\n return transformAreaSeries(s, untransformedSeries);\n case \"line\":\n case \"spline\":\n return transformLineLikeSeries(s, untransformedSeries);\n case \"column\":\n return transformColumnSeries(s, untransformedSeries);\n case \"scatter\":\n return transformScatterSeries(s, untransformedSeries);\n case \"bubble\":\n return transformBubbleSeries(s, untransformedSeries);\n case \"errorbar\":\n return transformErrorBarSeries(s, untransformedSeries, stacking);\n case \"x-threshold\":\n case \"y-threshold\":\n return transformThresholdSeries(s);\n default:\n return null;\n }\n }\n for (const series of untransformedSeries) {\n const transformed = transformSingleSeries(series);\n if (transformed) {\n transformedSeries.push(transformed);\n }\n }\n return transformedSeries;\n}\n\nfunction validateLinkedTo(\n series: CartesianChartProps.SeriesOptions,\n allSeries: readonly CartesianChartProps.SeriesOptions[],\n): boolean {\n if (isThreshold(series) || series.linkedTo === undefined) {\n return true;\n }\n // The incorrectly linked series will not appear in our custom legend and tooltip, so we remove them\n // from the series array. We also do not support linking series to errorbar or threshold series.\n const masterSeries = getMasterSeries(allSeries, series);\n if (!masterSeries || isErrorBar(masterSeries) || isThreshold(masterSeries)) {\n warnOnce(\"CartesianChart\", \"The `linkedTo` property points to a missing or unsupported series.\");\n return false;\n }\n return true;\n}\n\nfunction transformLineLikeSeries<\n S extends\n | CartesianChartProps.AreaSeriesOptions\n | CartesianChartProps.AreaSplineSeriesOptions\n | CartesianChartProps.LineSeriesOptions\n | CartesianChartProps.SplineSeriesOptions,\n>(s: S, allSeries: readonly CartesianChartProps.SeriesOptions[]): null | S {\n if (!validateLinkedTo(s, allSeries)) {\n return null;\n }\n const data = transformPointData(s.data);\n return {\n type: s.type,\n id: s.id,\n name: s.name,\n color: s.color,\n dashStyle: s.dashStyle,\n yAxis: s.yAxis,\n linkedTo: s.linkedTo,\n ...transformZones(s),\n data,\n } as S;\n}\n\nfunction transformAreaSeries<\n S extends CartesianChartProps.AreaSeriesOptions | CartesianChartProps.AreaSplineSeriesOptions,\n>(s: S, allSeries: readonly CartesianChartProps.SeriesOptions[]): null | S {\n const transformed = transformLineLikeSeries(s, allSeries);\n // Only forward fillOpacity when set; spreading `undefined` would clear the default fill opacity.\n if (transformed === null || s.fillOpacity === undefined) {\n return transformed;\n }\n return { ...transformed, fillOpacity: s.fillOpacity } as S;\n}\n\nfunction transformColumnSeries<S extends CartesianChartProps.ColumnSeriesOptions>(\n s: S,\n allSeries: readonly CartesianChartProps.SeriesOptions[],\n): null | S {\n if (!validateLinkedTo(s, allSeries)) {\n return null;\n }\n const data = transformPointData(s.data);\n return {\n type: s.type,\n id: s.id,\n name: s.name,\n color: s.color,\n yAxis: s.yAxis,\n linkedTo: s.linkedTo,\n ...transformZones(s),\n data,\n } as S;\n}\n\nfunction transformScatterSeries<S extends CartesianChartProps.ScatterSeriesOptions>(\n s: S,\n allSeries: readonly CartesianChartProps.SeriesOptions[],\n): null | S {\n if (!validateLinkedTo(s, allSeries)) {\n return null;\n }\n const data = transformPointData(s.data);\n const marker = s.marker ?? {};\n return {\n type: s.type,\n id: s.id,\n name: s.name,\n color: s.color,\n yAxis: s.yAxis,\n linkedTo: s.linkedTo,\n data,\n marker,\n } as S;\n}\n\nfunction transformBubbleSeries<S extends CartesianChartProps.BubbleSeriesOptions>(\n s: S,\n allSeries: readonly CartesianChartProps.SeriesOptions[],\n): null | S {\n if (!validateLinkedTo(s, allSeries)) {\n return null;\n }\n const data = transformBubbleData(s.data);\n return {\n type: s.type,\n id: s.id,\n name: s.name,\n color: s.color,\n data,\n yAxis: s.yAxis,\n sizeAxis: s.sizeAxis,\n linkedTo: s.linkedTo,\n } as S;\n}\n\nfunction transformThresholdSeries<\n S extends CartesianChartProps.XThresholdSeriesOptions | CartesianChartProps.YThresholdSeriesOptions,\n>(s: S): null | S {\n const yAxis = s.type === \"y-threshold\" ? s.yAxis : undefined;\n return {\n type: s.type,\n id: s.id,\n name: s.name,\n color: s.color,\n yAxis,\n value: s.value,\n dashStyle: s.dashStyle,\n } as S;\n}\n\nfunction transformErrorBarSeries(\n series: CartesianChartProps.ErrorBarSeriesOptions,\n allSeries: readonly CartesianChartProps.SeriesOptions[],\n stacking?: \"normal\",\n): null | CartesianChartProps.ErrorBarSeriesOptions {\n // Highcharts only supports error bars for non-stacked series.\n // See: https://github.com/highcharts/highcharts/issues/23080.\n if (stacking) {\n warnOnce(\"CartesianChart\", \"Error bars are not supported for stacked series.\");\n return null;\n }\n // We only support error bars that are linked to some other series.\n if (!validateLinkedTo(series, allSeries)) {\n return null;\n }\n const data = transformRangeData(series.data);\n return {\n type: series.type,\n id: series.id,\n name: series.name,\n color: series.color,\n yAxis: series.yAxis,\n linkedTo: series.linkedTo,\n data,\n };\n}\n\nfunction transformPointData(data: readonly PointDataItemType[]): readonly PointDataItemType[] {\n return data.map((d) => (d && typeof d === \"object\" ? { x: d.x, y: d.y } : d));\n}\n\nfunction transformBubbleData(data: readonly SizePointDataItemOptions[]): readonly SizePointDataItemOptions[] {\n return data.map((d) => ({ x: d.x, y: d.y, size: d.size }));\n}\n\nfunction transformRangeData(data: readonly RangeDataItemOptions[]): readonly RangeDataItemOptions[] {\n return data.map((d) => ({ x: d.x, low: d.low, high: d.high }));\n}\n\nfunction transformZones(series: WithZones) {\n const zoneAxis = series.zoneAxis === \"x\" || series.zoneAxis === \"y\" ? series.zoneAxis : undefined;\n const zones = series.zones?.map(({ value, color, dashStyle }) => ({ value, color, dashStyle }));\n return { zoneAxis, zones };\n}\n\nfunction transformXAxisOptions(axis?: CartesianChartProps.XAxisOptions): CartesianChartProps.XAxisOptions {\n return transformAxisOptions(axis);\n}\n\nfunction transformYAxisOptions(\n axis?: CartesianChartProps.YAxisOptions | [CartesianChartProps.YAxisWithId, CartesianChartProps.YAxisWithId],\n): CartesianChartProps.YAxisOptions | [CartesianChartProps.YAxisWithId, CartesianChartProps.YAxisWithId] {\n if (Array.isArray(axis)) {\n return [transformSingleYAxisOptions(axis[0]), transformSingleYAxisOptions(axis[1])];\n }\n return transformSingleYAxisOptions(axis);\n}\n\nfunction transformSingleYAxisOptions<T extends CartesianChartProps.YAxisOptions>(axis?: T): T {\n return { ...transformAxisOptions(axis), reversedStacks: axis?.reversedStacks } as T;\n}\n\nfunction transformSizeAxisOptions(\n axis?: CartesianChartProps.SizeAxisOptions | readonly CartesianChartProps.SizeAxisOptions[],\n): undefined | CartesianChartProps.SizeAxisOptions[] {\n return castArray(axis as CartesianChartProps.SizeAxisOptions[])?.map((a) => ({\n id: a.id,\n title: a.title,\n valueFormatter: a.valueFormatter,\n }));\n}\n\nfunction transformAxisOptions<O extends CartesianChartProps.XAxisOptions | CartesianChartProps.YAxisOptions>(\n axis?: O,\n): O {\n return {\n id: axis?.id,\n type: axis?.type,\n title: axis?.title,\n min: axis?.min,\n max: axis?.max,\n tickInterval: axis?.tickInterval,\n categories: axis?.categories,\n valueFormatter: axis?.valueFormatter,\n } as O;\n}\n\nfunction transformTooltip(\n tooltip?: CartesianChartProps.TooltipOptions,\n): SomeRequired<CartesianChartProps.TooltipOptions, \"enabled\" | \"placement\" | \"size\"> {\n return {\n ...tooltip,\n enabled: tooltip?.enabled ?? true,\n placement: tooltip?.placement ?? \"middle\",\n size: tooltip?.size ?? \"medium\",\n };\n}\n\nfunction transformLegend(\n legend?: CartesianChartProps.LegendOptions,\n): SomeRequired<CartesianChartProps.LegendOptions, \"enabled\"> {\n return { ...legend, enabled: legend?.enabled ?? true };\n}\n"]}
@@ -180,10 +180,14 @@ export interface BaseTooltipPointFormatted {
180
180
  export interface AreaSeriesOptions extends BaseCartesianLineLikeOptions, LinkableSeries, WithZones {
181
181
  type: "area";
182
182
  data: readonly PointDataItemType[];
183
+ /** Opacity of the area fill, from 0 (transparent) to 1 (opaque). Defaults to 0.4. */
184
+ fillOpacity?: number;
183
185
  }
184
186
  export interface AreaSplineSeriesOptions extends BaseCartesianLineLikeOptions, LinkableSeries, WithZones {
185
187
  type: "areaspline";
186
188
  data: readonly PointDataItemType[];
189
+ /** Opacity of the area fill, from 0 (transparent) to 1 (opaque). Defaults to 0.4. */
190
+ fillOpacity?: number;
187
191
  }
188
192
  export interface ColumnSeriesOptions extends BaseCartesianSeriesOptions, LinkableSeries, WithZones {
189
193
  type: "column";
@@ -1 +1 @@
1
- {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/core/interfaces.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport type Highcharts from \"highcharts\";\n\nimport type * as InternalComponentTypes from \"../internal/components/interfaces\";\nimport { ChartSeriesMarkerStatus } from \"../internal/components/series-marker/interfaces\";\nimport { type NonCancelableEventHandler } from \"../internal/events\";\n\n// All charts take `highcharts` instance, that can be served statically or dynamically.\n// Although it has to be of type Highcharts, the TS type we use is `null | object`, so\n// that it is ignored by the documenter.\n\n/**\n * This interface includes common public chart properties, applicable for all chart types.\n */\nexport interface BaseChartOptions {\n /**\n * The Highcharts instance, which can be obtained using `import Highcharts from \"highcharts\"`.\n * Supported Highcharts versions: 12.\n */\n highcharts: null | object;\n\n /**\n * Custom content that renders when `highcharts=null`. It renders a spinner if not defined.\n */\n fallback?: React.ReactNode;\n\n /**\n * The height of the chart plot in pixels. It does not include legend and filter.\n */\n chartHeight?: number;\n\n /**\n * The chart automatically adjusts its height to fill the parent container when this property is set.\n */\n fitHeight?: boolean;\n\n /**\n * Defines the minimum allowed height of the chart plot. Use this when `fitHeight=true` to\n * prevent the chart plot from becoming too small to display its content. When the parent\n * container is shorter than the minimum height, a vertical scrollbar appears automatically.\n */\n chartMinHeight?: number;\n\n /**\n * Defines the minimum allowed width of the chart plot. When the parent container is narrower than the\n * minimum width, the horizontal scrollbar is automatically added.\n */\n chartMinWidth?: number;\n\n /**\n * Defines the ARIA label for the chart container.\n * This property corresponds to [lang.chartContainerLabel](https://api.highcharts.com/highcharts/lang.accessibility.chartContainerLabel),\n * and requires the [accessibility module](https://www.highcharts.com/docs/accessibility/accessibility-module).\n */\n ariaLabel?: string;\n\n /**\n * Defines the ARIA description of the chart container.\n * This property corresponds to [accessibility.description](https://api.highcharts.com/highcharts/accessibility.description),\n * and requires the [accessibility module](https://www.highcharts.com/docs/accessibility/accessibility-module).\n */\n ariaDescription?: string;\n\n /**\n * Defines chart legend options, including:\n * * `enabled` (optional, boolean) - Hides legend when set to `false`.\n * * `title` (optional, string) - Visible label, shown above the legend.\n * * `actions` (optional, slot) - A slot before the legend that can be used to render custom actions.\n */\n legend?: BaseLegendOptions;\n\n /**\n * Defines options to represent empty, no-match, loading, and error state of the chart, including:\n * * `statusType` (optional, \"finished\" | \"loading\" | \"error\") - Specifies the current status of loading data.\n * * `empty` (optional, ReactNode) - Content displayed when the chart data is empty.\n * * `noMatch` (optional, ReactNode) - Content displayed when there is no data to display due to the built-in filtering.\n * * `loading` (optional, ReactNode) - Content displayed when `statusType=\"loading\"`. If omitted, the default loading state\n * is shown, using `i18n.loadingText` or built-in i18n.\n * * `error` (optional, ReactNode) - Content displayed when `statusType=\"error\"`. If omitted, the default error state\n * is shown, using `i18n.errorText` and `i18n.recoveryText` (when `onRecoveryClick` is provided), or built-in i18n.\n * * `onRecoveryClick` (optional, function) - Called when the user clicks the recovery button that appears when using default error\n * state, and only if `onRecoveryClick` is provided. Use this to enable the user to retry a failed request or provide another option\n * for the user to recover from the error.\n */\n noData?: BaseNoDataOptions;\n\n /**\n * Defines options for filtering in the chart, including:\n * * `seriesFilter` (optional, boolean) - Displays default series filter at the top of the chart.\n * * `additionalFilters` (optional, slot) - A slot for custom chart filters at the top of the chart.\n */\n filter?: BaseFilterOptions;\n}\n\nexport interface BaseLegendOptions {\n enabled?: boolean;\n title?: string;\n actions?: React.ReactNode;\n}\n\nexport interface BaseNoDataOptions {\n statusType?: \"finished\" | \"loading\" | \"error\";\n empty?: React.ReactNode;\n error?: React.ReactNode;\n loading?: React.ReactNode;\n noMatch?: React.ReactNode;\n onRecoveryClick?: NonCancelableEventHandler;\n}\n\nexport interface BaseTooltipDetail {\n key: React.ReactNode;\n value: React.ReactNode;\n}\n\nexport interface BaseI18nStrings {\n loadingText?: string;\n errorText?: string;\n recoveryText?: string;\n seriesFilterLabel?: string;\n seriesFilterPlaceholder?: string;\n seriesFilterSelectedAriaLabel?: string;\n legendAriaLabel?: string;\n detailPopoverDismissAriaLabel?: string;\n chartRoleDescription?: string;\n}\n\nexport interface CoreI18nStrings extends BaseI18nStrings {\n /**\n * ARIA label for the secondary legend when using dual axes charts.\n *\n * **Important**: When using dual axes, you should explicitly provide visible titles or ARIA labels\n * for both the primary and secondary legends to ensure proper accessibility. The primary legend\n * has built-in i18n support through `legendAriaLabel`, but the secondary legend currently requires\n * this property to be explicitly provided.\n */\n secondaryLegendAriaLabel?: string;\n\n /**\n * ARIA label for the marker of a series. Series with status \"default\" will not announce a label, thus excluded by this method.\n */\n itemMarkerStatusAriaLabel?: (status: Exclude<ChartSeriesMarkerStatus, \"default\">) => string;\n}\n\nexport interface WithCartesianI18nStrings {\n /**\n * An object that contains all of the localized strings required by the component.\n * @i18n\n *\n * Available properties:\n * * `loadingText` (optional, string) - Text, displayed when the chart is loading, i.e. when `noData.statusType` is set to \"loading\".\n * * `errorText` (optional, string) - Text, displayed when the chart is in error state, i.e. when `noData.statusType` is set to \"error\".\n * * `recoveryText` (optional, string) - Text for the recovery button, displayed next to the error text.\n * * `seriesFilterLabel` (optional, string) - Text for the visible label of the default series filter.\n * * `seriesFilterPlaceholder` (optional, string) - Text for the default series filter placeholder.\n * * `seriesFilterSelectedAriaLabel` (optional, string) - ARIA label of the default series filter which is appended to any option that is selected.\n * * `legendAriaLabel` (optional, string) - ARIA label that is associated with the legend in case there is no visible `legend.title` defined.\n * * `detailPopoverDismissAriaLabel` (optional, string) - ARIA label for the details popover dismiss button.\n * * `chartRoleDescription` (optional, string) - Accessible role description of the chart plot area, e.g. \"interactive chart\".\n * * `xAxisRoleDescription` (optional, string) - Accessible role description of the x axis, e.g. \"x axis\".\n * * `yAxisRoleDescription` (optional, string) - Accessible role description of the y axis, e.g. \"y axis\".\n */\n i18nStrings?: CartesianI18nStrings;\n}\n\nexport interface WithPieI18nStrings {\n /**\n * An object that contains all of the localized strings required by the component.\n * @i18n\n *\n * Available properties:\n * * `loadingText` (optional, string) - Text, displayed when the chart is loading, i.e. when `noData.statusType` is set to \"loading\".\n * * `errorText` (optional, string) - Text, displayed when the chart is in error state, i.e. when `noData.statusType` is set to \"error\".\n * * `recoveryText` (optional, string) - Text for the recovery button, displayed next to the error text.\n * * `seriesFilterLabel` (optional, string) - Text for the visible label of the default series filter.\n * * `seriesFilterPlaceholder` (optional, string) - Text for the default series filter placeholder.\n * * `seriesFilterSelectedAriaLabel` (optional, string) - ARIA label of the default series filter which is appended to any option that is selected.\n * * `legendAriaLabel` (optional, string) - ARIA label that is associated with the legend in case there is no visible `legend.title` defined.\n * * `detailPopoverDismissAriaLabel` (optional, string) - ARIA label for the details popover dismiss button.\n * * `chartRoleDescription` (optional, string) - Accessible role description of the chart plot area, e.g. \"interactive chart\".\n * * `segmentRoleDescription` (optional, string) - Accessible role description of the segment.\n */\n i18nStrings?: PieI18nStrings;\n}\n\nexport interface CartesianI18nStrings extends BaseI18nStrings {\n xAxisRoleDescription?: string;\n yAxisRoleDescription?: string;\n}\n\nexport interface PieI18nStrings extends BaseI18nStrings {\n segmentRoleDescription?: string;\n}\n\nexport interface BaseFilterOptions {\n seriesFilter?: boolean;\n additionalFilters?: React.ReactNode;\n}\n\nexport interface BaseTooltipPointFormatted {\n key?: React.ReactNode;\n value?: React.ReactNode;\n description?: React.ReactNode;\n expandable?: boolean;\n subItems?: ReadonlyArray<{ key: React.ReactNode; value: React.ReactNode }>;\n}\n\nexport interface AreaSeriesOptions extends BaseCartesianLineLikeOptions, LinkableSeries, WithZones {\n type: \"area\";\n data: readonly PointDataItemType[];\n}\n\nexport interface AreaSplineSeriesOptions extends BaseCartesianLineLikeOptions, LinkableSeries, WithZones {\n type: \"areaspline\";\n data: readonly PointDataItemType[];\n}\n\nexport interface ColumnSeriesOptions extends BaseCartesianSeriesOptions, LinkableSeries, WithZones {\n type: \"column\";\n data: readonly PointDataItemType[];\n}\n\nexport interface LineSeriesOptions extends BaseCartesianLineLikeOptions, LinkableSeries, WithZones {\n type: \"line\";\n data: readonly PointDataItemType[];\n}\n\nexport interface SplineSeriesOptions extends BaseCartesianLineLikeOptions, LinkableSeries, WithZones {\n type: \"spline\";\n data: readonly PointDataItemType[];\n}\n\nexport interface ScatterSeriesOptions extends BaseCartesianSeriesOptions, LinkableSeries {\n type: \"scatter\";\n data: readonly PointDataItemType[];\n marker?: PointMarkerOptions;\n}\n\nexport interface BubbleSeriesOptions extends BaseCartesianSeriesOptions, LinkableSeries {\n type: \"bubble\";\n sizeAxis?: string;\n data: readonly SizePointDataItemOptions[];\n}\n\nexport interface ErrorBarSeriesOptions extends Omit<BaseCartesianSeriesOptions, \"name\"> {\n type: \"errorbar\";\n name?: string;\n data: readonly RangeDataItemOptions[];\n linkedTo: string;\n}\n\n// X-threshold series render as vertical plot lines spanning the full chart height,\n// so they are not associated with a specific y-axis and omit yAxis.\nexport interface XThresholdSeriesOptions extends Omit<BaseCartesianLineLikeOptions, \"yAxis\"> {\n type: \"x-threshold\";\n value: number;\n}\n\nexport interface YThresholdSeriesOptions extends BaseCartesianLineLikeOptions {\n type: \"y-threshold\";\n value: number;\n}\n\nexport interface PieSeriesOptions extends BaseSeriesOptions {\n type: \"pie\";\n data: readonly PieSegmentOptions[];\n}\n\nexport interface DonutSeriesOptions extends BaseSeriesOptions {\n type: \"donut\";\n data: readonly PieSegmentOptions[];\n}\n\nexport interface PieSegmentOptions {\n y: number | null;\n id?: string;\n name: string;\n color?: string;\n}\n\nexport type PointDataItemType = null | number | PointDataItemOptions;\n\nexport interface PointDataItemOptions {\n x?: number;\n y: number | null;\n}\n\nexport interface SizePointDataItemOptions {\n x?: number;\n y: number | null;\n size: number;\n}\n\nexport interface RangeDataItemOptions {\n x?: number;\n low: number;\n high: number;\n}\n\ninterface BaseSeriesOptions {\n id?: string;\n name: string;\n color?: string;\n}\n\ninterface BaseCartesianSeriesOptions extends BaseSeriesOptions {\n yAxis?: string;\n}\n\nexport interface LinkableSeries {\n /**\n * Links this series to another series by ID, or `\":previous\"` for the immediately preceding series.\n * A linked series does not appear as a separate item in the legend or series filter, and its visibility\n * follows the series it is linked to. It still renders in the chart and appears as a separate row in the tooltip.\n *\n * Use this to attach projected, forecast, or supplementary series to a primary series without cluttering the legend.\n */\n linkedTo?: string;\n}\n\nexport interface WithZones {\n zoneAxis?: \"x\" | \"y\";\n zones?: readonly SeriesZone[];\n}\n\nexport interface SeriesZone {\n value?: number;\n color?: string;\n dashStyle?: Highcharts.DashStyleValue;\n}\n\ninterface BaseCartesianLineLikeOptions extends BaseCartesianSeriesOptions {\n dashStyle?: Highcharts.DashStyleValue;\n}\n\n// The symbols union matches that of Highcharts.PointMarkerOptionsObject\ninterface PointMarkerOptions {\n symbol?: \"circle\" | \"diamond\" | \"square\" | \"triangle\" | \"triangle-down\";\n}\n\nexport interface CoreCartesianOptions {\n /**\n * When set to `true`, adds a visual emphasis on the zero baseline axis.\n */\n emphasizeBaseline?: boolean;\n /**\n * Controls the placement of the vertical axis title.\n * When set to \"side\", displays the title along the axis line.\n */\n verticalAxisTitlePlacement?: \"top\" | \"side\";\n}\n\nexport interface CoreChartProps\n extends\n Pick<\n BaseChartOptions,\n | \"highcharts\"\n | \"fallback\"\n | \"fitHeight\"\n | \"chartHeight\"\n | \"chartMinHeight\"\n | \"chartMinWidth\"\n | \"ariaLabel\"\n | \"ariaDescription\"\n | \"filter\"\n | \"noData\"\n >,\n CoreCartesianOptions {\n /**\n * The Highcharts options. Cloudscape injects custom styles and settings, but all can be\n * overridden with explicitly provided options. An exception is event handlers - those are\n * not overridden, but merged with Cloudscape event handlers so that both are getting called.\n */\n options: CoreChartProps.ChartOptions;\n /**\n * The Cloudscape tooltip, that comes with a vertical cursor when used on cartesian series.\n * The tooltip content is only shown when `getContent` property is defined, which is called\n * for each visited { x, y } point.\n */\n tooltip?: CoreChartProps.TooltipOptions;\n /**\n * A custom slot above the chart plot, chart's axis title, and filter.\n */\n header?: CoreChartProps.HeaderOptions;\n /**\n * Prop for passing a custom navigation control component to be rendered with the chart.\n * Use this property to add timeline navigation, range selectors, or other custom navigation elements.\n */\n navigator?: React.ReactNode;\n /**\n * A custom slot below the chart plot and legend.\n */\n footer?: CoreChartProps.FooterOptions;\n /**\n * Chart legend options.\n */\n legend?: CoreChartProps.LegendOptions;\n /**\n * The callback to init the chart's API when it is ready. The API includes the Highcharts chart object, and\n * additional Cloudscape methods.\n */\n callback?: (chart: CoreChartProps.ChartAPI) => void;\n /**\n * This is used to provide a test-utils selector. Do not use this property to provide custom styles.\n */\n className?: string;\n /**\n * IDs of visible series or points.\n */\n visibleItems?: readonly string[];\n /**\n * Called when a legend item is highlighted.\n */\n onLegendItemHighlight?: NonCancelableEventHandler<CoreChartProps.LegendItemHighlightDetail>;\n /**\n * Called when series/points visibility changes due to user interaction with legend or filter.\n */\n onVisibleItemsChange?: NonCancelableEventHandler<CoreChartProps.VisibleItemsChangeDetail>;\n /**\n * Called whenever chart tooltip is rendered to provide content for tooltip's header, body, and (optional) footer.\n */\n getTooltipContent?: CoreChartProps.GetTooltipContent;\n /**\n * Called whenever a legend item is hovered to provide content for legend tooltip's header, body, and (optional) footer.\n * If not provided, no tooltip will be displayed.\n */\n getLegendTooltipContent?: CoreChartProps.GetLegendTooltipContent;\n /**\n * Called whenever chart point or group is highlighted.\n */\n onHighlight?: NonCancelableEventHandler<CoreChartProps.HighlightChangeDetail>;\n /**\n * Called whenever chart point or group loses highlight.\n */\n onClearHighlight?: NonCancelableEventHandler<CoreChartProps.HighlightClearDetail>;\n /**\n * Use Cloudscape keyboard navigation.\n */\n keyboardNavigation?: boolean;\n /**\n * An object that contains all of the localized strings required by the component.\n * @i18n\n */\n i18nStrings?: CoreChartProps.I18nStrings;\n /**\n * Specifies the options for each item in the chart.\n */\n getItemOptions?: CoreChartProps.GetItemOptions;\n\n sizeAxis?: CoreChartProps.SizeAxisOptions | readonly CoreChartProps.SizeAxisOptions[];\n}\n\nexport namespace CoreChartProps {\n // The API methods allow programmatic triggering of chart's behaviors, some of which are not accessible via React state.\n // This enables advanced integration scenarios, such as building a custom legend, or making multiple charts synchronized.\n export interface ChartAPI {\n chart: Highcharts.Chart;\n highcharts: typeof Highcharts;\n highlightItems(itemIds: readonly string[]): void;\n setItemsVisible(itemIds: readonly string[]): void;\n highlightChartPoint(point: Highcharts.Point): void;\n highlightChartGroup(group: readonly Highcharts.Point[]): void;\n clearChartHighlight(): void;\n }\n\n /**\n * The item id. Can be the id of a series or a point.\n */\n export type GetItemOptions = (itemId: string) => CoreChartProps.ChartItemOptions;\n\n // The extended version of Highcharts.Options. The axes types are extended with Cloudscape value formatter.\n // We use a custom formatter because we cannot use the built-in Highcharts formatter for our tooltip.\n export type ChartOptions = Omit<Highcharts.Options, \"xAxis\" | \"yAxis\"> & {\n xAxis?: XAxisOptions | XAxisOptions[];\n yAxis?: YAxisOptions | YAxisOptions[];\n };\n export type XAxisOptions = Highcharts.XAxisOptions & { valueFormatter?: (value: null | number) => string };\n export type YAxisOptions = Highcharts.YAxisOptions & { valueFormatter?: (value: null | number) => string };\n\n export interface SizeAxisOptions {\n id?: string;\n title: string;\n valueFormatter?: (value: null | number) => string;\n }\n\n export interface ChartItemOptions {\n /**\n * If specified, specifies the status of an item.\n * An item can be a point or a series.\n */\n status?: ChartSeriesMarkerStatus;\n }\n\n export interface HeaderOptions {\n content: React.ReactNode;\n }\n export interface FooterOptions {\n content: React.ReactNode;\n }\n\n export interface LegendOptions extends BaseLegendOptions {\n bottomMaxHeight?: number;\n position?: \"bottom\" | \"side\";\n /**\n * This property only applies when there are secondary items.\n */\n secondaryLegendTitle?: string;\n /**\n * This property only applies when there are secondary items.\n */\n secondaryLegendActions?: React.ReactNode;\n /**\n * When set to true, enables horizontal scrolling for legend items with long text.\n * By default, long text is truncated with ellipsis.\n */\n enableHorizontalScroll?: boolean;\n /**\n * This property only applies when there are no secondary items and `position=\"bottom\"`.\n */\n horizontalAlignment?: LegendOptionsHorizontalAlignment;\n }\n\n export type LegendOptionsHorizontalAlignment = \"start\" | \"center\";\n\n export type LegendItem = InternalComponentTypes.LegendItem;\n export type LegendTooltipContent = InternalComponentTypes.LegendTooltipContent;\n export type GetLegendTooltipContent = InternalComponentTypes.GetLegendTooltipContent;\n export type GetLegendTooltipContentProps = InternalComponentTypes.GetLegendTooltipContentProps;\n\n export interface TooltipOptions {\n enabled?: boolean;\n placement?: \"middle\" | \"outside\" | \"target\";\n size?: \"small\" | \"medium\" | \"large\";\n debounce?: number | boolean;\n seriesSorting?: \"as-added\" | \"by-value-desc\";\n }\n\n export type GetTooltipContent = (props: GetTooltipContentProps) => TooltipContentRenderer;\n export interface GetTooltipContentProps {\n point: null | Highcharts.Point;\n group: readonly Highcharts.Point[];\n }\n export interface TooltipContentRenderer {\n point?: (props: TooltipPointProps) => TooltipPointFormatted;\n details?: (props: TooltipDetailsProps) => readonly TooltipDetail[];\n header?: (props: TooltipSlotProps) => React.ReactNode;\n body?: (props: TooltipSlotProps) => React.ReactNode;\n footer?: (props: TooltipSlotProps) => React.ReactNode;\n }\n export type TooltipPointFormatted = BaseTooltipPointFormatted;\n export interface TooltipContentItem {\n point: Highcharts.Point;\n errorRanges: Highcharts.Point[];\n }\n export interface TooltipPointProps {\n item: TooltipContentItem;\n hideTooltip: () => void;\n }\n export interface TooltipSlotProps {\n x: number;\n items: TooltipContentItem[];\n hideTooltip: () => void;\n }\n\n export interface TooltipDetailsProps {\n point: Highcharts.Point;\n hideTooltip: () => void;\n }\n\n export type TooltipDetail = BaseTooltipDetail;\n\n export interface LegendItemHighlightDetail {\n item: LegendItem;\n }\n\n export interface ApiInteraction {\n interactionType: \"api\";\n }\n export interface FilterInteraction {\n interactionType: \"filter\";\n }\n export interface ToggleInteraction {\n interactionType: \"toggle\";\n targetItemId: string;\n }\n export interface SelectInteraction {\n interactionType: \"select\";\n targetItemId: string;\n }\n\n export type InteractionKind = ApiInteraction | FilterInteraction | ToggleInteraction | SelectInteraction;\n\n export type VisibleItemsChangeDetail = { items: readonly LegendItem[] } & InteractionKind;\n\n export interface HighlightChangeDetail {\n point: null | Highcharts.Point;\n group: readonly Highcharts.Point[];\n isApiCall: boolean;\n }\n export interface HighlightClearDetail {\n isApiCall: boolean;\n }\n\n export type I18nStrings = CartesianI18nStrings & PieI18nStrings & CoreI18nStrings;\n}\n\nexport interface CoreLegendProps {\n items: readonly CoreLegendProps.Item[];\n title?: string;\n ariaLabel?: string;\n actions?: React.ReactNode;\n alignment?: \"horizontal\" | \"vertical\";\n enableHorizontalScroll?: boolean;\n horizontalAlignment?: CoreChartProps.LegendOptionsHorizontalAlignment;\n onClearHighlight?: NonCancelableEventHandler;\n onItemHighlight?: NonCancelableEventHandler<CoreLegendProps.ItemHighlightDetail>;\n onVisibleItemsChange?: NonCancelableEventHandler<CoreLegendProps.VisibleItemsChangeDetail>;\n getLegendTooltipContent?: CoreLegendProps.GetTooltipContent;\n}\n\nexport namespace CoreLegendProps {\n export type Item = InternalComponentTypes.LegendItem;\n export type GetTooltipContent = InternalComponentTypes.GetLegendTooltipContent;\n export interface ItemHighlightDetail {\n item: Item;\n }\n export type VisibleItemsChangeDetail = { items: readonly string[] } & (\n | CoreChartProps.ToggleInteraction\n | CoreChartProps.SelectInteraction\n );\n}\n\n// Utility types\n\nexport interface Rect {\n x: number;\n y: number;\n height: number;\n width: number;\n}\n"]}
1
+ {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/core/interfaces.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport type Highcharts from \"highcharts\";\n\nimport type * as InternalComponentTypes from \"../internal/components/interfaces\";\nimport { ChartSeriesMarkerStatus } from \"../internal/components/series-marker/interfaces\";\nimport { type NonCancelableEventHandler } from \"../internal/events\";\n\n// All charts take `highcharts` instance, that can be served statically or dynamically.\n// Although it has to be of type Highcharts, the TS type we use is `null | object`, so\n// that it is ignored by the documenter.\n\n/**\n * This interface includes common public chart properties, applicable for all chart types.\n */\nexport interface BaseChartOptions {\n /**\n * The Highcharts instance, which can be obtained using `import Highcharts from \"highcharts\"`.\n * Supported Highcharts versions: 12.\n */\n highcharts: null | object;\n\n /**\n * Custom content that renders when `highcharts=null`. It renders a spinner if not defined.\n */\n fallback?: React.ReactNode;\n\n /**\n * The height of the chart plot in pixels. It does not include legend and filter.\n */\n chartHeight?: number;\n\n /**\n * The chart automatically adjusts its height to fill the parent container when this property is set.\n */\n fitHeight?: boolean;\n\n /**\n * Defines the minimum allowed height of the chart plot. Use this when `fitHeight=true` to\n * prevent the chart plot from becoming too small to display its content. When the parent\n * container is shorter than the minimum height, a vertical scrollbar appears automatically.\n */\n chartMinHeight?: number;\n\n /**\n * Defines the minimum allowed width of the chart plot. When the parent container is narrower than the\n * minimum width, the horizontal scrollbar is automatically added.\n */\n chartMinWidth?: number;\n\n /**\n * Defines the ARIA label for the chart container.\n * This property corresponds to [lang.chartContainerLabel](https://api.highcharts.com/highcharts/lang.accessibility.chartContainerLabel),\n * and requires the [accessibility module](https://www.highcharts.com/docs/accessibility/accessibility-module).\n */\n ariaLabel?: string;\n\n /**\n * Defines the ARIA description of the chart container.\n * This property corresponds to [accessibility.description](https://api.highcharts.com/highcharts/accessibility.description),\n * and requires the [accessibility module](https://www.highcharts.com/docs/accessibility/accessibility-module).\n */\n ariaDescription?: string;\n\n /**\n * Defines chart legend options, including:\n * * `enabled` (optional, boolean) - Hides legend when set to `false`.\n * * `title` (optional, string) - Visible label, shown above the legend.\n * * `actions` (optional, slot) - A slot before the legend that can be used to render custom actions.\n */\n legend?: BaseLegendOptions;\n\n /**\n * Defines options to represent empty, no-match, loading, and error state of the chart, including:\n * * `statusType` (optional, \"finished\" | \"loading\" | \"error\") - Specifies the current status of loading data.\n * * `empty` (optional, ReactNode) - Content displayed when the chart data is empty.\n * * `noMatch` (optional, ReactNode) - Content displayed when there is no data to display due to the built-in filtering.\n * * `loading` (optional, ReactNode) - Content displayed when `statusType=\"loading\"`. If omitted, the default loading state\n * is shown, using `i18n.loadingText` or built-in i18n.\n * * `error` (optional, ReactNode) - Content displayed when `statusType=\"error\"`. If omitted, the default error state\n * is shown, using `i18n.errorText` and `i18n.recoveryText` (when `onRecoveryClick` is provided), or built-in i18n.\n * * `onRecoveryClick` (optional, function) - Called when the user clicks the recovery button that appears when using default error\n * state, and only if `onRecoveryClick` is provided. Use this to enable the user to retry a failed request or provide another option\n * for the user to recover from the error.\n */\n noData?: BaseNoDataOptions;\n\n /**\n * Defines options for filtering in the chart, including:\n * * `seriesFilter` (optional, boolean) - Displays default series filter at the top of the chart.\n * * `additionalFilters` (optional, slot) - A slot for custom chart filters at the top of the chart.\n */\n filter?: BaseFilterOptions;\n}\n\nexport interface BaseLegendOptions {\n enabled?: boolean;\n title?: string;\n actions?: React.ReactNode;\n}\n\nexport interface BaseNoDataOptions {\n statusType?: \"finished\" | \"loading\" | \"error\";\n empty?: React.ReactNode;\n error?: React.ReactNode;\n loading?: React.ReactNode;\n noMatch?: React.ReactNode;\n onRecoveryClick?: NonCancelableEventHandler;\n}\n\nexport interface BaseTooltipDetail {\n key: React.ReactNode;\n value: React.ReactNode;\n}\n\nexport interface BaseI18nStrings {\n loadingText?: string;\n errorText?: string;\n recoveryText?: string;\n seriesFilterLabel?: string;\n seriesFilterPlaceholder?: string;\n seriesFilterSelectedAriaLabel?: string;\n legendAriaLabel?: string;\n detailPopoverDismissAriaLabel?: string;\n chartRoleDescription?: string;\n}\n\nexport interface CoreI18nStrings extends BaseI18nStrings {\n /**\n * ARIA label for the secondary legend when using dual axes charts.\n *\n * **Important**: When using dual axes, you should explicitly provide visible titles or ARIA labels\n * for both the primary and secondary legends to ensure proper accessibility. The primary legend\n * has built-in i18n support through `legendAriaLabel`, but the secondary legend currently requires\n * this property to be explicitly provided.\n */\n secondaryLegendAriaLabel?: string;\n\n /**\n * ARIA label for the marker of a series. Series with status \"default\" will not announce a label, thus excluded by this method.\n */\n itemMarkerStatusAriaLabel?: (status: Exclude<ChartSeriesMarkerStatus, \"default\">) => string;\n}\n\nexport interface WithCartesianI18nStrings {\n /**\n * An object that contains all of the localized strings required by the component.\n * @i18n\n *\n * Available properties:\n * * `loadingText` (optional, string) - Text, displayed when the chart is loading, i.e. when `noData.statusType` is set to \"loading\".\n * * `errorText` (optional, string) - Text, displayed when the chart is in error state, i.e. when `noData.statusType` is set to \"error\".\n * * `recoveryText` (optional, string) - Text for the recovery button, displayed next to the error text.\n * * `seriesFilterLabel` (optional, string) - Text for the visible label of the default series filter.\n * * `seriesFilterPlaceholder` (optional, string) - Text for the default series filter placeholder.\n * * `seriesFilterSelectedAriaLabel` (optional, string) - ARIA label of the default series filter which is appended to any option that is selected.\n * * `legendAriaLabel` (optional, string) - ARIA label that is associated with the legend in case there is no visible `legend.title` defined.\n * * `detailPopoverDismissAriaLabel` (optional, string) - ARIA label for the details popover dismiss button.\n * * `chartRoleDescription` (optional, string) - Accessible role description of the chart plot area, e.g. \"interactive chart\".\n * * `xAxisRoleDescription` (optional, string) - Accessible role description of the x axis, e.g. \"x axis\".\n * * `yAxisRoleDescription` (optional, string) - Accessible role description of the y axis, e.g. \"y axis\".\n */\n i18nStrings?: CartesianI18nStrings;\n}\n\nexport interface WithPieI18nStrings {\n /**\n * An object that contains all of the localized strings required by the component.\n * @i18n\n *\n * Available properties:\n * * `loadingText` (optional, string) - Text, displayed when the chart is loading, i.e. when `noData.statusType` is set to \"loading\".\n * * `errorText` (optional, string) - Text, displayed when the chart is in error state, i.e. when `noData.statusType` is set to \"error\".\n * * `recoveryText` (optional, string) - Text for the recovery button, displayed next to the error text.\n * * `seriesFilterLabel` (optional, string) - Text for the visible label of the default series filter.\n * * `seriesFilterPlaceholder` (optional, string) - Text for the default series filter placeholder.\n * * `seriesFilterSelectedAriaLabel` (optional, string) - ARIA label of the default series filter which is appended to any option that is selected.\n * * `legendAriaLabel` (optional, string) - ARIA label that is associated with the legend in case there is no visible `legend.title` defined.\n * * `detailPopoverDismissAriaLabel` (optional, string) - ARIA label for the details popover dismiss button.\n * * `chartRoleDescription` (optional, string) - Accessible role description of the chart plot area, e.g. \"interactive chart\".\n * * `segmentRoleDescription` (optional, string) - Accessible role description of the segment.\n */\n i18nStrings?: PieI18nStrings;\n}\n\nexport interface CartesianI18nStrings extends BaseI18nStrings {\n xAxisRoleDescription?: string;\n yAxisRoleDescription?: string;\n}\n\nexport interface PieI18nStrings extends BaseI18nStrings {\n segmentRoleDescription?: string;\n}\n\nexport interface BaseFilterOptions {\n seriesFilter?: boolean;\n additionalFilters?: React.ReactNode;\n}\n\nexport interface BaseTooltipPointFormatted {\n key?: React.ReactNode;\n value?: React.ReactNode;\n description?: React.ReactNode;\n expandable?: boolean;\n subItems?: ReadonlyArray<{ key: React.ReactNode; value: React.ReactNode }>;\n}\n\nexport interface AreaSeriesOptions extends BaseCartesianLineLikeOptions, LinkableSeries, WithZones {\n type: \"area\";\n data: readonly PointDataItemType[];\n /** Opacity of the area fill, from 0 (transparent) to 1 (opaque). Defaults to 0.4. */\n fillOpacity?: number;\n}\n\nexport interface AreaSplineSeriesOptions extends BaseCartesianLineLikeOptions, LinkableSeries, WithZones {\n type: \"areaspline\";\n data: readonly PointDataItemType[];\n /** Opacity of the area fill, from 0 (transparent) to 1 (opaque). Defaults to 0.4. */\n fillOpacity?: number;\n}\n\nexport interface ColumnSeriesOptions extends BaseCartesianSeriesOptions, LinkableSeries, WithZones {\n type: \"column\";\n data: readonly PointDataItemType[];\n}\n\nexport interface LineSeriesOptions extends BaseCartesianLineLikeOptions, LinkableSeries, WithZones {\n type: \"line\";\n data: readonly PointDataItemType[];\n}\n\nexport interface SplineSeriesOptions extends BaseCartesianLineLikeOptions, LinkableSeries, WithZones {\n type: \"spline\";\n data: readonly PointDataItemType[];\n}\n\nexport interface ScatterSeriesOptions extends BaseCartesianSeriesOptions, LinkableSeries {\n type: \"scatter\";\n data: readonly PointDataItemType[];\n marker?: PointMarkerOptions;\n}\n\nexport interface BubbleSeriesOptions extends BaseCartesianSeriesOptions, LinkableSeries {\n type: \"bubble\";\n sizeAxis?: string;\n data: readonly SizePointDataItemOptions[];\n}\n\nexport interface ErrorBarSeriesOptions extends Omit<BaseCartesianSeriesOptions, \"name\"> {\n type: \"errorbar\";\n name?: string;\n data: readonly RangeDataItemOptions[];\n linkedTo: string;\n}\n\n// X-threshold series render as vertical plot lines spanning the full chart height,\n// so they are not associated with a specific y-axis and omit yAxis.\nexport interface XThresholdSeriesOptions extends Omit<BaseCartesianLineLikeOptions, \"yAxis\"> {\n type: \"x-threshold\";\n value: number;\n}\n\nexport interface YThresholdSeriesOptions extends BaseCartesianLineLikeOptions {\n type: \"y-threshold\";\n value: number;\n}\n\nexport interface PieSeriesOptions extends BaseSeriesOptions {\n type: \"pie\";\n data: readonly PieSegmentOptions[];\n}\n\nexport interface DonutSeriesOptions extends BaseSeriesOptions {\n type: \"donut\";\n data: readonly PieSegmentOptions[];\n}\n\nexport interface PieSegmentOptions {\n y: number | null;\n id?: string;\n name: string;\n color?: string;\n}\n\nexport type PointDataItemType = null | number | PointDataItemOptions;\n\nexport interface PointDataItemOptions {\n x?: number;\n y: number | null;\n}\n\nexport interface SizePointDataItemOptions {\n x?: number;\n y: number | null;\n size: number;\n}\n\nexport interface RangeDataItemOptions {\n x?: number;\n low: number;\n high: number;\n}\n\ninterface BaseSeriesOptions {\n id?: string;\n name: string;\n color?: string;\n}\n\ninterface BaseCartesianSeriesOptions extends BaseSeriesOptions {\n yAxis?: string;\n}\n\nexport interface LinkableSeries {\n /**\n * Links this series to another series by ID, or `\":previous\"` for the immediately preceding series.\n * A linked series does not appear as a separate item in the legend or series filter, and its visibility\n * follows the series it is linked to. It still renders in the chart and appears as a separate row in the tooltip.\n *\n * Use this to attach projected, forecast, or supplementary series to a primary series without cluttering the legend.\n */\n linkedTo?: string;\n}\n\nexport interface WithZones {\n zoneAxis?: \"x\" | \"y\";\n zones?: readonly SeriesZone[];\n}\n\nexport interface SeriesZone {\n value?: number;\n color?: string;\n dashStyle?: Highcharts.DashStyleValue;\n}\n\ninterface BaseCartesianLineLikeOptions extends BaseCartesianSeriesOptions {\n dashStyle?: Highcharts.DashStyleValue;\n}\n\n// The symbols union matches that of Highcharts.PointMarkerOptionsObject\ninterface PointMarkerOptions {\n symbol?: \"circle\" | \"diamond\" | \"square\" | \"triangle\" | \"triangle-down\";\n}\n\nexport interface CoreCartesianOptions {\n /**\n * When set to `true`, adds a visual emphasis on the zero baseline axis.\n */\n emphasizeBaseline?: boolean;\n /**\n * Controls the placement of the vertical axis title.\n * When set to \"side\", displays the title along the axis line.\n */\n verticalAxisTitlePlacement?: \"top\" | \"side\";\n}\n\nexport interface CoreChartProps\n extends\n Pick<\n BaseChartOptions,\n | \"highcharts\"\n | \"fallback\"\n | \"fitHeight\"\n | \"chartHeight\"\n | \"chartMinHeight\"\n | \"chartMinWidth\"\n | \"ariaLabel\"\n | \"ariaDescription\"\n | \"filter\"\n | \"noData\"\n >,\n CoreCartesianOptions {\n /**\n * The Highcharts options. Cloudscape injects custom styles and settings, but all can be\n * overridden with explicitly provided options. An exception is event handlers - those are\n * not overridden, but merged with Cloudscape event handlers so that both are getting called.\n */\n options: CoreChartProps.ChartOptions;\n /**\n * The Cloudscape tooltip, that comes with a vertical cursor when used on cartesian series.\n * The tooltip content is only shown when `getContent` property is defined, which is called\n * for each visited { x, y } point.\n */\n tooltip?: CoreChartProps.TooltipOptions;\n /**\n * A custom slot above the chart plot, chart's axis title, and filter.\n */\n header?: CoreChartProps.HeaderOptions;\n /**\n * Prop for passing a custom navigation control component to be rendered with the chart.\n * Use this property to add timeline navigation, range selectors, or other custom navigation elements.\n */\n navigator?: React.ReactNode;\n /**\n * A custom slot below the chart plot and legend.\n */\n footer?: CoreChartProps.FooterOptions;\n /**\n * Chart legend options.\n */\n legend?: CoreChartProps.LegendOptions;\n /**\n * The callback to init the chart's API when it is ready. The API includes the Highcharts chart object, and\n * additional Cloudscape methods.\n */\n callback?: (chart: CoreChartProps.ChartAPI) => void;\n /**\n * This is used to provide a test-utils selector. Do not use this property to provide custom styles.\n */\n className?: string;\n /**\n * IDs of visible series or points.\n */\n visibleItems?: readonly string[];\n /**\n * Called when a legend item is highlighted.\n */\n onLegendItemHighlight?: NonCancelableEventHandler<CoreChartProps.LegendItemHighlightDetail>;\n /**\n * Called when series/points visibility changes due to user interaction with legend or filter.\n */\n onVisibleItemsChange?: NonCancelableEventHandler<CoreChartProps.VisibleItemsChangeDetail>;\n /**\n * Called whenever chart tooltip is rendered to provide content for tooltip's header, body, and (optional) footer.\n */\n getTooltipContent?: CoreChartProps.GetTooltipContent;\n /**\n * Called whenever a legend item is hovered to provide content for legend tooltip's header, body, and (optional) footer.\n * If not provided, no tooltip will be displayed.\n */\n getLegendTooltipContent?: CoreChartProps.GetLegendTooltipContent;\n /**\n * Called whenever chart point or group is highlighted.\n */\n onHighlight?: NonCancelableEventHandler<CoreChartProps.HighlightChangeDetail>;\n /**\n * Called whenever chart point or group loses highlight.\n */\n onClearHighlight?: NonCancelableEventHandler<CoreChartProps.HighlightClearDetail>;\n /**\n * Use Cloudscape keyboard navigation.\n */\n keyboardNavigation?: boolean;\n /**\n * An object that contains all of the localized strings required by the component.\n * @i18n\n */\n i18nStrings?: CoreChartProps.I18nStrings;\n /**\n * Specifies the options for each item in the chart.\n */\n getItemOptions?: CoreChartProps.GetItemOptions;\n\n sizeAxis?: CoreChartProps.SizeAxisOptions | readonly CoreChartProps.SizeAxisOptions[];\n}\n\nexport namespace CoreChartProps {\n // The API methods allow programmatic triggering of chart's behaviors, some of which are not accessible via React state.\n // This enables advanced integration scenarios, such as building a custom legend, or making multiple charts synchronized.\n export interface ChartAPI {\n chart: Highcharts.Chart;\n highcharts: typeof Highcharts;\n highlightItems(itemIds: readonly string[]): void;\n setItemsVisible(itemIds: readonly string[]): void;\n highlightChartPoint(point: Highcharts.Point): void;\n highlightChartGroup(group: readonly Highcharts.Point[]): void;\n clearChartHighlight(): void;\n }\n\n /**\n * The item id. Can be the id of a series or a point.\n */\n export type GetItemOptions = (itemId: string) => CoreChartProps.ChartItemOptions;\n\n // The extended version of Highcharts.Options. The axes types are extended with Cloudscape value formatter.\n // We use a custom formatter because we cannot use the built-in Highcharts formatter for our tooltip.\n export type ChartOptions = Omit<Highcharts.Options, \"xAxis\" | \"yAxis\"> & {\n xAxis?: XAxisOptions | XAxisOptions[];\n yAxis?: YAxisOptions | YAxisOptions[];\n };\n export type XAxisOptions = Highcharts.XAxisOptions & { valueFormatter?: (value: null | number) => string };\n export type YAxisOptions = Highcharts.YAxisOptions & { valueFormatter?: (value: null | number) => string };\n\n export interface SizeAxisOptions {\n id?: string;\n title: string;\n valueFormatter?: (value: null | number) => string;\n }\n\n export interface ChartItemOptions {\n /**\n * If specified, specifies the status of an item.\n * An item can be a point or a series.\n */\n status?: ChartSeriesMarkerStatus;\n }\n\n export interface HeaderOptions {\n content: React.ReactNode;\n }\n export interface FooterOptions {\n content: React.ReactNode;\n }\n\n export interface LegendOptions extends BaseLegendOptions {\n bottomMaxHeight?: number;\n position?: \"bottom\" | \"side\";\n /**\n * This property only applies when there are secondary items.\n */\n secondaryLegendTitle?: string;\n /**\n * This property only applies when there are secondary items.\n */\n secondaryLegendActions?: React.ReactNode;\n /**\n * When set to true, enables horizontal scrolling for legend items with long text.\n * By default, long text is truncated with ellipsis.\n */\n enableHorizontalScroll?: boolean;\n /**\n * This property only applies when there are no secondary items and `position=\"bottom\"`.\n */\n horizontalAlignment?: LegendOptionsHorizontalAlignment;\n }\n\n export type LegendOptionsHorizontalAlignment = \"start\" | \"center\";\n\n export type LegendItem = InternalComponentTypes.LegendItem;\n export type LegendTooltipContent = InternalComponentTypes.LegendTooltipContent;\n export type GetLegendTooltipContent = InternalComponentTypes.GetLegendTooltipContent;\n export type GetLegendTooltipContentProps = InternalComponentTypes.GetLegendTooltipContentProps;\n\n export interface TooltipOptions {\n enabled?: boolean;\n placement?: \"middle\" | \"outside\" | \"target\";\n size?: \"small\" | \"medium\" | \"large\";\n debounce?: number | boolean;\n seriesSorting?: \"as-added\" | \"by-value-desc\";\n }\n\n export type GetTooltipContent = (props: GetTooltipContentProps) => TooltipContentRenderer;\n export interface GetTooltipContentProps {\n point: null | Highcharts.Point;\n group: readonly Highcharts.Point[];\n }\n export interface TooltipContentRenderer {\n point?: (props: TooltipPointProps) => TooltipPointFormatted;\n details?: (props: TooltipDetailsProps) => readonly TooltipDetail[];\n header?: (props: TooltipSlotProps) => React.ReactNode;\n body?: (props: TooltipSlotProps) => React.ReactNode;\n footer?: (props: TooltipSlotProps) => React.ReactNode;\n }\n export type TooltipPointFormatted = BaseTooltipPointFormatted;\n export interface TooltipContentItem {\n point: Highcharts.Point;\n errorRanges: Highcharts.Point[];\n }\n export interface TooltipPointProps {\n item: TooltipContentItem;\n hideTooltip: () => void;\n }\n export interface TooltipSlotProps {\n x: number;\n items: TooltipContentItem[];\n hideTooltip: () => void;\n }\n\n export interface TooltipDetailsProps {\n point: Highcharts.Point;\n hideTooltip: () => void;\n }\n\n export type TooltipDetail = BaseTooltipDetail;\n\n export interface LegendItemHighlightDetail {\n item: LegendItem;\n }\n\n export interface ApiInteraction {\n interactionType: \"api\";\n }\n export interface FilterInteraction {\n interactionType: \"filter\";\n }\n export interface ToggleInteraction {\n interactionType: \"toggle\";\n targetItemId: string;\n }\n export interface SelectInteraction {\n interactionType: \"select\";\n targetItemId: string;\n }\n\n export type InteractionKind = ApiInteraction | FilterInteraction | ToggleInteraction | SelectInteraction;\n\n export type VisibleItemsChangeDetail = { items: readonly LegendItem[] } & InteractionKind;\n\n export interface HighlightChangeDetail {\n point: null | Highcharts.Point;\n group: readonly Highcharts.Point[];\n isApiCall: boolean;\n }\n export interface HighlightClearDetail {\n isApiCall: boolean;\n }\n\n export type I18nStrings = CartesianI18nStrings & PieI18nStrings & CoreI18nStrings;\n}\n\nexport interface CoreLegendProps {\n items: readonly CoreLegendProps.Item[];\n title?: string;\n ariaLabel?: string;\n actions?: React.ReactNode;\n alignment?: \"horizontal\" | \"vertical\";\n enableHorizontalScroll?: boolean;\n horizontalAlignment?: CoreChartProps.LegendOptionsHorizontalAlignment;\n onClearHighlight?: NonCancelableEventHandler;\n onItemHighlight?: NonCancelableEventHandler<CoreLegendProps.ItemHighlightDetail>;\n onVisibleItemsChange?: NonCancelableEventHandler<CoreLegendProps.VisibleItemsChangeDetail>;\n getLegendTooltipContent?: CoreLegendProps.GetTooltipContent;\n}\n\nexport namespace CoreLegendProps {\n export type Item = InternalComponentTypes.LegendItem;\n export type GetTooltipContent = InternalComponentTypes.GetLegendTooltipContent;\n export interface ItemHighlightDetail {\n item: Item;\n }\n export type VisibleItemsChangeDetail = { items: readonly string[] } & (\n | CoreChartProps.ToggleInteraction\n | CoreChartProps.SelectInteraction\n );\n}\n\n// Utility types\n\nexport interface Rect {\n x: number;\n y: number;\n height: number;\n width: number;\n}\n"]}
@@ -1,5 +1,4 @@
1
1
  import { ReactNode } from "react";
2
- import { BaseComponentProps } from "@cloudscape-design/components/internal/base-component";
3
2
  interface ChartDetailPair {
4
3
  key: ReactNode;
5
4
  value: ReactNode;
@@ -13,7 +12,7 @@ export interface ChartSeriesDetailItem extends ChartDetailPair {
13
12
  description?: ReactNode;
14
13
  }
15
14
  export type ExpandedSeries = Set<string>;
16
- interface ChartSeriesDetailsProps extends BaseComponentProps {
15
+ interface ChartSeriesDetailsProps {
17
16
  details: ReadonlyArray<ChartSeriesDetailItem>;
18
17
  expandedSeries?: ExpandedSeries;
19
18
  setExpandedState?: (seriesTitle: string, state: boolean) => void;
@@ -5,14 +5,11 @@ import { forwardRef, memo, useEffect, useRef } from "react";
5
5
  import clsx from "clsx";
6
6
  import { useMergeRefs } from "@cloudscape-design/component-toolkit/internal";
7
7
  import { InternalExpandableSection } from "@cloudscape-design/components/internal/do-not-use/expandable-section";
8
- import { getDataAttributes } from "../../base-component/get-data-attributes";
9
8
  import { scrollIntoViewNearestContainer } from "../../utils/dom";
10
9
  import styles from "./styles.css.js";
11
10
  import testClasses from "./test-classes/styles.css.js";
12
11
  export default memo(forwardRef(ChartSeriesDetails));
13
- function ChartSeriesDetails({ details, expandedSeries, setExpandedState, compactList, ...restProps }, ref) {
14
- const baseProps = getDataAttributes(restProps);
15
- const className = clsx(baseProps.className, styles.root);
12
+ function ChartSeriesDetails({ details, expandedSeries, setExpandedState, compactList }, ref) {
16
13
  const detailsRef = useRef(null);
17
14
  const mergedRef = useMergeRefs(ref, detailsRef);
18
15
  const selectedRef = useRef(null);
@@ -23,7 +20,7 @@ function ChartSeriesDetails({ details, expandedSeries, setExpandedState, compact
23
20
  scrollIntoViewNearestContainer(selectedRef.current, { behavior: "smooth", scrollMode: "always" });
24
21
  }
25
22
  }, [selectedIndex]);
26
- return (_jsx("div", { ...baseProps, className: className, ref: mergedRef, children: _jsx("ul", { className: clsx(styles.list, compactList && styles.compact), children: details.map(({ key, value, marker, isDimmed, subItems, expandableId, description, highlighted }, index) => (_jsxs("li", { className: clsx({
23
+ return (_jsx("div", { className: styles.root, ref: mergedRef, children: _jsx("ul", { className: clsx(styles.list, compactList && styles.compact), children: details.map(({ key, value, marker, isDimmed, subItems, expandableId, description, highlighted }, index) => (_jsxs("li", { className: clsx({
27
24
  [styles.dimmed]: isDimmed,
28
25
  [styles["list-item"]]: true,
29
26
  [testClasses["list-item"]]: true,
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/internal/components/series-details/index.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AAEtC,OAAO,EAAE,UAAU,EAAE,IAAI,EAAa,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACvE,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,YAAY,EAAE,MAAM,+CAA+C,CAAC;AAE7E,OAAO,EAAE,yBAAyB,EAAE,MAAM,sEAAsE,CAAC;AAEjH,OAAO,EAAE,iBAAiB,EAAE,MAAM,0CAA0C,CAAC;AAC7E,OAAO,EAAE,8BAA8B,EAAE,MAAM,iBAAiB,CAAC;AAEjE,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,WAAW,MAAM,8BAA8B,CAAC;AAgCvD,eAAe,IAAI,CAAC,UAAU,CAAC,kBAAkB,CAAC,CAAC,CAAC;AAEpD,SAAS,kBAAkB,CACzB,EAAE,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,WAAW,EAAE,GAAG,SAAS,EAA2B,EACjG,GAA8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B,QAAQ,EAAE,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,gBAAgB,CAAC,MAAM,CAAC,QAAQ,CAAC,EAC3D,OAAO,EAAC,SAAS,YAEjB,KAAC,QAAQ,IAAC,KAAK,EAAE,QAAQ,EAAE,UAAU,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,GAAI,GACzC,EAC5B,KAAC,OAAO,cAAE,WAAW,GAAW,IAC5B,IACF,CACP,CAAC;AACJ,CAAC;AAED,SAAS,mBAAmB,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,WAAW,EAAiB;IAC3F,OAAO,CACL,8BACE,eAAK,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC,EAAE,MAAM,CAAC,SAAS,CAAC,aAC9D,eAAK,SAAS,EAAE,IAAI,CAAC,WAAW,CAAC,GAAG,EAAE,MAAM,CAAC,GAAG,CAAC,aAC9C,MAAM,EACP,yBAAO,OAAO,GAAQ,IAClB,EACN,eAAM,SAAS,EAAE,IAAI,CAAC,WAAW,CAAC,KAAK,EAAE,MAAM,CAAC,KAAK,CAAC,YAAG,KAAK,GAAQ,IAClE,EACL,QAAQ,IAAI,KAAC,QAAQ,IAAC,KAAK,EAAE,QAAQ,GAAI,EAC1C,KAAC,OAAO,cAAE,WAAW,GAAW,IAC/B,CACJ,CAAC;AACJ,CAAC;AAED,SAAS,OAAO,CAAC,EAAE,QAAQ,EAA2B;IACpD,OAAO,QAAQ,CAAC,CAAC,CAAC,cAAK,SAAS,EAAE,IAAI,CAAC,WAAW,CAAC,WAAW,EAAE,MAAM,CAAC,WAAW,CAAC,YAAG,QAAQ,GAAO,CAAC,CAAC,CAAC,IAAI,CAAC;AAC/G,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { forwardRef, memo, ReactNode, useEffect, useRef } from \"react\";\nimport clsx from \"clsx\";\n\nimport { useMergeRefs } from \"@cloudscape-design/component-toolkit/internal\";\nimport { BaseComponentProps } from \"@cloudscape-design/components/internal/base-component\";\nimport { InternalExpandableSection } from \"@cloudscape-design/components/internal/do-not-use/expandable-section\";\n\nimport { getDataAttributes } from \"../../base-component/get-data-attributes\";\nimport { scrollIntoViewNearestContainer } from \"../../utils/dom\";\n\nimport styles from \"./styles.css.js\";\nimport testClasses from \"./test-classes/styles.css.js\";\n\ninterface ChartDetailPair {\n key: ReactNode;\n value: ReactNode;\n}\n\ninterface ListItemProps {\n itemKey: ReactNode;\n value: ReactNode;\n subItems?: ReadonlyArray<ChartDetailPair>;\n marker?: React.ReactNode;\n description?: ReactNode;\n}\n\nexport interface ChartSeriesDetailItem extends ChartDetailPair {\n highlighted?: boolean;\n marker?: React.ReactNode;\n isDimmed?: boolean;\n subItems?: ReadonlyArray<ChartDetailPair>;\n expandableId?: string;\n description?: ReactNode;\n}\nexport type ExpandedSeries = Set<string>;\n\ninterface ChartSeriesDetailsProps extends BaseComponentProps {\n details: ReadonlyArray<ChartSeriesDetailItem>;\n expandedSeries?: ExpandedSeries;\n setExpandedState?: (seriesTitle: string, state: boolean) => void;\n compactList?: boolean;\n}\n\nexport default memo(forwardRef(ChartSeriesDetails));\n\nfunction ChartSeriesDetails(\n { details, expandedSeries, setExpandedState, compactList, ...restProps }: ChartSeriesDetailsProps,\n ref: React.Ref<HTMLDivElement>,\n) {\n const baseProps = getDataAttributes(restProps);\n const className = clsx(baseProps.className, styles.root);\n const detailsRef = useRef<HTMLDivElement | null>(null);\n const mergedRef = useMergeRefs(ref, detailsRef);\n const selectedRef = useRef<HTMLDivElement>(null);\n\n const isExpanded = (seriesTitle: string) => !!expandedSeries && expandedSeries.has(seriesTitle);\n\n const selectedIndex = details.findIndex((d) => d.highlighted);\n useEffect(() => {\n if (selectedIndex !== -1 && selectedRef.current) {\n scrollIntoViewNearestContainer(selectedRef.current, { behavior: \"smooth\", scrollMode: \"always\" });\n }\n }, [selectedIndex]);\n\n return (\n <div {...baseProps} className={className} ref={mergedRef}>\n <ul className={clsx(styles.list, compactList && styles.compact)}>\n {details.map(({ key, value, marker, isDimmed, subItems, expandableId, description, highlighted }, index) => (\n <li\n // Include 'highlighted' in the key to force React re-render when highlight state changes.\n // Without this, the highlight indicator div may not be removed when cursor moves away from data points\n // due to React's reconciliation algorithm not detecting the state change in complex data scenarios.\n // This ensures proper cleanup of visual highlight indicators.\n key={[index, highlighted].join(\"-\")}\n className={clsx({\n [styles.dimmed]: isDimmed,\n [styles[\"list-item\"]]: true,\n [testClasses[\"list-item\"]]: true,\n [styles[\"with-sub-items\"]]: subItems?.length,\n [styles.expandable]: !!expandableId,\n })}\n >\n {details.length > 1 && highlighted ? (\n <div ref={selectedRef} className={styles[\"highlight-indicator\"]}></div>\n ) : null}\n {subItems?.length && !!expandableId ? (\n <ExpandableSeries\n itemKey={key}\n value={value}\n marker={marker}\n description={description}\n subItems={subItems}\n expanded={isExpanded(expandableId)}\n setExpandedState={(state) => setExpandedState && setExpandedState(expandableId, state)}\n />\n ) : (\n <NonExpandableSeries\n itemKey={key}\n value={value}\n marker={marker}\n description={description}\n subItems={subItems}\n />\n )}\n </li>\n ))}\n </ul>\n </div>\n );\n}\n\nfunction SubItems({\n items,\n expandable,\n expanded,\n}: {\n items: ReadonlyArray<ChartDetailPair>;\n expandable?: boolean;\n expanded?: boolean;\n}) {\n return (\n <ul className={clsx(styles[\"sub-items\"], expandable && styles.expandable)}>\n {items.map(({ key, value }, index) => (\n <li\n key={index}\n className={clsx(\n testClasses[\"inner-list-item\"],\n styles[\"inner-list-item\"],\n styles[\"key-value-pair\"],\n (expanded || !expandable) && styles.announced,\n )}\n >\n <span className={clsx(testClasses.key, styles.key)}>{key}</span>\n <span className={clsx(testClasses.value, styles.value)}>{value}</span>\n </li>\n ))}\n </ul>\n );\n}\n\nfunction ExpandableSeries({\n itemKey,\n value,\n subItems,\n marker,\n expanded,\n setExpandedState,\n description,\n}: ListItemProps &\n Required<Pick<ListItemProps, \"subItems\">> & {\n expanded: boolean;\n setExpandedState: (state: boolean) => void;\n }) {\n return (\n <div className={styles[\"expandable-section\"]}>\n {marker}\n <div className={styles[\"full-width\"]}>\n <InternalExpandableSection\n headerText={<span className={clsx(testClasses.key, styles.key)}>{itemKey}</span>}\n headerActions={<span className={clsx(testClasses.value, styles.value, styles.expandable)}>{value}</span>}\n expanded={expanded}\n onChange={({ detail }) => setExpandedState(detail.expanded)}\n variant=\"compact\"\n >\n <SubItems items={subItems} expandable={true} expanded={expanded} />\n </InternalExpandableSection>\n <Details>{description}</Details>\n </div>\n </div>\n );\n}\n\nfunction NonExpandableSeries({ itemKey, value, subItems, marker, description }: ListItemProps) {\n return (\n <>\n <div className={clsx(styles[\"key-value-pair\"], styles.announced)}>\n <div className={clsx(testClasses.key, styles.key)}>\n {marker}\n <span>{itemKey}</span>\n </div>\n <span className={clsx(testClasses.value, styles.value)}>{value}</span>\n </div>\n {subItems && <SubItems items={subItems} />}\n <Details>{description}</Details>\n </>\n );\n}\n\nfunction Details({ children }: { children: ReactNode }) {\n return children ? <div className={clsx(testClasses.description, styles.description)}>{children}</div> : null;\n}\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/internal/components/series-details/index.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AAEtC,OAAO,EAAE,UAAU,EAAE,IAAI,EAAa,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACvE,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,YAAY,EAAE,MAAM,+CAA+C,CAAC;AAC7E,OAAO,EAAE,yBAAyB,EAAE,MAAM,sEAAsE,CAAC;AAEjH,OAAO,EAAE,8BAA8B,EAAE,MAAM,iBAAiB,CAAC;AAEjE,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,WAAW,MAAM,8BAA8B,CAAC;AAgCvD,eAAe,IAAI,CAAC,UAAU,CAAC,k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MAAM,EAAE,EAAE,EAAE,CAAC,gBAAgB,CAAC,MAAM,CAAC,QAAQ,CAAC,EAC3D,OAAO,EAAC,SAAS,YAEjB,KAAC,QAAQ,IAAC,KAAK,EAAE,QAAQ,EAAE,UAAU,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,GAAI,GACzC,EAC5B,KAAC,OAAO,cAAE,WAAW,GAAW,IAC5B,IACF,CACP,CAAC;AACJ,CAAC;AAED,SAAS,mBAAmB,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,WAAW,EAAiB;IAC3F,OAAO,CACL,8BACE,eAAK,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC,EAAE,MAAM,CAAC,SAAS,CAAC,aAC9D,eAAK,SAAS,EAAE,IAAI,CAAC,WAAW,CAAC,GAAG,EAAE,MAAM,CAAC,GAAG,CAAC,aAC9C,MAAM,EACP,yBAAO,OAAO,GAAQ,IAClB,EACN,eAAM,SAAS,EAAE,IAAI,CAAC,WAAW,CAAC,KAAK,EAAE,MAAM,CAAC,KAAK,CAAC,YAAG,KAAK,GAAQ,IAClE,EACL,QAAQ,IAAI,KAAC,QAAQ,IAAC,KAAK,EAAE,QAAQ,GAAI,EAC1C,KAAC,OAAO,cAAE,WAAW,GAAW,IAC/B,CACJ,CAAC;AACJ,CAAC;AAED,SAAS,OAAO,CAAC,EAAE,QAAQ,EAA2B;IACpD,OAAO,QAAQ,CAAC,CAAC,CAAC,cAAK,SAAS,EAAE,IAAI,CAAC,WAAW,CAAC,WAAW,EAAE,MAAM,CAAC,WAAW,CAAC,YAAG,QAAQ,GAAO,CAAC,CAAC,CAAC,IAAI,CAAC;AAC/G,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { forwardRef, memo, ReactNode, useEffect, useRef } from \"react\";\nimport clsx from \"clsx\";\n\nimport { useMergeRefs } from \"@cloudscape-design/component-toolkit/internal\";\nimport { InternalExpandableSection } from \"@cloudscape-design/components/internal/do-not-use/expandable-section\";\n\nimport { scrollIntoViewNearestContainer } from \"../../utils/dom\";\n\nimport styles from \"./styles.css.js\";\nimport testClasses from \"./test-classes/styles.css.js\";\n\ninterface ChartDetailPair {\n key: ReactNode;\n value: ReactNode;\n}\n\ninterface ListItemProps {\n itemKey: ReactNode;\n value: ReactNode;\n subItems?: ReadonlyArray<ChartDetailPair>;\n marker?: React.ReactNode;\n description?: ReactNode;\n}\n\nexport interface ChartSeriesDetailItem extends ChartDetailPair {\n highlighted?: boolean;\n marker?: React.ReactNode;\n isDimmed?: boolean;\n subItems?: ReadonlyArray<ChartDetailPair>;\n expandableId?: string;\n description?: ReactNode;\n}\nexport type ExpandedSeries = Set<string>;\n\ninterface ChartSeriesDetailsProps {\n details: ReadonlyArray<ChartSeriesDetailItem>;\n expandedSeries?: ExpandedSeries;\n setExpandedState?: (seriesTitle: string, state: boolean) => void;\n compactList?: boolean;\n}\n\nexport default memo(forwardRef(ChartSeriesDetails));\n\nfunction ChartSeriesDetails(\n { details, expandedSeries, setExpandedState, compactList }: ChartSeriesDetailsProps,\n ref: React.Ref<HTMLDivElement>,\n) {\n const detailsRef = useRef<HTMLDivElement | null>(null);\n const mergedRef = useMergeRefs(ref, detailsRef);\n const selectedRef = useRef<HTMLDivElement>(null);\n\n const isExpanded = (seriesTitle: string) => !!expandedSeries && expandedSeries.has(seriesTitle);\n\n const selectedIndex = details.findIndex((d) => d.highlighted);\n useEffect(() => {\n if (selectedIndex !== -1 && selectedRef.current) {\n scrollIntoViewNearestContainer(selectedRef.current, { behavior: \"smooth\", scrollMode: \"always\" });\n }\n }, [selectedIndex]);\n\n return (\n <div className={styles.root} ref={mergedRef}>\n <ul className={clsx(styles.list, compactList && styles.compact)}>\n {details.map(({ key, value, marker, isDimmed, subItems, expandableId, description, highlighted }, index) => (\n <li\n // Include 'highlighted' in the key to force React re-render when highlight state changes.\n // Without this, the highlight indicator div may not be removed when cursor moves away from data points\n // due to React's reconciliation algorithm not detecting the state change in complex data scenarios.\n // This ensures proper cleanup of visual highlight indicators.\n key={[index, highlighted].join(\"-\")}\n className={clsx({\n [styles.dimmed]: isDimmed,\n [styles[\"list-item\"]]: true,\n [testClasses[\"list-item\"]]: true,\n [styles[\"with-sub-items\"]]: subItems?.length,\n [styles.expandable]: !!expandableId,\n })}\n >\n {details.length > 1 && highlighted ? (\n <div ref={selectedRef} className={styles[\"highlight-indicator\"]}></div>\n ) : null}\n {subItems?.length && !!expandableId ? (\n <ExpandableSeries\n itemKey={key}\n value={value}\n marker={marker}\n description={description}\n subItems={subItems}\n expanded={isExpanded(expandableId)}\n setExpandedState={(state) => setExpandedState && setExpandedState(expandableId, state)}\n />\n ) : (\n <NonExpandableSeries\n itemKey={key}\n value={value}\n marker={marker}\n description={description}\n subItems={subItems}\n />\n )}\n </li>\n ))}\n </ul>\n </div>\n );\n}\n\nfunction SubItems({\n items,\n expandable,\n expanded,\n}: {\n items: ReadonlyArray<ChartDetailPair>;\n expandable?: boolean;\n expanded?: boolean;\n}) {\n return (\n <ul className={clsx(styles[\"sub-items\"], expandable && styles.expandable)}>\n {items.map(({ key, value }, index) => (\n <li\n key={index}\n className={clsx(\n testClasses[\"inner-list-item\"],\n styles[\"inner-list-item\"],\n styles[\"key-value-pair\"],\n (expanded || !expandable) && styles.announced,\n )}\n >\n <span className={clsx(testClasses.key, styles.key)}>{key}</span>\n <span className={clsx(testClasses.value, styles.value)}>{value}</span>\n </li>\n ))}\n </ul>\n );\n}\n\nfunction ExpandableSeries({\n itemKey,\n value,\n subItems,\n marker,\n expanded,\n setExpandedState,\n description,\n}: ListItemProps &\n Required<Pick<ListItemProps, \"subItems\">> & {\n expanded: boolean;\n setExpandedState: (state: boolean) => void;\n }) {\n return (\n <div className={styles[\"expandable-section\"]}>\n {marker}\n <div className={styles[\"full-width\"]}>\n <InternalExpandableSection\n headerText={<span className={clsx(testClasses.key, styles.key)}>{itemKey}</span>}\n headerActions={<span className={clsx(testClasses.value, styles.value, styles.expandable)}>{value}</span>}\n expanded={expanded}\n onChange={({ detail }) => setExpandedState(detail.expanded)}\n variant=\"compact\"\n >\n <SubItems items={subItems} expandable={true} expanded={expanded} />\n </InternalExpandableSection>\n <Details>{description}</Details>\n </div>\n </div>\n );\n}\n\nfunction NonExpandableSeries({ itemKey, value, subItems, marker, description }: ListItemProps) {\n return (\n <>\n <div className={clsx(styles[\"key-value-pair\"], styles.announced)}>\n <div className={clsx(testClasses.key, styles.key)}>\n {marker}\n <span>{itemKey}</span>\n </div>\n <span className={clsx(testClasses.value, styles.value)}>{value}</span>\n </div>\n {subItems && <SubItems items={subItems} />}\n <Details>{description}</Details>\n </>\n );\n}\n\nfunction Details({ children }: { children: ReactNode }) {\n return children ? <div className={clsx(testClasses.description, styles.description)}>{children}</div> : null;\n}\n"]}
@@ -1,7 +1,6 @@
1
- import { BaseComponentProps } from "@cloudscape-design/components/internal/base-component";
2
1
  import { ChartSeriesMarkerStatus } from "./interfaces";
3
2
  export type ChartSeriesMarkerType = "line" | "dashed" | "square" | "large-square" | "hollow-square" | "diamond" | "triangle" | "triangle-down" | "circle";
4
- export interface ChartSeriesMarkerProps extends BaseComponentProps {
3
+ export interface ChartSeriesMarkerProps {
5
4
  type: ChartSeriesMarkerType;
6
5
  color: string;
7
6
  visible?: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/internal/components/series-marker/index.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AAEtC,OAAO,EAAE,WAAW,EAAE,MAAM,+CAA+C,CAAC;AAE5E,OAAO,EAAE,wBAAwB,EAAE,4BAA4B,EAAE,MAAM,kCAAkC,CAAC;AAI1G,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAqBrC,SAAS,KAAK,CAAC,IAAY,EAAE,KAAa;IACxC,OAAO,aAAa,IAAI,GAAG,CAAC,CAAC,CAAC,GAAG,KA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iBAAQ,IAAI,EAAE,QAAQ,MAAM,GAAG,KAAM,KAAK,EAAE,WAAW,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,GAAI,CAAC;AACrF,CAAC;AAED,MAAM,mBAAmB,GAAG,kBAAkB,CAAC;AAE/C,SAAS,UAAU;IACjB,OAAO,CACL,8BACc,SAAS,EACrB,SAAS,EAAE,GAAG,mBAAmB,IAAI,KAAK,CAAC,EAAE,EAAE,GAAG,CAAC,EAAE,EACrD,CAAC,EAAC,ykCAAykC,EAC3kC,IAAI,EAAE,wBAAwB,GAC9B,CACH,CAAC;AACJ,CAAC;AAED,SAAS,cAAc;IACrB,OAAO,CACL,eACE,SAAS,EAAE,GAAG,mBAAmB,IAAI,KAAK,CAAC,EAAE,EAAE,GAAG,CAAC,EAAE,EACrD,CAAC,EAAC,igBAAigB,EACngB,IAAI,EAAC,OAAO,GACZ,CACH,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { useUniqueId } from \"@cloudscape-design/component-toolkit/internal\";\nimport { BaseComponentProps } from \"@cloudscape-design/components/internal/base-component\";\nimport { colorBorderStatusWarning, colorTextInteractiveDisabled } from \"@cloudscape-design/design-tokens\";\n\nimport { ChartSeriesMarkerStatus } from \"./interfaces\";\n\nimport styles from \"./styles.css.js\";\n\nexport type ChartSeriesMarkerType =\n | \"line\"\n | \"dashed\"\n | \"square\"\n | \"large-square\"\n | \"hollow-square\"\n | \"diamond\"\n | \"triangle\"\n | \"triangle-down\"\n | \"circle\";\n\nexport interface ChartSeriesMarkerProps extends BaseComponentProps {\n type: ChartSeriesMarkerType;\n color: string;\n visible?: boolean;\n status?: ChartSeriesMarkerStatus;\n ariaLabel?: string;\n}\n\nfunction scale(size: number, value: number) {\n return `translate(${size * ((1 - value) / 2)}, ${size * ((1 - value) / 2)}) scale(${value})`;\n}\n\nexport function ChartSeriesMarker({\n type = \"line\",\n color,\n visible = true,\n status = \"default\",\n ariaLabel,\n}: ChartSeriesMarkerProps) {\n color = visible ? color : colorTextInteractiveDisabled;\n\n // As React re-renders the components, a new ID should be created for masks.\n // Not doing so will not evaluate the mask.\n const maskId = useUniqueId(\"chart-series-marker\");\n\n return (\n <div className={styles.marker}>\n {ariaLabel && <span className={styles[\"visually-hidden\"]}>{ariaLabel}</span>}\n <svg focusable={false} aria-hidden={true} viewBox=\"0 0 25 16\" xmlns=\"http://www.w3.org/2000/svg\">\n <defs>\n <mask id={maskId}>\n <rect width=\"100%\" height=\"100%\" fill=\"white\" />\n\n {status === \"warning\" && <SVGWarningMask></SVGWarningMask>}\n </mask>\n </defs>\n\n {status === \"warning\" && <SVGWarning></SVGWarning>}\n\n {type === \"line\" && <SVGLine maskId={maskId} color={color} />}\n\n {type === \"dashed\" && <SVGLineDashed maskId={maskId} color={color} />}\n\n {type === \"large-square\" && <SVGLargeSquare maskId={maskId} color={color} />}\n\n {type === \"hollow-square\" && <SVGHollowSquare maskId={maskId} color={color} />}\n\n {type === \"square\" && <SVGSquare maskId={maskId} color={color} />}\n\n {type === \"diamond\" && <SVGDiamond maskId={maskId} color={color} />}\n\n {type === \"triangle\" && <SVGTriangle maskId={maskId} color={color} />}\n\n {type === \"triangle-down\" && <SVGTriangleDown maskId={maskId} color={color} />}\n\n {type === \"circle\" && <SVGCircle maskId={maskId} color={color} />}\n </svg>\n </div>\n );\n}\n\nfunction SVGLine({ color, maskId }: { color: string; maskId: string }) {\n return <rect mask={`url(#${maskId})`} x={1} y={7} height={4} width={14} strokeWidth={0} rx={2} fill={color} />;\n}\n\nfunction SVGLineDashed({ color, maskId }: { color: string; maskId: string }) {\n return (\n <>\n <rect mask={`url(#${maskId})`} x={1} y={7} height={4} width={6} strokeWidth={0} rx={2} fill={color} />\n <rect mask={`url(#${maskId})`} x={9} y={7} height={4} width={6} strokeWidth={0} rx={2} fill={color} />\n </>\n );\n}\n\nfunction SVGLargeSquare({ color, maskId }: { color: string; maskId: string }) {\n const shape = { x: 0, y: 0, width: 16, height: 16, rx: 2, transform: scale(16, 0.85) };\n return <rect mask={`url(#${maskId})`} {...shape} strokeWidth={0} fill={color} />;\n}\n\nfunction SVGHollowSquare({ color, maskId }: { color: string; maskId: string }) {\n const size = { x: 0, y: 0, width: 16, height: 16, rx: 2, transform: scale(16, 0.75) };\n return <rect mask={`url(#${maskId})`} {...size} strokeWidth={2} stroke={color} fill={color} fillOpacity=\"0.40\" />;\n}\n\nfunction SVGSquare({ color, maskId }: { color: string; maskId: string }) {\n const size = { x: 3, y: 3, width: 10, height: 10, rx: 2 };\n return <rect mask={`url(#${maskId})`} {...size} strokeWidth={0} fill={color} />;\n}\n\nfunction SVGDiamond({ color, maskId }: { color: string; maskId: string }) {\n const shape = { points: \"8,0 16,8 8,16 0,8\", transform: scale(16, 0.65) };\n return <polygon mask={`url(#${maskId})`} {...shape} strokeWidth={0} fill={color} />;\n}\n\nfunction SVGTriangle({ color, maskId }: { color: string; maskId: string }) {\n const shape = { points: \"8,0 16,16 0,16\", transform: scale(16, 0.65) };\n return <polygon mask={`url(#${maskId})`} {...shape} strokeWidth={0} fill={color} />;\n}\n\nfunction SVGTriangleDown({ color, maskId }: { color: string; maskId: string }) {\n const shape = { points: \"8,16 0,0 16,0\", transform: scale(16, 0.65) };\n return <polygon mask={`url(#${maskId})`} {...shape} strokeWidth={0} fill={color} />;\n}\n\nfunction SVGCircle({ color, maskId }: { color: string; maskId: string }) {\n const shape = { cx: 8, cy: 8, r: 5 };\n return <circle mask={`url(#${maskId})`} {...shape} strokeWidth={0} fill={color} />;\n}\n\nconst SVGWarningTranslate = `translate(10, 1)`;\n\nfunction SVGWarning() {\n return (\n <path\n data-testid=\"warning\"\n transform={`${SVGWarningTranslate} ${scale(16, 0.8)}`}\n d=\"M9.14157,12.3948v-1.713c0,-0.084,-0.028,-0.154,-0.085,-0.211c-0.056,-0.058,-0.123,-0.086,-0.2,-0.086h-1.713c-0.077,0,-0.144,0.028,-0.2,0.086c-0.057,0.057,-0.085,0.127,-0.085,0.211v1.713c0,0.084,0.028,0.155,0.085,0.212c0.056,0.057,0.123,0.085,0.2,0.085h1.713c0.077,0,0.144,-0.028,0.2,-0.085c0.057,-0.057,0.085,-0.128,0.085,-0.212zm-0.018,-3.371l0.161,-4.138c0,-0.072,-0.03,-0.129,-0.089,-0.171c-0.078,-0.066,-0.149,-0.099,-0.215,-0.099h-1.962c-0.065,0,-0.136,0.033,-0.214,0.099c-0.059,0.042,-0.089,0.105,-0.089,0.189l0.152,4.12c0,0.06,0.03,0.109,0.089,0.148c0.059,0.039,0.131,0.059,0.214,0.059h1.65c0.083,0,0.153,-0.02,0.21,-0.059c0.056,-0.039,0.087,-0.088,0.093,-0.148zm-0.125,-8.419l6.85,12.692c0.208,0.378,0.202,0.757,-0.018,1.136c-0.101,0.174,-0.24,0.312,-0.415,0.414c-0.175,0.102,-0.364,0.154,-0.566,0.154h-13.699c-0.202,0,-0.391,-0.052,-0.566,-0.154c-0.176,-0.102,-0.314,-0.24,-0.415,-0.414c-0.22,-0.379,-0.226,-0.758,-0.018,-1.136l6.849,-12.692c0.101,-0.187,0.241,-0.334,0.42,-0.442c0.178,-0.108,0.371,-0.162,0.579,-0.162c0.208,0,0.402,0.054,0.58,0.162c0.178,0.108,0.318,0.255,0.419,0.442z\"\n fill={colorBorderStatusWarning}\n />\n );\n}\n\nfunction SVGWarningMask() {\n return (\n <path\n transform={`${SVGWarningTranslate} ${scale(16, 1.4)}`}\n d=\"M8 0C8.2081 2.01716e-08 8.40171 0.0539363 8.58008 0.162109C8.75826 0.270216 8.898 0.417425 8.99902 0.603516L15.8486 13.2959C16.0567 13.6744 16.05 14.0531 15.8301 14.4316C15.7291 14.6058 15.5913 14.7445 15.416 14.8467C15.2407 14.9488 15.0517 15 14.8496 15H1.15039C0.94832 15 0.759318 14.9488 0.583984 14.8467C0.408709 14.7445 0.270949 14.6058 0.169922 14.4316C-0.0499612 14.0531 -0.0566966 13.6744 0.151367 13.2959L7.00098 0.603516C7.102 0.417424 7.24174 0.270216 7.41992 0.162109C7.59829 0.0539363 7.7919 0 8 0Z\"\n fill=\"black\"\n />\n );\n}\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/internal/components/series-marker/index.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AAEtC,OAAO,EAAE,WAAW,EAAE,MAAM,+CAA+C,CAAC;AAC5E,OAAO,EAAE,wBAAwB,EAAE,4BAA4B,EAAE,MAAM,kCAAkC,CAAC;AAI1G,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAqBrC,SAAS,KAAK,CAAC,IAAY,EAAE,KAAa;IACxC,OAAO,aAAa,IAAI,GAAG,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,KAAK,IAAI,GAAG,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,WAAW,KAAK,GAAG,CAAC;AAC/F,CAAC;AAED,MAAM,UAAU,iBAAiB,CAAC,EAChC,IAAI,GAAG,MAAM,EACb,KAAK,EACL,OAAO,GAAG,IAAI,EACd,MAAM,GAAG,SAAS,EAClB,SAAS,GACc;IACvB,KAAK,GAAG,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,4BAA4B,CAAC;IAEvD,4EAA4E;IAC5E,2CAA2C;IAC3C,MAAM,MAAM,GAAG,WAAW,CAAC,qBAAqB,CAAC,CAAC;IAElD,OAAO,CACL,eAAK,SAAS,EAAE,MAAM,CAAC,MAAM,aAC1B,SAAS,IAAI,eAAM,SAAS,EAAE,MAAM,CAAC,iBAAiB,CAAC,YAAG,SAAS,GAAQ,EAC5E,eAAK,SAAS,EAAE,KAAK,iBAAe,IAAI,EAAE,OAAO,EAAC,WAAW,EAAC,KAAK,EAAC,4BAA4B,aAC9F,yBACE,gBAAM,EAAE,EAAE,MAAM,aACd,eAAM,KAAK,EAAC,MAAM,EAAC,MAAM,EAAC,MAAM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,SAAS,eAAe,CAAC,EAAE,KAAK,EAAE,MAAM,EAAqC;IAC3E,MAAM,KAAK,GAAG,EAAE,MAAM,EAAE,eAAe,EAAE,SAAS,EAAE,KAAK,CAAC,EAAE,EAAE,IAAI,CAAC,EAAE,CAAC;IACtE,OAAO,kBAAS,IAAI,EAAE,QAAQ,MAAM,GAAG,KAAM,KAAK,EAAE,WAAW,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,GAAI,CAAC;AACtF,CAAC;AAED,SAAS,SAAS,CAAC,EAAE,KAAK,EAAE,MAAM,EAAqC;IACrE,MAAM,KAAK,GAAG,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC;IACrC,OAAO,iBAAQ,IAAI,EAAE,QAAQ,MAAM,GAAG,KAAM,KAAK,EAAE,WAAW,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,GAAI,CAAC;AACrF,CAAC;AAED,MAAM,mBAAmB,GAAG,kBAAkB,CAAC;AAE/C,SAAS,UAAU;IACjB,OAAO,CACL,8BACc,SAAS,EACrB,SAAS,EAAE,GAAG,mBAAmB,IAAI,KAAK,CAAC,EAAE,EAAE,GAAG,CAAC,EAAE,EACrD,CAAC,EAAC,ykCAAykC,EAC3kC,IAAI,EAAE,wBAAwB,GAC9B,CACH,CAAC;AACJ,CAAC;AAED,SAAS,cAAc;IACrB,OAAO,CACL,eACE,SAAS,EAAE,GAAG,mBAAmB,IAAI,KAAK,CAAC,EAAE,EAAE,GAAG,CAAC,EAAE,EACrD,CAAC,EAAC,igBAAigB,EACngB,IAAI,EAAC,OAAO,GACZ,CACH,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { useUniqueId } from \"@cloudscape-design/component-toolkit/internal\";\nimport { colorBorderStatusWarning, colorTextInteractiveDisabled } from \"@cloudscape-design/design-tokens\";\n\nimport { ChartSeriesMarkerStatus } from \"./interfaces\";\n\nimport styles from \"./styles.css.js\";\n\nexport type ChartSeriesMarkerType =\n | \"line\"\n | \"dashed\"\n | \"square\"\n | \"large-square\"\n | \"hollow-square\"\n | \"diamond\"\n | \"triangle\"\n | \"triangle-down\"\n | \"circle\";\n\nexport interface ChartSeriesMarkerProps {\n type: ChartSeriesMarkerType;\n color: string;\n visible?: boolean;\n status?: ChartSeriesMarkerStatus;\n ariaLabel?: string;\n}\n\nfunction scale(size: number, value: number) {\n return `translate(${size * ((1 - value) / 2)}, ${size * ((1 - value) / 2)}) scale(${value})`;\n}\n\nexport function ChartSeriesMarker({\n type = \"line\",\n color,\n visible = true,\n status = \"default\",\n ariaLabel,\n}: ChartSeriesMarkerProps) {\n color = visible ? color : colorTextInteractiveDisabled;\n\n // As React re-renders the components, a new ID should be created for masks.\n // Not doing so will not evaluate the mask.\n const maskId = useUniqueId(\"chart-series-marker\");\n\n return (\n <div className={styles.marker}>\n {ariaLabel && <span className={styles[\"visually-hidden\"]}>{ariaLabel}</span>}\n <svg focusable={false} aria-hidden={true} viewBox=\"0 0 25 16\" xmlns=\"http://www.w3.org/2000/svg\">\n <defs>\n <mask id={maskId}>\n <rect width=\"100%\" height=\"100%\" fill=\"white\" />\n\n {status === \"warning\" && <SVGWarningMask></SVGWarningMask>}\n </mask>\n </defs>\n\n {status === \"warning\" && <SVGWarning></SVGWarning>}\n\n {type === \"line\" && <SVGLine maskId={maskId} color={color} />}\n\n {type === \"dashed\" && <SVGLineDashed maskId={maskId} color={color} />}\n\n {type === \"large-square\" && <SVGLargeSquare maskId={maskId} color={color} />}\n\n {type === \"hollow-square\" && <SVGHollowSquare maskId={maskId} color={color} />}\n\n {type === \"square\" && <SVGSquare maskId={maskId} color={color} />}\n\n {type === \"diamond\" && <SVGDiamond maskId={maskId} color={color} />}\n\n {type === \"triangle\" && <SVGTriangle maskId={maskId} color={color} />}\n\n {type === \"triangle-down\" && <SVGTriangleDown maskId={maskId} color={color} />}\n\n {type === \"circle\" && <SVGCircle maskId={maskId} color={color} />}\n </svg>\n </div>\n );\n}\n\nfunction SVGLine({ color, maskId }: { color: string; maskId: string }) {\n return <rect mask={`url(#${maskId})`} x={1} y={7} height={4} width={14} strokeWidth={0} rx={2} fill={color} />;\n}\n\nfunction SVGLineDashed({ color, maskId }: { color: string; maskId: string }) {\n return (\n <>\n <rect mask={`url(#${maskId})`} x={1} y={7} height={4} width={6} strokeWidth={0} rx={2} fill={color} />\n <rect mask={`url(#${maskId})`} x={9} y={7} height={4} width={6} strokeWidth={0} rx={2} fill={color} />\n </>\n );\n}\n\nfunction SVGLargeSquare({ color, maskId }: { color: string; maskId: string }) {\n const shape = { x: 0, y: 0, width: 16, height: 16, rx: 2, transform: scale(16, 0.85) };\n return <rect mask={`url(#${maskId})`} {...shape} strokeWidth={0} fill={color} />;\n}\n\nfunction SVGHollowSquare({ color, maskId }: { color: string; maskId: string }) {\n const size = { x: 0, y: 0, width: 16, height: 16, rx: 2, transform: scale(16, 0.75) };\n return <rect mask={`url(#${maskId})`} {...size} strokeWidth={2} stroke={color} fill={color} fillOpacity=\"0.40\" />;\n}\n\nfunction SVGSquare({ color, maskId }: { color: string; maskId: string }) {\n const size = { x: 3, y: 3, width: 10, height: 10, rx: 2 };\n return <rect mask={`url(#${maskId})`} {...size} strokeWidth={0} fill={color} />;\n}\n\nfunction SVGDiamond({ color, maskId }: { color: string; maskId: string }) {\n const shape = { points: \"8,0 16,8 8,16 0,8\", transform: scale(16, 0.65) };\n return <polygon mask={`url(#${maskId})`} {...shape} strokeWidth={0} fill={color} />;\n}\n\nfunction SVGTriangle({ color, maskId }: { color: string; maskId: string }) {\n const shape = { points: \"8,0 16,16 0,16\", transform: scale(16, 0.65) };\n return <polygon mask={`url(#${maskId})`} {...shape} strokeWidth={0} fill={color} />;\n}\n\nfunction SVGTriangleDown({ color, maskId }: { color: string; maskId: string }) {\n const shape = { points: \"8,16 0,0 16,0\", transform: scale(16, 0.65) };\n return <polygon mask={`url(#${maskId})`} {...shape} strokeWidth={0} fill={color} />;\n}\n\nfunction SVGCircle({ color, maskId }: { color: string; maskId: string }) {\n const shape = { cx: 8, cy: 8, r: 5 };\n return <circle mask={`url(#${maskId})`} {...shape} strokeWidth={0} fill={color} />;\n}\n\nconst SVGWarningTranslate = `translate(10, 1)`;\n\nfunction SVGWarning() {\n return (\n <path\n data-testid=\"warning\"\n transform={`${SVGWarningTranslate} ${scale(16, 0.8)}`}\n d=\"M9.14157,12.3948v-1.713c0,-0.084,-0.028,-0.154,-0.085,-0.211c-0.056,-0.058,-0.123,-0.086,-0.2,-0.086h-1.713c-0.077,0,-0.144,0.028,-0.2,0.086c-0.057,0.057,-0.085,0.127,-0.085,0.211v1.713c0,0.084,0.028,0.155,0.085,0.212c0.056,0.057,0.123,0.085,0.2,0.085h1.713c0.077,0,0.144,-0.028,0.2,-0.085c0.057,-0.057,0.085,-0.128,0.085,-0.212zm-0.018,-3.371l0.161,-4.138c0,-0.072,-0.03,-0.129,-0.089,-0.171c-0.078,-0.066,-0.149,-0.099,-0.215,-0.099h-1.962c-0.065,0,-0.136,0.033,-0.214,0.099c-0.059,0.042,-0.089,0.105,-0.089,0.189l0.152,4.12c0,0.06,0.03,0.109,0.089,0.148c0.059,0.039,0.131,0.059,0.214,0.059h1.65c0.083,0,0.153,-0.02,0.21,-0.059c0.056,-0.039,0.087,-0.088,0.093,-0.148zm-0.125,-8.419l6.85,12.692c0.208,0.378,0.202,0.757,-0.018,1.136c-0.101,0.174,-0.24,0.312,-0.415,0.414c-0.175,0.102,-0.364,0.154,-0.566,0.154h-13.699c-0.202,0,-0.391,-0.052,-0.566,-0.154c-0.176,-0.102,-0.314,-0.24,-0.415,-0.414c-0.22,-0.379,-0.226,-0.758,-0.018,-1.136l6.849,-12.692c0.101,-0.187,0.241,-0.334,0.42,-0.442c0.178,-0.108,0.371,-0.162,0.579,-0.162c0.208,0,0.402,0.054,0.58,0.162c0.178,0.108,0.318,0.255,0.419,0.442z\"\n fill={colorBorderStatusWarning}\n />\n );\n}\n\nfunction SVGWarningMask() {\n return (\n <path\n transform={`${SVGWarningTranslate} ${scale(16, 1.4)}`}\n d=\"M8 0C8.2081 2.01716e-08 8.40171 0.0539363 8.58008 0.162109C8.75826 0.270216 8.898 0.417425 8.99902 0.603516L15.8486 13.2959C16.0567 13.6744 16.05 14.0531 15.8301 14.4316C15.7291 14.6058 15.5913 14.7445 15.416 14.8467C15.2407 14.9488 15.0517 15 14.8496 15H1.15039C0.94832 15 0.759318 14.9488 0.583984 14.8467C0.408709 14.7445 0.270949 14.6058 0.169922 14.4316C-0.0499612 14.0531 -0.0566966 13.6744 0.151367 13.2959L7.00098 0.603516C7.102 0.417424 7.24174 0.270216 7.41992 0.162109C7.59829 0.0539363 7.7919 0 8 0Z\"\n fill=\"black\"\n />\n );\n}\n"]}
@@ -1,5 +1,5 @@
1
1
  export var PACKAGE_SOURCE = "chart-components";
2
- export var PACKAGE_VERSION = "1.0.0 (b08a37fe)";
2
+ export var PACKAGE_VERSION = "1.0.0 (a98b555c)";
3
3
  export var THEME = "open-source-visual-refresh";
4
4
  export var ALWAYS_VISUAL_REFRESH = true;
5
5
  export var SYSTEM = "core";
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "PACKAGE_SOURCE": "chart-components",
3
- "PACKAGE_VERSION": "1.0.0 (b08a37fe)",
3
+ "PACKAGE_VERSION": "1.0.0 (a98b555c)",
4
4
  "THEME": "open-source-visual-refresh",
5
5
  "ALWAYS_VISUAL_REFRESH": true,
6
6
  "SYSTEM": "core"
@@ -627,6 +627,7 @@ export const colorTextBadgeGrey: string;
627
627
  export const colorTextBadgeGreen: string;
628
628
  export const colorTextBadgeBlue: string;
629
629
  export const colorTextBadgeRed: string;
630
+ export const colorBackgroundCodeView: string;
630
631
  export const fontBoxValueLargeWeight: string;
631
632
  export const fontButtonLetterSpacing: string;
632
633
  export const fontChartDetailSize: string;
@@ -627,6 +627,7 @@ export var colorTextBadgeGrey = "var(--color-text-badge-grey-5u533n, #f9f9fa)";
627
627
  export var colorTextBadgeGreen = "var(--color-text-badge-green-xkzw5d, #f9f9fa)";
628
628
  export var colorTextBadgeBlue = "var(--color-text-badge-blue-cq2uzn, #f9f9fa)";
629
629
  export var colorTextBadgeRed = "var(--color-text-badge-red-60jprp, #f9f9fa)";
630
+ export var colorBackgroundCodeView = "var(--color-background-code-view-6vvqfk, #f8f8f8)";
630
631
  export var fontBoxValueLargeWeight = "var(--font-box-value-large-weight-wr00sw, 700)";
631
632
  export var fontButtonLetterSpacing = "var(--font-button-letter-spacing-ufowe3, 0.005em)";
632
633
  export var fontChartDetailSize = "var(--font-chart-detail-size-9qr25q, 12px)";
@@ -2555,6 +2555,10 @@ module.exports.preset = {
2555
2555
  "light": "{colorTextNotificationDefault}",
2556
2556
  "dark": "{colorTextNotificationDefault}"
2557
2557
  },
2558
+ "colorBackgroundCodeView": {
2559
+ "light": "#f8f8f8",
2560
+ "dark": "#282c34"
2561
+ },
2558
2562
  "fontBoxValueLargeWeight": "700",
2559
2563
  "fontButtonLetterSpacing": "0.005em",
2560
2564
  "fontChartDetailSize": "{fontSizeBodyS}",
@@ -5328,6 +5332,10 @@ module.exports.preset = {
5328
5332
  "light": "{colorTextNotificationDefault}",
5329
5333
  "dark": "{colorTextNotificationDefault}"
5330
5334
  },
5335
+ "colorBackgroundCodeView": {
5336
+ "light": "#282c34",
5337
+ "dark": "#282c34"
5338
+ },
5331
5339
  "colorPrimary50": "#f0fbff",
5332
5340
  "colorPrimary100": "#d1f1ff",
5333
5341
  "colorPrimary200": "#b8e7ff",
@@ -6933,6 +6941,10 @@ module.exports.preset = {
6933
6941
  "light": "{colorTextNotificationDefault}",
6934
6942
  "dark": "{colorTextNotificationDefault}"
6935
6943
  },
6944
+ "colorBackgroundCodeView": {
6945
+ "light": "#282c34",
6946
+ "dark": "#282c34"
6947
+ },
6936
6948
  "colorPrimary50": "#f0fbff",
6937
6949
  "colorPrimary100": "#d1f1ff",
6938
6950
  "colorPrimary200": "#b8e7ff",
@@ -8465,6 +8477,10 @@ module.exports.preset = {
8465
8477
  "colorTextBadgeRed": {
8466
8478
  "light": "{colorTextNotificationDefault}",
8467
8479
  "dark": "{colorTextNotificationDefault}"
8480
+ },
8481
+ "colorBackgroundCodeView": {
8482
+ "light": "#f8f8f8",
8483
+ "dark": "#282c34"
8468
8484
  }
8469
8485
  }
8470
8486
  },
@@ -9863,6 +9879,10 @@ module.exports.preset = {
9863
9879
  "colorTextBadgeRed": {
9864
9880
  "light": "{colorTextNotificationDefault}",
9865
9881
  "dark": "{colorTextNotificationDefault}"
9882
+ },
9883
+ "colorBackgroundCodeView": {
9884
+ "light": "#f8f8f8",
9885
+ "dark": "#282c34"
9866
9886
  }
9867
9887
  }
9868
9888
  },
@@ -11262,6 +11282,10 @@ module.exports.preset = {
11262
11282
  "light": "{colorTextNotificationDefault}",
11263
11283
  "dark": "{colorTextNotificationDefault}"
11264
11284
  },
11285
+ "colorBackgroundCodeView": {
11286
+ "light": "#f8f8f8",
11287
+ "dark": "#282c34"
11288
+ },
11265
11289
  "fontSizeExpandableHeading": "14px",
11266
11290
  "borderDividerSectionWidth": "1px"
11267
11291
  }
@@ -12661,6 +12685,10 @@ module.exports.preset = {
12661
12685
  "colorTextBadgeRed": {
12662
12686
  "light": "{colorTextNotificationDefault}",
12663
12687
  "dark": "{colorTextNotificationDefault}"
12688
+ },
12689
+ "colorBackgroundCodeView": {
12690
+ "light": "#282c34",
12691
+ "dark": "#282c34"
12664
12692
  }
12665
12693
  }
12666
12694
  },
@@ -13305,6 +13333,7 @@ module.exports.preset = {
13305
13333
  "colorTextBadgeGreen": "color",
13306
13334
  "colorTextBadgeBlue": "color",
13307
13335
  "colorTextBadgeRed": "color",
13336
+ "colorBackgroundCodeView": "color",
13308
13337
  "motionDurationExtraFast": "motion",
13309
13338
  "motionDurationExtraSlow": "motion",
13310
13339
  "motionDurationFast": "motion",
@@ -14011,6 +14040,7 @@ module.exports.preset = {
14011
14040
  "colorTextBadgeGreen",
14012
14041
  "colorTextBadgeBlue",
14013
14042
  "colorTextBadgeRed",
14043
+ "colorBackgroundCodeView",
14014
14044
  "fontDecorationStyleLink",
14015
14045
  "fontDecorationThicknessLink",
14016
14046
  "fontDecorationThicknessLinkDisplayL",
@@ -14518,6 +14548,7 @@ module.exports.preset = {
14518
14548
  "colorTextBadgeGreen",
14519
14549
  "colorTextBadgeBlue",
14520
14550
  "colorTextBadgeRed",
14551
+ "colorBackgroundCodeView",
14521
14552
  "fontFamilyBase",
14522
14553
  "fontFamilyDisplay",
14523
14554
  "fontFamilyHeading",
@@ -15292,6 +15323,7 @@ module.exports.preset = {
15292
15323
  "colorTextBadgeGreen": "color-text-badge-green",
15293
15324
  "colorTextBadgeBlue": "color-text-badge-blue",
15294
15325
  "colorTextBadgeRed": "color-text-badge-red",
15326
+ "colorBackgroundCodeView": "color-background-code-view",
15295
15327
  "fontBoxValueLargeWeight": "font-box-value-large-weight",
15296
15328
  "fontButtonLetterSpacing": "font-button-letter-spacing",
15297
15329
  "fontChartDetailSize": "font-chart-detail-size",
@@ -16251,6 +16283,7 @@ module.exports.preset = {
16251
16283
  "colorTextBadgeGreen": "--color-text-badge-green-xkzw5d",
16252
16284
  "colorTextBadgeBlue": "--color-text-badge-blue-cq2uzn",
16253
16285
  "colorTextBadgeRed": "--color-text-badge-red-60jprp",
16286
+ "colorBackgroundCodeView": "--color-background-code-view-6vvqfk",
16254
16287
  "fontBoxValueLargeWeight": "--font-box-value-large-weight-wr00sw",
16255
16288
  "fontButtonLetterSpacing": "--font-button-letter-spacing-ufowe3",
16256
16289
  "fontChartDetailSize": "--font-chart-detail-size-9qr25q",
@@ -302,6 +302,7 @@ export declare interface TypedOverride {
302
302
  colorTextBadgeGreen?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
303
303
  colorTextBadgeBlue?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
304
304
  colorTextBadgeRed?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
305
+ colorBackgroundCodeView?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
305
306
  fontDecorationStyleLink?: GlobalValue;
306
307
  fontDecorationThicknessLink?: GlobalValue;
307
308
  fontDecorationThicknessLinkDisplayL?: GlobalValue;
@@ -723,6 +724,7 @@ export declare interface TypedOverride {
723
724
  colorTextBadgeGreen?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
724
725
  colorTextBadgeBlue?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
725
726
  colorTextBadgeRed?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
727
+ colorBackgroundCodeView?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
726
728
  fontDecorationStyleLink?: GlobalValue;
727
729
  fontDecorationThicknessLink?: GlobalValue;
728
730
  fontDecorationThicknessLinkDisplayL?: GlobalValue;
@@ -1144,6 +1146,7 @@ export declare interface TypedOverride {
1144
1146
  colorTextBadgeGreen?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
1145
1147
  colorTextBadgeBlue?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
1146
1148
  colorTextBadgeRed?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
1149
+ colorBackgroundCodeView?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
1147
1150
  fontDecorationStyleLink?: GlobalValue;
1148
1151
  fontDecorationThicknessLink?: GlobalValue;
1149
1152
  fontDecorationThicknessLinkDisplayL?: GlobalValue;
@@ -1565,6 +1568,7 @@ export declare interface TypedOverride {
1565
1568
  colorTextBadgeGreen?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
1566
1569
  colorTextBadgeBlue?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
1567
1570
  colorTextBadgeRed?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
1571
+ colorBackgroundCodeView?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
1568
1572
  fontDecorationStyleLink?: GlobalValue;
1569
1573
  fontDecorationThicknessLink?: GlobalValue;
1570
1574
  fontDecorationThicknessLinkDisplayL?: GlobalValue;
@@ -1986,6 +1990,7 @@ export declare interface TypedOverride {
1986
1990
  colorTextBadgeGreen?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
1987
1991
  colorTextBadgeBlue?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
1988
1992
  colorTextBadgeRed?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
1993
+ colorBackgroundCodeView?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
1989
1994
  fontDecorationStyleLink?: GlobalValue;
1990
1995
  fontDecorationThicknessLink?: GlobalValue;
1991
1996
  fontDecorationThicknessLinkDisplayL?: GlobalValue;
@@ -2407,6 +2412,7 @@ export declare interface TypedOverride {
2407
2412
  colorTextBadgeGreen?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
2408
2413
  colorTextBadgeBlue?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
2409
2414
  colorTextBadgeRed?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
2415
+ colorBackgroundCodeView?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
2410
2416
  fontDecorationStyleLink?: GlobalValue;
2411
2417
  fontDecorationThicknessLink?: GlobalValue;
2412
2418
  fontDecorationThicknessLinkDisplayL?: GlobalValue;
@@ -2828,6 +2834,7 @@ export declare interface TypedOverride {
2828
2834
  colorTextBadgeGreen?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
2829
2835
  colorTextBadgeBlue?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
2830
2836
  colorTextBadgeRed?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
2837
+ colorBackgroundCodeView?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
2831
2838
  fontDecorationStyleLink?: GlobalValue;
2832
2839
  fontDecorationThicknessLink?: GlobalValue;
2833
2840
  fontDecorationThicknessLinkDisplayL?: GlobalValue;
@@ -3249,6 +3256,7 @@ export declare interface TypedOverride {
3249
3256
  colorTextBadgeGreen?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
3250
3257
  colorTextBadgeBlue?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
3251
3258
  colorTextBadgeRed?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
3259
+ colorBackgroundCodeView?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
3252
3260
  fontDecorationStyleLink?: GlobalValue;
3253
3261
  fontDecorationThicknessLink?: GlobalValue;
3254
3262
  fontDecorationThicknessLinkDisplayL?: GlobalValue;
@@ -3670,6 +3678,7 @@ export declare interface TypedOverride {
3670
3678
  colorTextBadgeGreen?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
3671
3679
  colorTextBadgeBlue?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
3672
3680
  colorTextBadgeRed?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
3681
+ colorBackgroundCodeView?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
3673
3682
  fontDecorationStyleLink?: GlobalValue;
3674
3683
  fontDecorationThicknessLink?: GlobalValue;
3675
3684
  fontDecorationThicknessLinkDisplayL?: GlobalValue;
@@ -302,6 +302,7 @@ export declare interface TypedOverride {
302
302
  colorTextBadgeGreen?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
303
303
  colorTextBadgeBlue?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
304
304
  colorTextBadgeRed?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
305
+ colorBackgroundCodeView?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
305
306
  fontDecorationStyleLink?: GlobalValue;
306
307
  fontDecorationThicknessLink?: GlobalValue;
307
308
  fontDecorationThicknessLinkDisplayL?: GlobalValue;
@@ -723,6 +724,7 @@ export declare interface TypedOverride {
723
724
  colorTextBadgeGreen?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
724
725
  colorTextBadgeBlue?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
725
726
  colorTextBadgeRed?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
727
+ colorBackgroundCodeView?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
726
728
  fontDecorationStyleLink?: GlobalValue;
727
729
  fontDecorationThicknessLink?: GlobalValue;
728
730
  fontDecorationThicknessLinkDisplayL?: GlobalValue;
@@ -1144,6 +1146,7 @@ export declare interface TypedOverride {
1144
1146
  colorTextBadgeGreen?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
1145
1147
  colorTextBadgeBlue?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
1146
1148
  colorTextBadgeRed?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
1149
+ colorBackgroundCodeView?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
1147
1150
  fontDecorationStyleLink?: GlobalValue;
1148
1151
  fontDecorationThicknessLink?: GlobalValue;
1149
1152
  fontDecorationThicknessLinkDisplayL?: GlobalValue;
@@ -1565,6 +1568,7 @@ export declare interface TypedOverride {
1565
1568
  colorTextBadgeGreen?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
1566
1569
  colorTextBadgeBlue?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
1567
1570
  colorTextBadgeRed?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
1571
+ colorBackgroundCodeView?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
1568
1572
  fontDecorationStyleLink?: GlobalValue;
1569
1573
  fontDecorationThicknessLink?: GlobalValue;
1570
1574
  fontDecorationThicknessLinkDisplayL?: GlobalValue;
@@ -1986,6 +1990,7 @@ export declare interface TypedOverride {
1986
1990
  colorTextBadgeGreen?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
1987
1991
  colorTextBadgeBlue?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
1988
1992
  colorTextBadgeRed?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
1993
+ colorBackgroundCodeView?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
1989
1994
  fontDecorationStyleLink?: GlobalValue;
1990
1995
  fontDecorationThicknessLink?: GlobalValue;
1991
1996
  fontDecorationThicknessLinkDisplayL?: GlobalValue;
@@ -2407,6 +2412,7 @@ export declare interface TypedOverride {
2407
2412
  colorTextBadgeGreen?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
2408
2413
  colorTextBadgeBlue?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
2409
2414
  colorTextBadgeRed?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
2415
+ colorBackgroundCodeView?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
2410
2416
  fontDecorationStyleLink?: GlobalValue;
2411
2417
  fontDecorationThicknessLink?: GlobalValue;
2412
2418
  fontDecorationThicknessLinkDisplayL?: GlobalValue;
@@ -2828,6 +2834,7 @@ export declare interface TypedOverride {
2828
2834
  colorTextBadgeGreen?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
2829
2835
  colorTextBadgeBlue?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
2830
2836
  colorTextBadgeRed?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
2837
+ colorBackgroundCodeView?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
2831
2838
  fontDecorationStyleLink?: GlobalValue;
2832
2839
  fontDecorationThicknessLink?: GlobalValue;
2833
2840
  fontDecorationThicknessLinkDisplayL?: GlobalValue;
@@ -3249,6 +3256,7 @@ export declare interface TypedOverride {
3249
3256
  colorTextBadgeGreen?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
3250
3257
  colorTextBadgeBlue?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
3251
3258
  colorTextBadgeRed?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
3259
+ colorBackgroundCodeView?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
3252
3260
  fontDecorationStyleLink?: GlobalValue;
3253
3261
  fontDecorationThicknessLink?: GlobalValue;
3254
3262
  fontDecorationThicknessLinkDisplayL?: GlobalValue;
@@ -3670,6 +3678,7 @@ export declare interface TypedOverride {
3670
3678
  colorTextBadgeGreen?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
3671
3679
  colorTextBadgeBlue?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
3672
3680
  colorTextBadgeRed?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
3681
+ colorBackgroundCodeView?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
3673
3682
  fontDecorationStyleLink?: GlobalValue;
3674
3683
  fontDecorationThicknessLink?: GlobalValue;
3675
3684
  fontDecorationThicknessLinkDisplayL?: GlobalValue;
@@ -2555,6 +2555,10 @@ export var preset = {
2555
2555
  "light": "{colorTextNotificationDefault}",
2556
2556
  "dark": "{colorTextNotificationDefault}"
2557
2557
  },
2558
+ "colorBackgroundCodeView": {
2559
+ "light": "#f8f8f8",
2560
+ "dark": "#282c34"
2561
+ },
2558
2562
  "fontBoxValueLargeWeight": "700",
2559
2563
  "fontButtonLetterSpacing": "0.005em",
2560
2564
  "fontChartDetailSize": "{fontSizeBodyS}",
@@ -5328,6 +5332,10 @@ export var preset = {
5328
5332
  "light": "{colorTextNotificationDefault}",
5329
5333
  "dark": "{colorTextNotificationDefault}"
5330
5334
  },
5335
+ "colorBackgroundCodeView": {
5336
+ "light": "#282c34",
5337
+ "dark": "#282c34"
5338
+ },
5331
5339
  "colorPrimary50": "#f0fbff",
5332
5340
  "colorPrimary100": "#d1f1ff",
5333
5341
  "colorPrimary200": "#b8e7ff",
@@ -6933,6 +6941,10 @@ export var preset = {
6933
6941
  "light": "{colorTextNotificationDefault}",
6934
6942
  "dark": "{colorTextNotificationDefault}"
6935
6943
  },
6944
+ "colorBackgroundCodeView": {
6945
+ "light": "#282c34",
6946
+ "dark": "#282c34"
6947
+ },
6936
6948
  "colorPrimary50": "#f0fbff",
6937
6949
  "colorPrimary100": "#d1f1ff",
6938
6950
  "colorPrimary200": "#b8e7ff",
@@ -8465,6 +8477,10 @@ export var preset = {
8465
8477
  "colorTextBadgeRed": {
8466
8478
  "light": "{colorTextNotificationDefault}",
8467
8479
  "dark": "{colorTextNotificationDefault}"
8480
+ },
8481
+ "colorBackgroundCodeView": {
8482
+ "light": "#f8f8f8",
8483
+ "dark": "#282c34"
8468
8484
  }
8469
8485
  }
8470
8486
  },
@@ -9863,6 +9879,10 @@ export var preset = {
9863
9879
  "colorTextBadgeRed": {
9864
9880
  "light": "{colorTextNotificationDefault}",
9865
9881
  "dark": "{colorTextNotificationDefault}"
9882
+ },
9883
+ "colorBackgroundCodeView": {
9884
+ "light": "#f8f8f8",
9885
+ "dark": "#282c34"
9866
9886
  }
9867
9887
  }
9868
9888
  },
@@ -11262,6 +11282,10 @@ export var preset = {
11262
11282
  "light": "{colorTextNotificationDefault}",
11263
11283
  "dark": "{colorTextNotificationDefault}"
11264
11284
  },
11285
+ "colorBackgroundCodeView": {
11286
+ "light": "#f8f8f8",
11287
+ "dark": "#282c34"
11288
+ },
11265
11289
  "fontSizeExpandableHeading": "14px",
11266
11290
  "borderDividerSectionWidth": "1px"
11267
11291
  }
@@ -12661,6 +12685,10 @@ export var preset = {
12661
12685
  "colorTextBadgeRed": {
12662
12686
  "light": "{colorTextNotificationDefault}",
12663
12687
  "dark": "{colorTextNotificationDefault}"
12688
+ },
12689
+ "colorBackgroundCodeView": {
12690
+ "light": "#282c34",
12691
+ "dark": "#282c34"
12664
12692
  }
12665
12693
  }
12666
12694
  },
@@ -13305,6 +13333,7 @@ export var preset = {
13305
13333
  "colorTextBadgeGreen": "color",
13306
13334
  "colorTextBadgeBlue": "color",
13307
13335
  "colorTextBadgeRed": "color",
13336
+ "colorBackgroundCodeView": "color",
13308
13337
  "motionDurationExtraFast": "motion",
13309
13338
  "motionDurationExtraSlow": "motion",
13310
13339
  "motionDurationFast": "motion",
@@ -14011,6 +14040,7 @@ export var preset = {
14011
14040
  "colorTextBadgeGreen",
14012
14041
  "colorTextBadgeBlue",
14013
14042
  "colorTextBadgeRed",
14043
+ "colorBackgroundCodeView",
14014
14044
  "fontDecorationStyleLink",
14015
14045
  "fontDecorationThicknessLink",
14016
14046
  "fontDecorationThicknessLinkDisplayL",
@@ -14518,6 +14548,7 @@ export var preset = {
14518
14548
  "colorTextBadgeGreen",
14519
14549
  "colorTextBadgeBlue",
14520
14550
  "colorTextBadgeRed",
14551
+ "colorBackgroundCodeView",
14521
14552
  "fontFamilyBase",
14522
14553
  "fontFamilyDisplay",
14523
14554
  "fontFamilyHeading",
@@ -15292,6 +15323,7 @@ export var preset = {
15292
15323
  "colorTextBadgeGreen": "color-text-badge-green",
15293
15324
  "colorTextBadgeBlue": "color-text-badge-blue",
15294
15325
  "colorTextBadgeRed": "color-text-badge-red",
15326
+ "colorBackgroundCodeView": "color-background-code-view",
15295
15327
  "fontBoxValueLargeWeight": "font-box-value-large-weight",
15296
15328
  "fontButtonLetterSpacing": "font-button-letter-spacing",
15297
15329
  "fontChartDetailSize": "font-chart-detail-size",
@@ -16251,6 +16283,7 @@ export var preset = {
16251
16283
  "colorTextBadgeGreen": "--color-text-badge-green-xkzw5d",
16252
16284
  "colorTextBadgeBlue": "--color-text-badge-blue-cq2uzn",
16253
16285
  "colorTextBadgeRed": "--color-text-badge-red-60jprp",
16286
+ "colorBackgroundCodeView": "--color-background-code-view-6vvqfk",
16254
16287
  "fontBoxValueLargeWeight": "--font-box-value-large-weight-wr00sw",
16255
16288
  "fontButtonLetterSpacing": "--font-button-letter-spacing-ufowe3",
16256
16289
  "fontChartDetailSize": "--font-chart-detail-size-9qr25q",
@@ -1,3 +1,3 @@
1
1
  {
2
- "commit": "b08a37fef23f01badbf2c10c6fdd22dab08e0c1e"
2
+ "commit": "a98b555c8ae874155360393591e9e23937ef70e5"
3
3
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cloudscape-design/chart-components",
3
- "version": "1.0.107",
3
+ "version": "1.0.108",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/cloudscape-design/chart-components.git"