@ids-group-ltd/ids-design-system 0.13.1 → 0.13.3

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.
Files changed (62) hide show
  1. package/CHANGELOG.md +626 -0
  2. package/components.md +17 -9
  3. package/docs/agent/INDEX.md +1 -1
  4. package/docs/agent/charts/ds-column-chart.md +3 -2
  5. package/docs/agent/charts/ds-line-chart.md +2 -1
  6. package/docs/agent/feedback/ds-bar.md +13 -0
  7. package/docs/agent/forms/ds-button.md +1 -1
  8. package/docs/agent/forms/ds-icon-button.md +1 -1
  9. package/docs/agent/surfaces/ds-card.md +1 -1
  10. package/fesm2022/ids-group-ltd-ids-design-system-components-bar-chart.mjs +81 -13
  11. package/fesm2022/ids-group-ltd-ids-design-system-components-bar-chart.mjs.map +1 -1
  12. package/fesm2022/ids-group-ltd-ids-design-system-components-bar.mjs +95 -0
  13. package/fesm2022/ids-group-ltd-ids-design-system-components-bar.mjs.map +1 -0
  14. package/fesm2022/ids-group-ltd-ids-design-system-components-button.mjs +3 -0
  15. package/fesm2022/ids-group-ltd-ids-design-system-components-button.mjs.map +1 -1
  16. package/fesm2022/ids-group-ltd-ids-design-system-components-chart-legend.mjs +47 -5
  17. package/fesm2022/ids-group-ltd-ids-design-system-components-chart-legend.mjs.map +1 -1
  18. package/fesm2022/ids-group-ltd-ids-design-system-components-chart-tooltip.mjs +198 -50
  19. package/fesm2022/ids-group-ltd-ids-design-system-components-chart-tooltip.mjs.map +1 -1
  20. package/fesm2022/ids-group-ltd-ids-design-system-components-chart.mjs +973 -0
  21. package/fesm2022/ids-group-ltd-ids-design-system-components-chart.mjs.map +1 -0
  22. package/fesm2022/ids-group-ltd-ids-design-system-components-column-chart.mjs +172 -111
  23. package/fesm2022/ids-group-ltd-ids-design-system-components-column-chart.mjs.map +1 -1
  24. package/fesm2022/ids-group-ltd-ids-design-system-components-donut-chart.mjs +86 -15
  25. package/fesm2022/ids-group-ltd-ids-design-system-components-donut-chart.mjs.map +1 -1
  26. package/fesm2022/ids-group-ltd-ids-design-system-components-funnel-chart.mjs +87 -12
  27. package/fesm2022/ids-group-ltd-ids-design-system-components-funnel-chart.mjs.map +1 -1
  28. package/fesm2022/ids-group-ltd-ids-design-system-components-line-chart.mjs +193 -98
  29. package/fesm2022/ids-group-ltd-ids-design-system-components-line-chart.mjs.map +1 -1
  30. package/fesm2022/ids-group-ltd-ids-design-system-components-table.mjs +2 -2
  31. package/fesm2022/ids-group-ltd-ids-design-system-components-table.mjs.map +1 -1
  32. package/fesm2022/ids-group-ltd-ids-design-system-components.mjs +233 -33
  33. package/fesm2022/ids-group-ltd-ids-design-system-components.mjs.map +1 -1
  34. package/fesm2022/ids-group-ltd-ids-design-system-core.mjs +1 -1
  35. package/fesm2022/ids-group-ltd-ids-design-system-core.mjs.map +1 -1
  36. package/fesm2022/ids-group-ltd-ids-design-system.mjs +2 -1
  37. package/fesm2022/ids-group-ltd-ids-design-system.mjs.map +1 -1
  38. package/migrations/0.13.2.json +269 -0
  39. package/migrations/0.13.3.json +211 -0
  40. package/package.json +17 -9
  41. package/styles/_chart-frame.scss +117 -10
  42. package/styles/_chart-interactive.scss +12 -3
  43. package/styles/_overlay-motion.scss +7 -6
  44. package/styles/_tokens-charts.scss +29 -5
  45. package/styles/_tokens.scss +1 -1
  46. package/types/ids-group-ltd-ids-design-system-components-bar-chart.d.ts +68 -5
  47. package/types/ids-group-ltd-ids-design-system-components-bar.d.ts +63 -0
  48. package/types/ids-group-ltd-ids-design-system-components-button.d.ts +3 -2
  49. package/types/ids-group-ltd-ids-design-system-components-chart-legend.d.ts +25 -2
  50. package/types/ids-group-ltd-ids-design-system-components-chart-tooltip.d.ts +21 -4
  51. package/types/ids-group-ltd-ids-design-system-components-chart.d.ts +543 -0
  52. package/types/ids-group-ltd-ids-design-system-components-column-chart.d.ts +125 -37
  53. package/types/ids-group-ltd-ids-design-system-components-donut-chart.d.ts +43 -4
  54. package/types/ids-group-ltd-ids-design-system-components-funnel-chart.d.ts +52 -4
  55. package/types/ids-group-ltd-ids-design-system-components-line-chart.d.ts +90 -23
  56. package/types/ids-group-ltd-ids-design-system-components.d.ts +91 -16
  57. package/types/ids-group-ltd-ids-design-system-core.d.ts +73 -6
  58. package/types/ids-group-ltd-ids-design-system.d.ts +7 -6
  59. package/docs/agent/feedback/ds-progress.md +0 -7
  60. package/fesm2022/ids-group-ltd-ids-design-system-components-progress.mjs +0 -41
  61. package/fesm2022/ids-group-ltd-ids-design-system-components-progress.mjs.map +0 -1
  62. package/types/ids-group-ltd-ids-design-system-components-progress.d.ts +0 -22
@@ -1 +1 @@
1
- {"version":3,"file":"ids-group-ltd-ids-design-system-components-column-chart.mjs","sources":["../../../src/lib/components/column-chart/column-chart.math.ts","../../../src/lib/components/column-chart/column-chart.component.ts","../../../src/lib/components/column-chart/column-chart.component.html","../../../src/lib/components/column-chart/ids-group-ltd-ids-design-system-components-column-chart.ts"],"sourcesContent":["/** Largest finite value in the series — the domain the value axis is niced from.\n * A non-finite point is skipped rather than compared: one `Infinity` point\n * would otherwise become the domain and flatten every other column to nothing. */\nexport function resolveDomainMax(values: readonly number[]): number {\n const finite = values.filter((value) => Number.isFinite(value));\n\n return finite.length ? Math.max(...finite) : 0;\n}\n\n/** Share of the plot area, in percent. Drives both a column's height and a\n * gridline's offset, so a tick and the column beside it cannot drift apart. */\nexport function heightPercent(value: number, axisMax: number): number {\n // Math.max(NaN, 0) is NaN, so the lower clamp cannot stand in for this test —\n // and the result is written into a style attribute, where `height: NaN%` is\n // dropped silently.\n if (!Number.isFinite(value) || !Number.isFinite(axisMax) || axisMax <= 0) {\n return 0;\n }\n\n return Math.max((value / axisMax) * 100, 0);\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n TemplateRef,\n ViewEncapsulation,\n booleanAttribute,\n computed,\n contentChild,\n input,\n numberAttribute,\n output,\n signal,\n} from '@angular/core';\nimport {\n CHART_SERIES_COLORS,\n describeSeries,\n formatTick,\n formatValue,\n niceMax,\n tickStep,\n describeShare,\n focusMark,\n nextRovingIndex,\n staggerDelay,\n tickValues,\n} from '@ids-group-ltd/ids-design-system/components';\nimport { SkeletonComponent } from '@ids-group-ltd/ids-design-system/components/skeleton';\nimport { resolveWithConfig } from '@ids-group-ltd/ids-design-system/core';\nimport type {\n ChartDataTable,\n ChartValueFormat,\n} from '@ids-group-ltd/ids-design-system/core';\nimport {\n ChartTooltipDirective,\n chartActiveMark,\n} from '@ids-group-ltd/ids-design-system/components/chart-tooltip';\nimport type {\n ChartItemTooltipTrigger,\n ChartTooltipContext,\n} from '@ids-group-ltd/ids-design-system/components/chart-tooltip';\nimport { heightPercent, resolveDomainMax } from './column-chart.math';\nimport type { ColumnChartPoint } from './column-chart.types';\n\nconst defaultValueFormat = (value: number) => formatValue(value);\n\n@Component({\n selector: 'ds-column-chart',\n standalone: true,\n imports: [SkeletonComponent, ChartTooltipDirective],\n templateUrl: './column-chart.component.html',\n styleUrl: './column-chart.component.scss',\n encapsulation: ViewEncapsulation.Emulated,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ColumnChartComponent {\n /** One column per point, drawn in the order given. */\n readonly data = input.required<readonly ColumnChartPoint[]>();\n\n /** Prints each column's value above the column. */\n readonly showValues = input(true, { transform: booleanAttribute });\n\n /** How many value-axis ticks to aim for. A hint, not a count: ticks are\n * snapped to a round step, so the axis may carry one more or one fewer. */\n readonly tickCount = input(5, { transform: numberAttribute });\n\n /** Printed above the plot as the chart's visible title, and reused as the annex table's\n * caption. */\n readonly caption = input<string | null>(null);\n\n /** Accessible name. Generated from the data when omitted. */\n readonly summary = input<string | null>(null);\n\n /** The label-and-value table under the plot: `'toggle'` puts it behind a disclosure,\n * `'visible'` opens it, `'none'` renders none. It is the non-visual route to the numbers, so\n * `'none'` belongs only where the same data is already in a table on the page.\n * Unset falls back to `DS_CONFIG.chart.dataTable`, then `'toggle'`. */\n readonly dataTable = input<ChartDataTable | null>(null);\n /** Draws skeleton marks in place of the data, at the same count, so the chart does not resize\n * when the data lands. */\n readonly loading = input(false, { transform: booleanAttribute });\n /** Shown in place of the plot when `data` is empty. Unset falls back to\n * `DS_CONFIG.chart.emptyText`, then `'No data'`. */\n readonly emptyText = input<string | null>(null);\n\n /** Shows `errorText` in place of the plot. Separate from `loading` and from an empty `data`,\n * because \"the request failed\" and \"there is nothing to show\" read the same to a reader and\n * mean opposite things. */\n readonly error = input(false, { transform: booleanAttribute });\n\n /** The message the error state prints. Unset falls back to `DS_CONFIG.chart.errorText`, then\n * `'Could not load the data'`. */\n readonly errorText = input<string | null>(null);\n /** Formats every value the chart prints, the annex table and the generated description\n * included. Unset falls back to `DS_CONFIG.chart.valueFormat`, then the browser's locale\n * grouping with a K/M/B suffix past four digits. */\n readonly valueFormat = input<ChartValueFormat | null>(null);\n\n readonly dataTableResolved = resolveWithConfig(\n this.dataTable,\n (config) => config.chart?.dataTable,\n 'toggle' as ChartDataTable,\n );\n readonly emptyTextResolved = resolveWithConfig(\n this.emptyText,\n (config) => config.chart?.emptyText,\n 'No data',\n );\n readonly errorTextResolved = resolveWithConfig(\n this.errorText,\n (config) => config.chart?.errorText,\n 'Could not load the data',\n );\n readonly valueFormatResolved = resolveWithConfig(\n this.valueFormat,\n (config) => config.chart?.valueFormat,\n defaultValueFormat as ChartValueFormat,\n );\n\n /** Turns on the click affordance — the pointer cursor and any hover tint.\n * The click output fires whether or not this is set, so a consumer that\n * binds the output and forgets the flag still receives every click. */\n readonly interactive = input(false, { transform: booleanAttribute });\n\n /** The point that was clicked, or activated with Enter or Space. Fires whether or not\n * `interactive` is set. */\n readonly pointClicked = output<ColumnChartPoint>();\n\n /** Dims every OTHER mark while one is hovered or focused, so the reader's eye is held on the\n * one under the pointer. Off by default: the dimming costs the separation BETWEEN the dimmed\n * marks — measured 2026-09-13, the worst pair of three dimmed series falls from dE 14.8 at full\n * opacity to 2.1 at `--ds-chart-dim-opacity`'s default 0.3 — so it buys loudness for one mark\n * and pays for it with the rest of the chart. */\n readonly dimOthers = input(false, { transform: booleanAttribute });\n\n /** Milliseconds between one mark's entrance and the next. `0`, the default, is no stagger at\n * all; `40` is the documented non-zero step. The total is capped, so a long series does not\n * crawl in. */\n readonly staggerMs = input(0, { transform: numberAttribute });\n\n protected markStagger(index: number): string {\n return `${staggerDelay(index, this.staggerMs())}ms`;\n }\n\n /** Whether a hovered or focused column opens a tooltip. `'axis'` is not offered — a\n * column chart's marks ARE its categories, so an axis tooltip would repeat the item one. */\n readonly tooltip = input<ChartItemTooltipTrigger>('item');\n\n protected readonly tooltipTemplate =\n contentChild<TemplateRef<{ $implicit: ChartTooltipContext }>>(\n 'dsChartTooltip',\n );\n\n /** Where the tooltip is pinned. `'mark'`, the default, is the column itself — a panel over the\n * reading it describes. `'cell'` is the full-height category cell, which puts the panel at the\n * top of the plot whatever the column's value. */\n readonly tooltipAnchor = input<'mark' | 'cell'>('mark');\n\n protected readonly activeMark = chartActiveMark();\n\n protected onMarkEnter(index: number, event: Event): void {\n this.activeMark.enter(\n index,\n event,\n this.tooltipAnchor() === 'mark' ? '.bar' : undefined,\n );\n }\n /** One tab stop per chart, not one per mark: WCAG 2.1.1's Understanding is explicit that not\n * every mouse-operable control has to be separately focusable, and that is what keeps a\n * twenty-five mark chart from being twenty-five stops in the page's tab order. */\n protected readonly rovingIndex = signal(0);\n\n protected readonly tabStopIndex = computed(() =>\n Math.min(this.rovingIndex(), Math.max(0, this.columns().length - 1)),\n );\n\n protected onMarkFocus(index: number, event: FocusEvent): void {\n this.rovingIndex.set(index);\n this.onMarkEnter(index, event);\n }\n\n protected onMarkNavigation(event: KeyboardEvent, index: number): void {\n const next = nextRovingIndex(event.key, index, this.columns().length);\n if (next === null) {\n return;\n }\n event.preventDefault();\n this.rovingIndex.set(next);\n focusMark((event.currentTarget as Element).closest('.columns'), next);\n }\n\n protected readonly tooltipContext = computed<ChartTooltipContext | null>(\n () => {\n const entry = this.columns()[this.activeMark.index()];\n if (this.tooltip() === 'none' || !entry) {\n return null;\n }\n\n return {\n category: '',\n entries: [\n {\n label: entry.point.label,\n value: entry.point.value,\n formatted: entry.formattedValue,\n color: entry.color,\n detail: describeShare(\n this.data().map((point) => point.value),\n this.activeMark.index(),\n ),\n },\n ],\n };\n },\n );\n\n protected readonly domainMax = computed(() =>\n resolveDomainMax(this.data().map((point) => point.value)),\n );\n\n /** Top of the value axis: the domain rounded up to a whole tick, so the\n * tallest column ends on a gridline rather than between two. */\n protected readonly axisMax = computed(() =>\n niceMax(this.domainMax(), this.tickCount()),\n );\n\n protected readonly ticks = computed(() => {\n const axisMax = this.axisMax();\n // Niced from the same domain as `axisMax`, which is what makes the top tick\n // and the top of the axis the same number.\n const values = tickValues(this.domainMax(), this.tickCount());\n const step = tickStep(values);\n const format = this.valueFormatResolved();\n\n return values.map((value) => ({\n label:\n format === defaultValueFormat ? formatTick(value, step) : format(value),\n offsetPercent: heightPercent(value, axisMax),\n }));\n });\n\n protected readonly columns = computed(() => {\n const axisMax = this.axisMax();\n const format = this.valueFormatResolved();\n\n return this.data().map((point, index) => ({\n key: point.id ?? String(index),\n point,\n heightPercent: heightPercent(point.value, axisMax),\n formattedValue: format(point.value),\n color:\n point.color ?? CHART_SERIES_COLORS[index % CHART_SERIES_COLORS.length],\n }));\n });\n\n protected readonly accessibleName = computed(\n () =>\n this.summary() ??\n describeSeries(\n this.caption() ?? 'Chart',\n this.data().map((point) => ({\n label: point.label,\n value: point.value,\n })),\n this.valueFormatResolved(),\n this.dataTableResolved() !== 'none',\n ),\n );\n\n protected entryLabel(entry: {\n point: ColumnChartPoint;\n formattedValue: string;\n }) {\n return `${entry.point.label}, ${entry.formattedValue}`;\n }\n\n protected onPointKey(point: ColumnChartPoint, event: Event): void {\n // Only the column's own key opens it: a key pressed on a control inside belongs to that\n // control.\n if (!this.interactive() || event.target !== event.currentTarget) {\n return;\n }\n event.preventDefault();\n this.pointClicked.emit(point);\n }\n\n protected readonly isEmpty = computed(() => this.data().length === 0);\n\n /** Placeholder columns while loading. Follows the real point count so the chart does not resize\n * when the data lands; falls back to three when `data` is still empty. */\n protected readonly skeletonColumns = computed(() =>\n Array.from({ length: Math.max(this.data().length, 3) }),\n );\n}\n","<figure class=\"column-chart\">\n @if (caption()) {\n <figcaption>\n {{ caption() }}\n </figcaption>\n }\n\n @if (error()) {\n <p\n class=\"empty is-error\"\n role=\"status\">\n {{ errorTextResolved() }}\n </p>\n } @else if (loading()) {\n <div\n class=\"skeleton\"\n aria-hidden=\"true\">\n @for (placeholder of skeletonColumns(); track $index) {\n <ds-skeleton height=\"var(--_column-chart-plot-height)\" />\n }\n </div>\n } @else if (isEmpty()) {\n <p class=\"empty\">\n {{ emptyTextResolved() }}\n </p>\n } @else {\n <div\n class=\"chart\"\n [attr.role]=\"interactive() ? 'group' : 'img'\"\n [attr.aria-label]=\"accessibleName()\">\n <div class=\"tick-labels\">\n @for (tick of ticks(); track $index) {\n <span\n class=\"tick-label\"\n [style.bottom.%]=\"tick.offsetPercent\">\n {{ tick.label }}\n </span>\n }\n </div>\n\n <div class=\"canvas\">\n <div class=\"grid-lines\">\n @for (tick of ticks(); track $index) {\n <span\n class=\"grid-line\"\n [style.bottom.%]=\"tick.offsetPercent\">\n </span>\n }\n </div>\n\n <div\n class=\"columns\"\n [class.dims-others]=\"dimOthers()\"\n [dsChartTooltip]=\"tooltipContext()\"\n [dsChartTooltipOrigin]=\"activeMark.origin()\"\n [dsChartTooltipTemplate]=\"tooltipTemplate() ?? null\">\n @for (entry of columns(); track entry.key; let index = $index) {\n <div\n class=\"column\"\n animate.leave=\"mark-leave\"\n [style.--_chart-mark-stagger]=\"markStagger(index)\"\n [class.interactive]=\"interactive()\"\n [attr.role]=\"interactive() ? 'button' : null\"\n [attr.tabindex]=\"\n interactive() ? (index === tabStopIndex() ? 0 : -1) : null\n \"\n [attr.data-mark-index]=\"index\"\n [attr.aria-label]=\"interactive() ? entryLabel(entry) : null\"\n (pointerenter)=\"onMarkEnter(index, $event)\"\n (pointerleave)=\"activeMark.leave()\"\n (focus)=\"onMarkFocus(index, $event)\"\n (blur)=\"activeMark.leave()\"\n (keydown)=\"onMarkNavigation($event, index)\"\n (click)=\"pointClicked.emit(entry.point)\"\n (keydown.enter)=\"onPointKey(entry.point, $event)\"\n (keydown.space)=\"onPointKey(entry.point, $event)\">\n <span class=\"plot-cell\">\n @if (showValues()) {\n <span class=\"value\">\n {{ entry.formattedValue }}\n </span>\n }\n\n <span\n class=\"bar\"\n animate.enter=\"mark-enter\"\n [style.height.%]=\"entry.heightPercent\"\n [style.background]=\"entry.color\">\n </span>\n </span>\n\n <span class=\"category-label\">\n {{ entry.point.label }}\n </span>\n </div>\n }\n </div>\n </div>\n </div>\n\n @if (dataTableResolved() !== 'none') {\n <details\n class=\"data-table\"\n [open]=\"dataTableResolved() === 'visible'\">\n <summary>\n Data table\n </summary>\n\n <table>\n <caption>\n {{\n caption() ?? 'Chart data'\n }}\n </caption>\n\n <thead>\n <tr>\n <th scope=\"col\">\n Label\n </th>\n\n <th scope=\"col\">\n Value\n </th>\n </tr>\n </thead>\n\n <tbody>\n @for (entry of columns(); track entry.key) {\n <tr>\n <td>\n {{ entry.point.label }}\n </td>\n\n <td>\n {{ entry.formattedValue }}\n </td>\n </tr>\n }\n </tbody>\n </table>\n </details>\n }\n }\n</figure>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAAA;;AAEmF;AAC7E,SAAU,gBAAgB,CAAC,MAAyB,EAAA;AACxD,IAAA,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,KAAK,KAAK,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;AAE/D,IAAA,OAAO,MAAM,CAAC,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC;AAChD;AAEA;AACgF;AAC1E,SAAU,aAAa,CAAC,KAAa,EAAE,OAAe,EAAA;;;;IAI1D,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,K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,MAAA,EAAA,CAAA;;4FAMvC,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBAThC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,iBAAiB,EAAA,UAAA,EACf,IAAI,EAAA,OAAA,EACP,CAAC,iBAAiB,EAAE,qBAAqB,CAAC,EAAA,aAAA,EAGpC,iBAAiB,CAAC,QAAQ,EAAA,eAAA,EACxB,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,2qIAAA,EAAA,MAAA,EAAA,CAAA,qwLAAA,CAAA,EAAA;kjDAiG3C,gBAAgB,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,aAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,eAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AErJtB;;AAEG;;;;"}
1
+ {"version":3,"file":"ids-group-ltd-ids-design-system-components-column-chart.mjs","sources":["../../../src/lib/components/column-chart/column-chart.component.ts","../../../src/lib/components/column-chart/column-chart.component.html","../../../src/lib/components/column-chart/ids-group-ltd-ids-design-system-components-column-chart.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n TemplateRef,\n ViewEncapsulation,\n afterNextRender,\n booleanAttribute,\n computed,\n contentChild,\n inject,\n input,\n numberAttribute,\n output,\n signal,\n viewChildren,\n} from '@angular/core';\nimport {\n CHART_SERIES_COLORS,\n defaultChartFormat,\n describeSeries,\n formatPercent,\n shareOfTotal,\n} from '@ids-group-ltd/ids-design-system/components';\nimport { SkeletonComponent } from '@ids-group-ltd/ids-design-system/components/skeleton';\nimport { resolveWithConfig } from '@ids-group-ltd/ids-design-system/core';\nimport type {\n ChartDataTable,\n ChartFrame,\n ChartStackMode,\n ChartThreshold,\n ChartValueFormat,\n} from '@ids-group-ltd/ids-design-system/core';\nimport {\n ChartComponent,\n ColumnSeriesComponent,\n ReferenceLabelComponent,\n ReferenceLineComponent,\n chartViewHeight,\n stackOffsets,\n} from '@ids-group-ltd/ids-design-system/components/chart';\nimport type { ChartStackOffset } from '@ids-group-ltd/ids-design-system/components/chart';\nimport { ChartLegendComponent } from '@ids-group-ltd/ids-design-system/components/chart-legend';\nimport type { ChartLegendItem } from '@ids-group-ltd/ids-design-system/components/chart-legend';\nimport { ChartTooltipDirective } from '@ids-group-ltd/ids-design-system/components/chart-tooltip';\nimport type {\n ChartItemTooltipTrigger,\n ChartTooltipContext,\n} from '@ids-group-ltd/ids-design-system/components/chart-tooltip';\nimport type {\n ChartMarkFill,\n ColumnChartPoint,\n ColumnChartSeries,\n} from './column-chart.types';\n\n/** One series, ready to draw. `points` is the caller's own array, never a copy: the colour and the\n * fill reach the marks as series-wide defaults so a clicked point comes back as the object that\n * was handed in. */\ninterface ResolvedColumnSeries {\n readonly key: string;\n readonly label: string;\n /** Null leaves each mark on the categorical palette by its own position, which is what a chart\n * of one series has always drawn. */\n readonly color: string | null;\n readonly fill: ChartMarkFill | null;\n readonly points: readonly ColumnChartPoint[];\n}\n\nfunction isSeriesList(\n data: readonly ColumnChartPoint[] | readonly ColumnChartSeries[],\n): data is readonly ColumnChartSeries[] {\n return data.length > 0 && 'data' in data[0];\n}\n\n/** What the four geometry tokens resolve to when nothing has been set and while the host is not yet\n * in a document — under SSR, and for the frame before the first read. */\nconst COLUMN_GEOMETRY = {\n plotHeight: 200,\n axisGutter: 40,\n valueSpace: 20,\n columnWidthRatio: 0.8,\n};\n\n/** The plot is an SVG coordinate space, so `--ds-column-chart-plot-height` and its three siblings\n * cannot reach it as CSS: a length written into a `viewBox` is a number the component computes.\n * They are read back once, from the private resolvers on the host, which is what keeps them real\n * public hooks rather than names that parse and change nothing.\n *\n * Read once, on the first pass: a token re-pointed at a breakpoint is NOT picked up, because\n * `ds-chart`'s `ResizeObserver` answers the plot's width rather than a token's value. Set these\n * from a stylesheet, not from a media query. */\nfunction readColumnGeometry(host: HTMLElement): typeof COLUMN_GEOMETRY {\n const style = getComputedStyle(host);\n const length = (token: string, fallback: number): number => {\n const parsed = Number.parseFloat(style.getPropertyValue(token));\n\n // `>= 0`, so a token deliberately set to zero - no tick gutter, no label headroom - is kept\n // rather than silently replaced by the default.\n return Number.isFinite(parsed) && parsed >= 0 ? parsed : fallback;\n };\n\n return {\n plotHeight: length(\n '--_column-chart-plot-height',\n COLUMN_GEOMETRY.plotHeight,\n ),\n axisGutter: length(\n '--_column-chart-axis-width',\n COLUMN_GEOMETRY.axisGutter,\n ),\n valueSpace: length(\n '--_column-chart-value-space',\n COLUMN_GEOMETRY.valueSpace,\n ),\n // A share of the category's own slot, written as a percentage and used as a ratio.\n columnWidthRatio:\n length(\n '--_column-chart-column-width',\n COLUMN_GEOMETRY.columnWidthRatio * 100,\n ) / 100,\n };\n}\n\n@Component({\n selector: 'ds-column-chart',\n standalone: true,\n imports: [\n SkeletonComponent,\n ChartComponent,\n ChartLegendComponent,\n ColumnSeriesComponent,\n ReferenceLabelComponent,\n ReferenceLineComponent,\n ChartTooltipDirective,\n ],\n templateUrl: './column-chart.component.html',\n styleUrl: './column-chart.component.scss',\n host: {\n '[class.framed]': \"frameResolved() === 'auto'\",\n '[style.--_column-chart-view-height]': 'viewHeightPx()',\n },\n encapsulation: ViewEncapsulation.Emulated,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ColumnChartComponent {\n /** One column per point, drawn in the order given - or one NAMED SERIES per entry, where every\n * category carries a column from each. The two forms are told apart by their shape, so a chart\n * handed a flat list behaves exactly as it always has. */\n readonly data = input.required<\n readonly ColumnChartPoint[] | readonly ColumnChartSeries[]\n >();\n\n /** How several series share one category's band. `'none'`, the default, and `'grouped'` draw\n * them side by side - a chart of one series takes the whole band either way, so the two differ\n * only in spelling. `'stacked'` puts each series on top of the one before it, and\n * `'normalized'` stacks then divides by the category's total, so every band is full and the\n * axis reads in shares.\n *\n * Unrelated to `ds-line-chart`'s `axisMode=\"stacked\"`, which is two PLOTS one above the\n * other. */\n readonly stack = input<ChartStackMode>('none');\n\n /** Reference lines and bands drawn across the plot, behind the columns: a target, a budget, an\n * SLA. Each one opens the value axis far enough to hold it, so a target above every column is\n * still on the plot, and each is named in the generated description - a line only the sighted\n * reader gets is an annotation half the audience never receives. */\n readonly thresholds = input<readonly ChartThreshold[]>([]);\n\n /** Prints each column's value above the column. */\n readonly showValues = input(true, { transform: booleanAttribute });\n\n /** How many value-axis ticks to aim for. A hint, not a count: ticks are\n * snapped to a round step, so the axis may carry one more or one fewer. */\n readonly tickCount = input(5, { transform: numberAttribute });\n\n /** Whether the chart draws its own bordered, padded box. `'auto'`, the default, draws it;\n * `'none'` leaves the chart bare, for one placed inside a card the page has already drawn.\n * Unset falls back to `DS_CONFIG.chart.frame`, then `'auto'` — whether charts live inside cards\n * is one decision per app rather than per plot. */\n readonly frame = input<ChartFrame | null>(null);\n\n /** How long the tooltip stays after the pointer leaves the mark, in milliseconds. Zero, the\n * default, takes it away at once: a panel that outlives the pointer sits over the plot the\n * reader has moved on to.\n *\n * Raise it only for a panel a reader has to REACH — one carrying a link, a figure, or anything\n * selectable — which is WCAG 1.4.13's hoverable clause. The panel is portaled to the body, so\n * crossing the gap to it at an ordinary pointer speed needs about 140. Unset falls back to\n * `DS_CONFIG.chart.tooltipLingerMs`, then 0. */\n readonly tooltipLingerMs = input<number | null>(null, {\n transform: (raw: unknown) => (raw == null ? null : numberAttribute(raw)),\n });\n /** Printed above the plot as the chart's visible title, and reused as the annex table's\n * caption. */\n readonly caption = input<string | null>(null);\n\n /** Accessible name. Generated from the data when omitted. */\n readonly summary = input<string | null>(null);\n\n /** The label-and-value table under the plot: `'toggle'` puts it behind a disclosure,\n * `'visible'` opens it, `'none'` renders none. It is the non-visual route to the numbers, so\n * `'none'` belongs only where the same data is already in a table on the page.\n * Unset falls back to `DS_CONFIG.chart.dataTable`, then `'none'`. */\n readonly dataTable = input<ChartDataTable | null>(null);\n /** Declares that the marks are parts of one whole, which is what makes a share of their total a\n * real quantity. Off by default: a chart of visitors per stage or revenue per month sums to a\n * number nobody can point at, and \"18.6% of total\" against it is arithmetic dressed as a fact.\n * On, each mark's share appears on the tooltip's second line and in the data table. */\n readonly partOfWhole = input(false, { transform: booleanAttribute });\n\n /** Draws skeleton marks in place of the data, at the same count, so the chart does not resize\n * when the data lands. */\n readonly loading = input(false, { transform: booleanAttribute });\n /** Shown in place of the plot when `data` is empty. Unset falls back to\n * `DS_CONFIG.chart.emptyText`, then `'No data'`. */\n readonly emptyText = input<string | null>(null);\n\n /** Shows `errorText` in place of the plot. Separate from `loading` and from an empty `data`,\n * because \"the request failed\" and \"there is nothing to show\" read the same to a reader and\n * mean opposite things. */\n readonly error = input(false, { transform: booleanAttribute });\n\n /** The message the error state prints. Unset falls back to `DS_CONFIG.chart.errorText`, then\n * `'Could not load the data'`. */\n readonly errorText = input<string | null>(null);\n /** Formats every value the chart prints, the annex table and the generated description\n * included. Unset falls back to `DS_CONFIG.chart.valueFormat`, then the browser's locale\n * grouping with a K/M/B suffix past four digits. */\n readonly valueFormat = input<ChartValueFormat | null>(null);\n\n readonly frameResolved = resolveWithConfig(\n this.frame,\n (config) => config.chart?.frame,\n 'auto' as ChartFrame,\n );\n readonly dataTableResolved = resolveWithConfig(\n this.dataTable,\n (config) => config.chart?.dataTable,\n 'none' as ChartDataTable,\n );\n readonly emptyTextResolved = resolveWithConfig(\n this.emptyText,\n (config) => config.chart?.emptyText,\n 'No data',\n );\n readonly errorTextResolved = resolveWithConfig(\n this.errorText,\n (config) => config.chart?.errorText,\n 'Could not load the data',\n );\n readonly valueFormatResolved = resolveWithConfig(\n this.valueFormat,\n (config) => config.chart?.valueFormat,\n defaultChartFormat,\n );\n\n /** Turns on the click affordance — the pointer cursor and any hover tint.\n * The click output fires whether or not this is set, so a consumer that\n * binds the output and forgets the flag still receives every click. */\n readonly interactive = input(false, { transform: booleanAttribute });\n\n /** The point that was clicked, or activated with Enter or Space. Fires whether or not\n * `interactive` is set. */\n readonly pointClicked = output<ColumnChartPoint>();\n\n /** Holds the hovered mark and its tooltip in place when it is clicked, until Escape or a press\n * outside releases it. Off by default: a click is already the drill-down hook, and a mark left\n * lit after the pointer has gone needs a reader who knows why it is lit. `pointClicked` fires\n * either way — pinning is a state, not a handler. */\n readonly pinOnClick = input(false, { transform: booleanAttribute });\n\n /** Dims every OTHER mark while one is hovered or focused, so the reader's eye is held on the\n * one under the pointer. Off by default: the dimming costs the separation BETWEEN the dimmed\n * marks — measured 2026-09-13, the worst pair of three dimmed series falls from dE 14.8 at full\n * opacity to 2.1 at `--ds-chart-dim-opacity`'s default 0.3 — so it buys loudness for one mark\n * and pays for it with the rest of the chart. */\n readonly dimOthers = input(false, { transform: booleanAttribute });\n\n /** Milliseconds between one mark's entrance and the next. `0`, the default, is no stagger at\n * all; `40` is the documented non-zero step. The total is capped, so a long series does not\n * crawl in. */\n readonly staggerMs = input(0, { transform: numberAttribute });\n\n /** Whether a hovered or focused column opens a tooltip. `'axis'` is not offered — a\n * column chart's marks ARE its categories, so an axis tooltip would repeat the item one. */\n readonly tooltip = input<ChartItemTooltipTrigger>('item');\n\n protected readonly tooltipTemplate =\n contentChild<TemplateRef<{ $implicit: ChartTooltipContext }>>(\n 'dsChartTooltip',\n );\n\n /** Where the tooltip is pinned. `'mark'`, the default, is the column itself — a panel over the\n * reading it describes. `'cell'` is the full-height category cell, which puts the panel at the\n * top of the plot whatever the column's value. */\n readonly tooltipAnchor = input<'mark' | 'cell'>('mark');\n\n /** The value is printed ABOVE the column, so a panel anchored to the column alone opens on top\n * of that number. One text line of clearance puts it above both. */\n protected readonly valueClearance = computed(() =>\n this.showValues() ? 18 : 0,\n );\n\n protected readonly tooltipLingerResolved = resolveWithConfig(\n this.tooltipLingerMs,\n (config) => config.chart?.tooltipLingerMs,\n 0,\n );\n\n protected readonly geometry = signal(COLUMN_GEOMETRY);\n\n /** Every state occupies the box the plot would have, so nothing on the page moves when the data\n * lands or the request fails. */\n protected readonly viewHeightPx = computed(\n () =>\n `${chartViewHeight(this.geometry().plotHeight, this.geometry().valueSpace)}px`,\n );\n\n protected readonly skeletonHeightPx = computed(\n () => `${this.geometry().plotHeight}px`,\n );\n\n protected readonly seriesRefs = viewChildren(ColumnSeriesComponent);\n\n protected readonly pinnedSeries = computed(\n () =>\n this.seriesRefs().find((series) => series.activeMark.pinned()) ?? null,\n );\n\n protected readonly resolvedSeries = computed<readonly ResolvedColumnSeries[]>(\n () => {\n const given = this.data();\n if (!isSeriesList(given)) {\n return [\n { key: 'series', label: '', color: null, fill: null, points: given },\n ];\n }\n\n return given.map((series, index) => ({\n key: series.id,\n label: series.label,\n color:\n series.color ??\n CHART_SERIES_COLORS[index % CHART_SERIES_COLORS.length],\n fill: series.fill ?? null,\n points: series.data,\n }));\n },\n );\n\n /** Stacking collapses every series onto ONE slot, which is also why a stacked series is drawn\n * at slot 0 rather than at its own index - its segments sit on top of each other, not beside\n * them. */\n protected readonly slotCount = computed(() =>\n this.stack() === 'stacked' || this.stack() === 'normalized'\n ? 1\n : this.resolvedSeries().length,\n );\n\n private readonly offsets = computed(() =>\n stackOffsets(\n this.resolvedSeries().map((series) =>\n series.points.map((point) => point.value),\n ),\n this.stack(),\n ),\n );\n\n protected offsetsFor(index: number): readonly ChartStackOffset[] {\n return this.offsets()[index] ?? [];\n }\n\n /** The categories come from the LONGEST series: a series that stops early leaves the bands past\n * its end standing rather than taking them off the axis for every other series too. */\n protected readonly categories = computed(() =>\n this.resolvedSeries()\n .reduce<readonly ColumnChartPoint[]>(\n (longest, series) =>\n series.points.length > longest.length ? series.points : longest,\n [],\n )\n .map((point) => point.label),\n );\n\n protected readonly multiSeries = computed(\n () => this.resolvedSeries().length > 1,\n );\n\n protected readonly legendItems = computed<readonly ChartLegendItem[]>(() =>\n this.resolvedSeries().map((series) => ({\n id: series.key,\n label: series.label,\n color: series.color ?? '',\n })),\n );\n\n /** A normalized stack draws shares, not readings, so the axis has to say so - the value printed\n * beside each mark stays the reading, which is what `valueFormat` goes on formatting. */\n protected readonly axisFormat = computed<ChartValueFormat | null>(() =>\n this.stack() === 'normalized'\n ? (value: number) => formatPercent(value, 1)\n : this.valueFormat(),\n );\n\n protected readonly tableRows = computed(() => {\n const format = this.valueFormatResolved();\n\n return this.resolvedSeries().flatMap((series) => {\n const values = series.points.map((point) => point.value);\n\n return series.points.map((point, index) => ({\n key: `${series.key}:${point.id ?? index}`,\n series: series.label,\n label: point.label,\n formattedValue: format(point.value, 'tooltip'),\n share: this.partOfWhole() ? shareOfTotal(values, index) : '',\n }));\n });\n });\n\n protected readonly accessibleName = computed(\n () =>\n this.summary() ??\n this.resolvedSeries()\n .map((series, index) =>\n describeSeries(\n series.label || this.caption() || 'Chart',\n series.points.map((point) => ({\n label: point.label,\n value: point.value,\n })),\n (value) => this.valueFormatResolved()(value, 'tooltip'),\n this.dataTableResolved() !== 'none',\n // The reference lines belong to the plot, not to a series, so they are named once.\n index === 0 ? this.thresholds() : [],\n ),\n )\n .join(' '),\n );\n\n protected readonly isEmpty = computed(() => this.categories().length === 0);\n\n /** Placeholder columns while loading. Follows the real point count so the chart does not resize\n * when the data lands; falls back to three when `data` is still empty. */\n protected readonly skeletonColumns = computed(() =>\n Array.from({ length: Math.max(this.categories().length, 3) }),\n );\n\n constructor() {\n const host = inject<ElementRef<HTMLElement>>(ElementRef);\n afterNextRender(() =>\n this.geometry.set(readColumnGeometry(host.nativeElement)),\n );\n }\n}\n","<figure class=\"column-chart\">\n @if (pinnedSeries()) {\n <button\n class=\"pin-reset\"\n type=\"button\"\n (click)=\"pinnedSeries()?.activeMark?.release()\">\n Unpin\n </button>\n }\n\n @if (caption()) {\n <figcaption>\n {{ caption() }}\n </figcaption>\n }\n\n @if (error()) {\n <p\n class=\"empty is-error\"\n role=\"status\">\n {{ errorTextResolved() }}\n </p>\n } @else if (loading()) {\n <div\n class=\"skeleton\"\n aria-hidden=\"true\">\n @for (placeholder of skeletonColumns(); track $index) {\n <ds-skeleton [height]=\"skeletonHeightPx()\" />\n }\n </div>\n } @else if (isEmpty()) {\n <p class=\"empty\">\n {{ emptyTextResolved() }}\n </p>\n } @else {\n <ds-chart\n frame=\"none\"\n [categories]=\"categories()\"\n [tickCount]=\"tickCount()\"\n [valueFormat]=\"axisFormat()\"\n [interactive]=\"interactive()\"\n [summary]=\"accessibleName()\"\n [plotHeight]=\"geometry().plotHeight\"\n [axisGutter]=\"geometry().axisGutter\"\n [valueSpace]=\"geometry().valueSpace\">\n <svg:g\n dsReferenceLine\n [thresholds]=\"thresholds()\" />\n\n @for (\n series of resolvedSeries();\n track series.key;\n let seriesIndex = $index\n ) {\n <svg:g\n #mark=\"dsColumnSeries\"\n dsColumnSeries\n [data]=\"series.points\"\n [slot]=\"slotCount() > 1 ? seriesIndex : 0\"\n [slotCount]=\"slotCount()\"\n [offsets]=\"offsetsFor(seriesIndex)\"\n [seriesColor]=\"series.color\"\n [seriesFill]=\"series.fill\"\n [seriesLabel]=\"multiSeries() ? series.label : null\"\n [columnWidthRatio]=\"geometry().columnWidthRatio\"\n [showValues]=\"showValues()\"\n [interactive]=\"interactive()\"\n [pinOnClick]=\"pinOnClick()\"\n [dimOthers]=\"dimOthers()\"\n [staggerMs]=\"staggerMs()\"\n [partOfWhole]=\"partOfWhole()\"\n [tooltip]=\"tooltip()\"\n [tooltipAnchor]=\"tooltipAnchor()\"\n [tooltipLingerMs]=\"tooltipLingerResolved()\"\n [valueFormat]=\"valueFormatResolved()\"\n [dsChartTooltip]=\"mark.tooltipContext()\"\n [dsChartTooltipExtraGap]=\"valueClearance()\"\n [dsChartTooltipPreferBelow]=\"mark.activeMark.pinned()\"\n [dsChartTooltipOrigin]=\"mark.activeMark.origin()\"\n [dsChartTooltipTemplate]=\"tooltipTemplate() ?? null\"\n (pointClicked)=\"pointClicked.emit($event)\" />\n }\n\n <svg:g\n dsReferenceLabel\n [thresholds]=\"thresholds()\" />\n </ds-chart>\n\n @if (multiSeries()) {\n <ds-chart-legend [items]=\"legendItems()\" />\n }\n\n @if (dataTableResolved() !== 'none') {\n <details\n class=\"data-table\"\n [open]=\"dataTableResolved() === 'visible'\">\n <summary>\n Data table\n </summary>\n\n <table>\n <caption>\n {{\n caption() ?? 'Chart data'\n }}\n </caption>\n\n <thead>\n <tr>\n @if (multiSeries()) {\n <th scope=\"col\">\n Series\n </th>\n }\n\n <th scope=\"col\">\n Label\n </th>\n\n <th scope=\"col\">\n Value\n </th>\n\n @if (partOfWhole()) {\n <th scope=\"col\">\n Share of total\n </th>\n }\n </tr>\n </thead>\n\n <tbody>\n @for (row of tableRows(); track row.key) {\n <tr>\n @if (multiSeries()) {\n <td>\n {{ row.series }}\n </td>\n }\n\n <td>\n {{ row.label }}\n </td>\n\n <td>\n {{ row.formattedValue }}\n </td>\n\n @if (partOfWhole()) {\n <td>\n {{ row.share }}\n </td>\n }\n </tr>\n }\n </tbody>\n </table>\n </details>\n }\n }\n</figure>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAoEA,SAAS,YAAY,CACnB,IAAgE,EAAA;AAEhE,IAAA,OAAO,IAAI,CAAC,MAAM,GAAG,CAAC,IAAI,MAAM,IAAI,IAAI,CAAC,CAAC,CAAC;AAC7C;AAEA;AAC0E;AAC1E,MAAM,eAAe,GAAG;AACtB,IAAA,UAAU,EAAE,GAAG;AACf,IAAA,UAAU,EAAE,EAAE;AACd,IAAA,UAAU,EAAE,EAAE;AACd,IAAA,gBAAgB,EAAE,GAAG;CACtB;AAED;;;;;;;AAOiD;AACjD,SAAS,kBAAkB,CAAC,IAAiB,EAAA;AAC3C,IAAA,MAAM,KAAK,GAAG,gBAAgB,CAAC,IAAI,CAAC;AACpC,IAAA,MAAM,MAAM,GAAG,CAAC,KAAa,EAAE,QAAgB,KAAY;AACzD,QAAA,MAAM,MAAM,GAAG,MAAM,CAAC,UAAU,CAAC,KAAK,CAAC,g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A,EAAA,IAAA,EAAA,EAAA,CAAA,MAAA,EAAA,IAAA,EAAA,CAAA,cAAA,CAAA,EAAA,CAAA,EAAA,UAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,YAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,SAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,WAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,SAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,WAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,OAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,SAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,YAAA,EAAA,IAAA,EAAA,CAAA,gBAAgB,qMAiCyB,qBAAqB,CAAA,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AElUpE;;AAEG;;;;"}
@@ -1,7 +1,8 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { input, numberAttribute, booleanAttribute, output, contentChild, signal, computed, ChangeDetectionStrategy, ViewEncapsulation, Component } from '@angular/core';
3
- import { formatValue, nextRovingIndex, focusMark, largestRemainder, CHART_SERIES_COLORS, describeSeries } from '@ids-group-ltd/ids-design-system/components';
3
+ import { defaultChartFormat, markAt, nextRovingIndex, focusMark, largestRemainder, CHART_SERIES_COLORS, describeSeries } from '@ids-group-ltd/ids-design-system/components';
4
4
  import { SkeletonComponent } from '@ids-group-ltd/ids-design-system/components/skeleton';
5
+ import { IconComponent } from '@ids-group-ltd/ids-design-system/icons';
5
6
  import { resolveWithConfig } from '@ids-group-ltd/ids-design-system/core';
6
7
  import { chartActiveMark, ChartTooltipDirective } from '@ids-group-ltd/ids-design-system/components/chart-tooltip';
7
8
 
@@ -87,7 +88,15 @@ function paletteIndex(slot, index, paletteLength) {
87
88
  * reader expects a ring to start; SVG's y axis points down, so that is
88
89
  * (sin, -cos) rather than the (cos, sin) of the maths convention. */
89
90
  function ringPoint(centerX, centerY, radius, angle) {
90
- return `${round(centerX + radius * Math.sin(angle))} ${round(centerY - radius * Math.cos(angle))}`;
91
+ const { x, y } = ringCoords(centerX, centerY, radius, angle);
92
+ return `${x} ${y}`;
93
+ }
94
+ /** The same point as numbers, for PLACING something rather than drawing a path. */
95
+ function ringCoords(centerX, centerY, radius, angle) {
96
+ return {
97
+ x: round(centerX + radius * Math.sin(angle)),
98
+ y: round(centerY - radius * Math.cos(angle)),
99
+ };
91
100
  }
92
101
  function arcPath(centerX, centerY, outerRadius, innerRadius, startAngle, endAngle) {
93
102
  const finite = [
@@ -141,7 +150,6 @@ function round(value) {
141
150
  return Math.round(value * 1000) / 1000;
142
151
  }
143
152
 
144
- const defaultValueFormat = (value) => formatValue(value);
145
153
  const RING_VIEW_BOX_SIZE = 100;
146
154
  const RING_CENTER = RING_VIEW_BOX_SIZE / 2;
147
155
  const RING_OUTER_RADIUS = RING_VIEW_BOX_SIZE / 2;
@@ -163,6 +171,20 @@ class DonutChartComponent {
163
171
  otherLabel = input('Other', ...(ngDevMode ? [{ debugName: "otherLabel" }] : /* istanbul ignore next */ []));
164
172
  /** Ring width as a fraction of the radius. */
165
173
  thickness = input(DEFAULT_THICKNESS, { ...(ngDevMode ? { debugName: "thickness" } : /* istanbul ignore next */ {}), transform: numberAttribute });
174
+ /** Whether the chart draws its own bordered, padded box. `'auto'`, the default, draws it;
175
+ * `'none'` leaves the chart bare, for one placed inside a card the page has already drawn.
176
+ * Unset falls back to `DS_CONFIG.chart.frame`, then `'auto'` — whether charts live inside cards
177
+ * is one decision per app rather than per plot. */
178
+ frame = input(null, ...(ngDevMode ? [{ debugName: "frame" }] : /* istanbul ignore next */ []));
179
+ /** How long the tooltip stays after the pointer leaves the mark, in milliseconds. Zero, the
180
+ * default, takes it away at once: a panel that outlives the pointer sits over the plot the
181
+ * reader has moved on to.
182
+ *
183
+ * Raise it only for a panel a reader has to REACH — one carrying a link, a figure, or anything
184
+ * selectable — which is WCAG 1.4.13's hoverable clause. The panel is portaled to the body, so
185
+ * crossing the gap to it at an ordinary pointer speed needs about 140. Unset falls back to
186
+ * `DS_CONFIG.chart.tooltipLingerMs`, then 0. */
187
+ tooltipLingerMs = input(null, { ...(ngDevMode ? { debugName: "tooltipLingerMs" } : /* istanbul ignore next */ {}), transform: (raw) => (raw == null ? null : numberAttribute(raw)) });
166
188
  /** Printed above the plot as the chart's visible title, and reused as the annex table's
167
189
  * caption. */
168
190
  caption = input(null, ...(ngDevMode ? [{ debugName: "caption" }] : /* istanbul ignore next */ []));
@@ -171,8 +193,13 @@ class DonutChartComponent {
171
193
  /** The label-and-value table under the plot: `'toggle'` puts it behind a disclosure,
172
194
  * `'visible'` opens it, `'none'` renders none. It is the non-visual route to the numbers, so
173
195
  * `'none'` belongs only where the same data is already in a table on the page.
174
- * Unset falls back to `DS_CONFIG.chart.dataTable`, then `'toggle'`. */
196
+ * Unset falls back to `DS_CONFIG.chart.dataTable`, then `'none'`. */
175
197
  dataTable = input(null, ...(ngDevMode ? [{ debugName: "dataTable" }] : /* istanbul ignore next */ []));
198
+ /** Prints each slice's share of the ring — in the legend, on the tooltip and in the data table.
199
+ * On by default, unlike every other chart, because a ring IS parts of one whole: the share is a
200
+ * real quantity here whatever the data, not a claim the consumer has to make. Off drops all
201
+ * three, for a ring whose slices are already labelled in percent. */
202
+ partOfWhole = input(true, { ...(ngDevMode ? { debugName: "partOfWhole" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
176
203
  /** Draws skeleton marks in place of the data, at the same count, so the chart does not resize
177
204
  * when the data lands. */
178
205
  loading = input(false, { ...(ngDevMode ? { debugName: "loading" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
@@ -190,10 +217,11 @@ class DonutChartComponent {
190
217
  * included. Unset falls back to `DS_CONFIG.chart.valueFormat`, then the browser's locale
191
218
  * grouping with a K/M/B suffix past four digits. */
192
219
  valueFormat = input(null, ...(ngDevMode ? [{ debugName: "valueFormat" }] : /* istanbul ignore next */ []));
193
- dataTableResolved = resolveWithConfig(this.dataTable, (config) => config.chart?.dataTable, 'toggle');
220
+ frameResolved = resolveWithConfig(this.frame, (config) => config.chart?.frame, 'auto');
221
+ dataTableResolved = resolveWithConfig(this.dataTable, (config) => config.chart?.dataTable, 'none');
194
222
  emptyTextResolved = resolveWithConfig(this.emptyText, (config) => config.chart?.emptyText, 'No data');
195
223
  errorTextResolved = resolveWithConfig(this.errorText, (config) => config.chart?.errorText, 'Could not load the data');
196
- valueFormatResolved = resolveWithConfig(this.valueFormat, (config) => config.chart?.valueFormat, defaultValueFormat);
224
+ valueFormatResolved = resolveWithConfig(this.valueFormat, (config) => config.chart?.valueFormat, defaultChartFormat);
197
225
  /** Turns on the click affordance — the pointer cursor and any hover tint.
198
226
  * The click output fires whether or not this is set, so a consumer that
199
227
  * binds the output and forgets the flag still receives every click. */
@@ -201,6 +229,11 @@ class DonutChartComponent {
201
229
  /** The slice that was clicked, or activated with Enter or Space. Fires whether or not
202
230
  * `interactive` is set. */
203
231
  sliceClicked = output();
232
+ /** Holds the hovered mark and its tooltip in place when it is clicked, until Escape or a press
233
+ * outside releases it. Off by default: a click is already the drill-down hook, and a mark left
234
+ * lit after the pointer has gone needs a reader who knows why it is lit. `sliceClicked` fires
235
+ * either way — pinning is a state, not a handler. */
236
+ pinOnClick = input(false, { ...(ngDevMode ? { debugName: "pinOnClick" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
204
237
  /** Dims every OTHER mark while one is hovered or focused, so the reader's eye is held on the
205
238
  * one under the pointer. Off by default: the dimming costs the separation BETWEEN the dimmed
206
239
  * marks — measured 2026-09-13, the worst pair of three dimmed series falls from dE 14.8 at full
@@ -215,7 +248,14 @@ class DonutChartComponent {
215
248
  * has no axis to group readings under. */
216
249
  tooltip = input('item', ...(ngDevMode ? [{ debugName: "tooltip" }] : /* istanbul ignore next */ []));
217
250
  tooltipTemplate = contentChild('dsChartTooltip', ...(ngDevMode ? [{ debugName: "tooltipTemplate" }] : /* istanbul ignore next */ []));
218
- activeMark = chartActiveMark();
251
+ tooltipLingerResolved = resolveWithConfig(this.tooltipLingerMs, (config) => config.chart?.tooltipLingerMs, 0);
252
+ activeMark = chartActiveMark(() => this.tooltipLingerResolved());
253
+ onMarkClick(payload, index, event) {
254
+ this.sliceClicked.emit(payload);
255
+ if (this.pinOnClick()) {
256
+ this.activeMark.pin(index, event);
257
+ }
258
+ }
219
259
  /** One tab stop per chart, not one per slice: WCAG 2.1.1's Understanding is explicit that not
220
260
  * every mouse-operable control has to be separately focusable. */
221
261
  rovingIndex = signal(0, ...(ngDevMode ? [{ debugName: "rovingIndex" }] : /* istanbul ignore next */ []));
@@ -224,6 +264,29 @@ class DonutChartComponent {
224
264
  this.rovingIndex.set(index);
225
265
  this.activeMark.enter(index, event);
226
266
  }
267
+ /** A legend item stands for its arc, so it opens the arc's tooltip over the ARC and dims the
268
+ * other slices — the same state hovering the arc itself produces. */
269
+ onLegendEnter(index, event) {
270
+ this.activeMark.enter(index, event, this.arcAt(event, index));
271
+ }
272
+ onLegendFocus(index, event) {
273
+ this.rovingIndex.set(index);
274
+ this.onLegendEnter(index, event);
275
+ }
276
+ onLegendClick(slice, index, event) {
277
+ this.sliceClicked.emit(slice);
278
+ if (this.pinOnClick()) {
279
+ this.activeMark.pin(index, event, this.arcAt(event, index));
280
+ }
281
+ }
282
+ arcAt(event, index) {
283
+ return markAt(event.currentTarget.closest('.chart'), index, '.slice');
284
+ }
285
+ isDimmed(index) {
286
+ return (this.dimOthers() &&
287
+ this.activeMark.index() !== -1 &&
288
+ this.activeMark.index() !== index);
289
+ }
227
290
  onMarkNavigation(event, index, scope) {
228
291
  const next = nextRovingIndex(event.key, index, this.slices().length);
229
292
  if (next === null) {
@@ -244,7 +307,9 @@ class DonutChartComponent {
244
307
  {
245
308
  label: entry.slice.label,
246
309
  value: entry.slice.value,
247
- formatted: `${entry.formattedValue} · ${entry.formattedPercent}`,
310
+ formatted: this.partOfWhole()
311
+ ? `${entry.formattedValue} · ${entry.formattedPercent}`
312
+ : entry.formattedValue,
248
313
  color: entry.color,
249
314
  },
250
315
  ],
@@ -259,24 +324,30 @@ class DonutChartComponent {
259
324
  const arcs = sliceArcs(values);
260
325
  const percents = largestRemainder(positiveValues(values));
261
326
  const innerRadius = resolveInnerRadius(RING_OUTER_RADIUS, this.thickness());
262
- const format = this.valueFormatResolved();
327
+ const format = (value) => this.valueFormatResolved()(value, 'tooltip');
328
+ const midRadius = (RING_OUTER_RADIUS + innerRadius) / 2;
263
329
  return data.map((slice, index) => ({
264
330
  slice,
331
+ // Halfway along the arc and halfway through the ring: the one point that is inside a slice
332
+ // whatever its sweep, which the bounding box of a curved wedge is not.
333
+ center: ringCoords(RING_CENTER, RING_CENTER, midRadius, (arcs[index].startAngle + arcs[index].endAngle) / 2),
265
334
  path: arcPath(RING_CENTER, RING_CENTER, RING_OUTER_RADIUS, innerRadius, arcs[index].startAngle, arcs[index].endAngle),
266
335
  color: CHART_SERIES_COLORS[paletteIndex(slice.slot, index, CHART_SERIES_COLORS.length)],
267
336
  formattedValue: format(slice.value),
268
337
  formattedPercent: `${percents[index]}%`,
269
338
  }));
270
339
  }, ...(ngDevMode ? [{ debugName: "slices" }] : /* istanbul ignore next */ []));
271
- resolvedCenterValue = computed(() => this.centerValue() ?? this.valueFormatResolved()(this.total()), ...(ngDevMode ? [{ debugName: "resolvedCenterValue" }] : /* istanbul ignore next */ []));
340
+ resolvedCenterValue = computed(() => this.centerValue() ?? this.valueFormatResolved()(this.total(), 'tooltip'), ...(ngDevMode ? [{ debugName: "resolvedCenterValue" }] : /* istanbul ignore next */ []));
272
341
  accessibleName = computed(() => this.summary() ??
273
342
  describeSeries(this.caption() ?? 'Chart', this.data().map((slice) => ({
274
343
  label: slice.label,
275
344
  value: slice.value,
276
- })), this.valueFormatResolved(), this.dataTableResolved() !== 'none'), ...(ngDevMode ? [{ debugName: "accessibleName" }] : /* istanbul ignore next */ []));
345
+ })), (value) => this.valueFormatResolved()(value, 'tooltip'), this.dataTableResolved() !== 'none'), ...(ngDevMode ? [{ debugName: "accessibleName" }] : /* istanbul ignore next */ []));
277
346
  hole = computed(() => holeFraction(this.thickness()), ...(ngDevMode ? [{ debugName: "hole" }] : /* istanbul ignore next */ []));
278
347
  entryLabel(entry) {
279
- return `${entry.slice.label}, ${entry.formattedValue}, ${entry.formattedPercent}`;
348
+ return this.partOfWhole()
349
+ ? `${entry.slice.label}, ${entry.formattedValue}, ${entry.formattedPercent}`
350
+ : `${entry.slice.label}, ${entry.formattedValue}`;
280
351
  }
281
352
  onSliceKey(slice, event) {
282
353
  // Only the legend item's own key opens it: a key pressed on a control inside belongs to that
@@ -296,12 +367,12 @@ class DonutChartComponent {
296
367
  * is still empty. */
297
368
  skeletonRows = computed(() => Array.from({ length: Math.max(this.data().length, 3) }), ...(ngDevMode ? [{ debugName: "skeletonRows" }] : /* istanbul ignore next */ []));
298
369
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: DonutChartComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
299
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: DonutChartComponent, isStandalone: true, selector: "ds-donut-chart", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: true, transformFunction: null }, centerValue: { classPropertyName: "centerValue", publicName: "centerValue", isSignal: true, isRequired: false, transformFunction: null }, centerLabel: { classPropertyName: "centerLabel", publicName: "centerLabel", isSignal: true, isRequired: false, transformFunction: null }, legend: { classPropertyName: "legend", publicName: "legend", isSignal: true, isRequired: false, transformFunction: null }, maxSlices: { classPropertyName: "maxSlices", publicName: "maxSlices", isSignal: true, isRequired: false, transformFunction: null }, otherLabel: { classPropertyName: "otherLabel", publicName: "otherLabel", isSignal: true, isRequired: false, transformFunction: null }, thickness: { classPropertyName: "thickness", publicName: "thickness", isSignal: true, isRequired: false, transformFunction: null }, caption: { classPropertyName: "caption", publicName: "caption", isSignal: true, isRequired: false, transformFunction: null }, summary: { classPropertyName: "summary", publicName: "summary", isSignal: true, isRequired: false, transformFunction: null }, dataTable: { classPropertyName: "dataTable", publicName: "dataTable", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, emptyText: { classPropertyName: "emptyText", publicName: "emptyText", isSignal: true, isRequired: false, transformFunction: null }, error: { classPropertyName: "error", publicName: "error", isSignal: true, isRequired: false, transformFunction: null }, errorText: { classPropertyName: "errorText", publicName: "errorText", isSignal: true, isRequired: false, transformFunction: null }, valueFormat: { classPropertyName: "valueFormat", publicName: "valueFormat", isSignal: true, isRequired: false, transformFunction: null }, interactive: { classPropertyName: "interactive", publicName: "interactive", isSignal: true, isRequired: false, transformFunction: null }, dimOthers: { classPropertyName: "dimOthers", publicName: "dimOthers", isSignal: true, isRequired: false, transformFunction: null }, staggerMs: { classPropertyName: "staggerMs", publicName: "staggerMs", isSignal: true, isRequired: false, transformFunction: null }, tooltip: { classPropertyName: "tooltip", publicName: "tooltip", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { sliceClicked: "sliceClicked" }, queries: [{ propertyName: "tooltipTemplate", first: true, predicate: ["dsChartTooltip"], descendants: true, isSignal: true }], ngImport: i0, template: "<figure\n class=\"donut-chart\"\n [style.--_donut-chart-hole-fraction]=\"hole()\">\n @if (caption()) {\n <figcaption>\n {{ caption() }}\n </figcaption>\n }\n\n @if (error()) {\n <div class=\"empty\">\n <div\n class=\"empty-ring\"\n aria-hidden=\"true\">\n </div>\n\n <p\n class=\"empty-text is-error\"\n role=\"status\">\n {{ errorTextResolved() }}\n </p>\n </div>\n } @else if (loading()) {\n <div\n class=\"skeleton\"\n aria-hidden=\"true\"\n [class.legend-bottom]=\"legend() === 'bottom'\">\n <ds-skeleton\n circle\n width=\"var(--_donut-chart-size)\"\n height=\"var(--_donut-chart-size)\" />\n\n @if (legend() !== 'none') {\n <div class=\"skeleton-legend\">\n @for (placeholder of skeletonRows(); track $index) {\n <ds-skeleton height=\"var(--_donut-chart-legend-row-height)\" />\n }\n </div>\n }\n </div>\n } @else if (isEmpty()) {\n <div class=\"empty\">\n <div\n class=\"empty-ring\"\n aria-hidden=\"true\">\n </div>\n\n <p class=\"empty-text\">\n {{ emptyTextResolved() }}\n </p>\n </div>\n } @else {\n <div\n class=\"chart\"\n [attr.role]=\"interactive() ? 'group' : 'img'\"\n [class.legend-bottom]=\"legend() === 'bottom'\"\n [attr.aria-label]=\"accessibleName()\"\n [dsChartTooltip]=\"tooltipContext()\"\n [dsChartTooltipOrigin]=\"activeMark.origin()\"\n [dsChartTooltipTemplate]=\"tooltipTemplate() ?? null\">\n <div\n class=\"ring\"\n [class.ring-outline]=\"total() === 0\">\n <svg\n class=\"ring-svg\"\n animate.enter=\"mark-enter\"\n [class.dims-others]=\"dimOthers()\"\n [attr.aria-hidden]=\"ringCarriesTheRoute() ? null : true\"\n [attr.viewBox]=\"viewBox\">\n @for (entry of slices(); track entry.slice.id; let index = $index) {\n <path\n class=\"slice\"\n [class.interactive]=\"interactive()\"\n [class.focusable]=\"ringCarriesTheRoute()\"\n [attr.d]=\"entry.path\"\n [style.fill]=\"entry.color\"\n [attr.role]=\"ringCarriesTheRoute() ? 'button' : null\"\n [attr.tabindex]=\"\n ringCarriesTheRoute()\n ? index === tabStopIndex()\n ? 0\n : -1\n : null\n \"\n [attr.data-mark-index]=\"index\"\n [attr.aria-label]=\"\n ringCarriesTheRoute() ? entryLabel(entry) : null\n \"\n (pointerenter)=\"activeMark.enter(index, $event)\"\n (pointerleave)=\"activeMark.leave()\"\n (focus)=\"onMarkFocus(index, $event)\"\n (blur)=\"activeMark.leave()\"\n (keydown)=\"onMarkNavigation($event, index, '.ring-svg')\"\n (click)=\"sliceClicked.emit(entry.slice)\"\n (keydown.enter)=\"onSliceKey(entry.slice, $event)\"\n (keydown.space)=\"onSliceKey(entry.slice, $event)\">\n </path>\n }\n </svg>\n\n <div class=\"center\">\n <span class=\"center-value\">\n {{ resolvedCenterValue() }}\n </span>\n\n @if (centerLabel()) {\n <span class=\"center-label\">\n {{ centerLabel() }}\n </span>\n }\n </div>\n </div>\n\n @if (legend() !== 'none') {\n <ul class=\"legend\">\n @for (entry of slices(); track entry.slice.id; let index = $index) {\n <li\n class=\"legend-item\"\n [class.interactive]=\"interactive()\"\n [attr.role]=\"interactive() ? 'button' : null\"\n [attr.tabindex]=\"\n interactive() ? (index === tabStopIndex() ? 0 : -1) : null\n \"\n [attr.data-mark-index]=\"index\"\n [attr.aria-label]=\"interactive() ? entryLabel(entry) : null\"\n (pointerenter)=\"activeMark.enter(index, $event)\"\n (pointerleave)=\"activeMark.leave()\"\n (focus)=\"onMarkFocus(index, $event)\"\n (blur)=\"activeMark.leave()\"\n (keydown)=\"onMarkNavigation($event, index, '.legend')\"\n (click)=\"sliceClicked.emit(entry.slice)\"\n (keydown.enter)=\"onSliceKey(entry.slice, $event)\"\n (keydown.space)=\"onSliceKey(entry.slice, $event)\">\n <span\n class=\"swatch\"\n animate.enter=\"mark-enter\"\n [style.background]=\"entry.color\">\n </span>\n\n <span class=\"legend-label\">\n {{ entry.slice.label }}\n </span>\n\n <span class=\"legend-value\">\n {{ entry.formattedValue }}\n </span>\n\n <span class=\"legend-percent\">\n {{ entry.formattedPercent }}\n </span>\n </li>\n }\n </ul>\n }\n </div>\n\n @if (dataTableResolved() !== 'none') {\n <details\n class=\"data-table\"\n [open]=\"dataTableResolved() === 'visible'\">\n <summary>\n Data table\n </summary>\n\n <table>\n <caption>\n {{\n caption() ?? 'Chart data'\n }}\n </caption>\n\n <thead>\n <tr>\n <th scope=\"col\">\n Label\n </th>\n\n <th scope=\"col\">\n Value\n </th>\n\n <th scope=\"col\">\n Share\n </th>\n </tr>\n </thead>\n\n <tbody>\n @for (entry of slices(); track entry.slice.id) {\n <tr>\n <td>\n {{ entry.slice.label }}\n </td>\n\n <td>\n {{ entry.formattedValue }}\n </td>\n\n <td>\n {{ entry.formattedPercent }}\n </td>\n </tr>\n }\n </tbody>\n </table>\n </details>\n }\n }\n</figure>\n", styles: ["@charset \"UTF-8\";:where(:focus-visible){outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:var(--focus-ring-offset);animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard)}@keyframes ds-focus-ring-in{0%{outline-color:transparent}}:root[data-focus=ring]{--ds-field-focus-shadow: var(--focus-ring);--ds-field-focus-shadow-error: var(--focus-ring-error)}:root[data-focus=edge]{--focus-ring-offset: 0px;--ds-field-focus-shadow: 0 0 0 var(--border-width-default) var(--primary);--ds-field-focus-shadow-error: 0 0 0 var(--border-width-default) var(--error)}[data-focus=inset]{--focus-ring-offset: calc(-1 * var(--focus-ring-width));--ds-field-focus-shadow: var(--focus-ring-inset);--ds-field-focus-shadow-error: var(--focus-ring-inset-error)}@media(forced-colors:active){:where(:focus-visible){outline:var(--focus-ring-width) solid CanvasText;outline-offset:var(--focus-ring-offset)}}@keyframes ds-chart-mark-grow-y{0%{opacity:0;transform:scaleY(0)}}@keyframes ds-chart-mark-grow-x{0%{opacity:0;transform:scaleX(0)}}@keyframes ds-chart-mark-fade-in{0%{opacity:0}}@keyframes ds-chart-mark-exit{to{opacity:0}}.ring-svg.mark-enter{animation:ds-chart-mark-fade-in var(--ds-motion-chart-mark-enter-duration) var(--ds-motion-chart-mark-enter-easing) calc(var(--ds-motion-chart-mark-exit-duration) + var(--_chart-mark-stagger, 0ms)) both}.ring-svg.mark-leave{animation:ds-chart-mark-exit var(--ds-motion-chart-mark-exit-duration) var(--ds-motion-chart-mark-exit-easing) both}.swatch.mark-enter{animation:ds-chart-mark-fade-in var(--ds-motion-chart-mark-enter-duration) var(--ds-motion-chart-mark-enter-easing) calc(var(--ds-motion-chart-mark-exit-duration) + var(--_chart-mark-stagger, 0ms)) both}.swatch.mark-leave{animation:ds-chart-mark-exit var(--ds-motion-chart-mark-exit-duration) var(--ds-motion-chart-mark-exit-easing) both}:host{display:block;padding:var(--ds-chart-frame-padding);background:var(--ds-chart-frame-bg-color);border:var(--ds-chart-frame-border-width) solid var(--ds-chart-frame-border-color);border-radius:var(--ds-chart-frame-radius)}.data-table{--_chart-data-table-marker: var(--space-1);margin-block-start:var(--space-4);color:var(--text-secondary);font-size:var(--font-size-s)}.data-table>summary{display:inline-flex;align-items:center;gap:var(--space-1);padding-block:var(--space-1);color:var(--text-tertiary);font-size:var(--font-size-xs);cursor:pointer;list-style:none}.data-table>summary::-webkit-details-marker{display:none}.data-table>summary:before{content:\"\";inline-size:0;block-size:0;border-block-start:var(--_chart-data-table-marker) solid transparent;border-block-end:var(--_chart-data-table-marker) solid transparent;border-inline-start:calc(var(--_chart-data-table-marker) * 1.25) solid currentcolor;transition:transform var(--duration-fast) var(--ease-standard)}@media(prefers-reduced-motion:reduce){.data-table>summary:before{transition:none}}.data-table[open]>summary:before{transform:rotate(90deg)}.data-table>summary{border-radius:var(--radius-sm)}.data-table caption{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}.data-table table{inline-size:100%;margin-block-start:var(--space-2);border-collapse:collapse;font-variant-numeric:tabular-nums}.data-table th,.data-table td{padding-block:var(--space-2);border-block-end:var(--border-width-default) solid var(--ds-chart-grid-line-color);text-align:end}.data-table thead th{color:var(--text-tertiary);font-size:var(--font-size-xs);font-weight:600}.data-table th:first-child,.data-table td:first-child{text-align:start}.data-table td+td{padding-inline-start:var(--space-3)}.donut-chart{--_donut-chart-size: var(--ds-donut-chart-size, 180px);--_donut-chart-gap: var(--ds-donut-chart-gap, var(--space-5));--_donut-chart-legend-row-gap: var(--ds-donut-chart-legend-row-gap, var(--space-2));--_donut-chart-legend-row-height: var(--ds-donut-chart-legend-row-height, 16px);--_donut-chart-swatch-size: var(--ds-donut-chart-swatch-size, 10px);--_donut-chart-focus-color: var(--ds-donut-chart-focus-color, var(--focus-ring-color));--_donut-chart-focus-width: var(--ds-donut-chart-focus-width, var(--focus-ring-width));--_donut-chart-outline-width: var(--ds-donut-chart-outline-width, calc(var(--border-width-strong) + var(--border-width-default)));margin:0}figcaption{margin-block-end:var(--space-3);color:var(--text-primary);font-weight:600}.empty{display:flex;flex-direction:column;gap:var(--space-3);align-items:center}.empty-ring,.ring-outline{position:relative;inline-size:var(--_donut-chart-size);block-size:var(--_donut-chart-size);border:var(--_donut-chart-outline-width) solid var(--border-divider);border-radius:var(--radius-pill)}.empty-ring:before,.ring-outline:before{content:\"\";position:absolute;inset:calc((100% - var(--_donut-chart-hole-fraction) * 100%) / 2);border:calc(var(--_donut-chart-hole-fraction) * var(--_donut-chart-outline-width)) solid var(--border-divider);border-radius:var(--radius-pill)}.empty-text{margin:0;color:var(--text-secondary)}.chart,.skeleton{display:flex;flex-wrap:wrap;gap:var(--_donut-chart-gap);align-items:center;justify-content:center}.chart.legend-bottom,.skeleton.legend-bottom{flex-direction:column}.ring{position:relative;flex:none;inline-size:var(--_donut-chart-size);block-size:var(--_donut-chart-size)}.ring-svg{display:block;inline-size:100%;block-size:100%}@media not (forced-colors:active){.slice.focusable:focus-visible{outline:none}}.slice.focusable:focus-visible{stroke:var(--ds-chart-focus-ring-color);stroke-width:var(--focus-ring-width);paint-order:stroke;filter:drop-shadow(0 0 1px var(--ds-chart-focus-halo-color)) drop-shadow(0 0 1px var(--ds-chart-focus-halo-color))}.center{position:absolute;inset:0;display:grid;place-content:center;justify-items:center;inline-size:max(56%,var(--_donut-chart-hole-fraction) * 70%);margin-inline:auto;overflow-wrap:anywhere;text-align:center;pointer-events:none}.center-value,.center-label{text-shadow:0 0 var(--space-1) var(--ds-chart-frame-bg-color),0 0 var(--space-0-5) var(--ds-chart-frame-bg-color)}.center-value{color:var(--text-primary);font-size:var(--font-size-h4);font-weight:700}.center-label{color:var(--text-tertiary);font-size:var(--font-size-xs)}.legend,.skeleton-legend{display:grid;row-gap:var(--_donut-chart-legend-row-gap);min-inline-size:0}.legend{margin:0;padding:0;list-style:none}.skeleton-legend{flex:1 1 auto}.legend-item{display:grid;grid-template-columns:auto 1fr auto auto;column-gap:var(--space-2);align-items:baseline}.legend-item.interactive{cursor:pointer}.swatch{align-self:center;inline-size:var(--_donut-chart-swatch-size);block-size:var(--_donut-chart-swatch-size);border-radius:var(--radius-pill)}.legend-label{color:var(--text-secondary)}.legend-value{font-weight:700}.legend-percent{color:var(--text-tertiary);font-size:var(--font-size-xs)}.legend-bottom .legend{display:flex;flex-wrap:wrap;gap:var(--_donut-chart-legend-row-gap) var(--space-4)}.legend-bottom .legend-item{display:flex;column-gap:var(--space-2)}.empty-text.is-error{color:var(--error)}.ring-svg .slice{transition:opacity var(--ds-motion-chart-state-duration) var(--ds-motion-chart-state-easing),fill var(--ds-motion-chart-mark-duration) var(--ds-motion-chart-mark-easing)}.ring-svg .slice.is-dimmed{opacity:var(--ds-chart-dim-opacity)}.ring-svg.dims-others:has(.slice.interactive:hover) .slice.interactive:not(:hover),.ring-svg.dims-others:has(.slice.interactive:focus-visible) .slice.interactive:not(:focus-visible){opacity:var(--ds-chart-dim-opacity)}.ring-svg .slice.interactive{cursor:pointer}@media(forced-colors:active){.axis-line,.grid-line{stroke:CanvasText}.axis-label,.category-label{fill:CanvasText}:focus-visible{stroke:Highlight;filter:none}}\n"], dependencies: [{ kind: "component", type: SkeletonComponent, selector: "ds-skeleton", inputs: ["width", "height", "circle", "inline"] }, { kind: "directive", type: ChartTooltipDirective, selector: "[dsChartTooltip]", inputs: ["dsChartTooltip", "dsChartTooltipOrigin", "dsChartTooltipTemplate"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
370
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: DonutChartComponent, isStandalone: true, selector: "ds-donut-chart", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: true, transformFunction: null }, centerValue: { classPropertyName: "centerValue", publicName: "centerValue", isSignal: true, isRequired: false, transformFunction: null }, centerLabel: { classPropertyName: "centerLabel", publicName: "centerLabel", isSignal: true, isRequired: false, transformFunction: null }, legend: { classPropertyName: "legend", publicName: "legend", isSignal: true, isRequired: false, transformFunction: null }, maxSlices: { classPropertyName: "maxSlices", publicName: "maxSlices", isSignal: true, isRequired: false, transformFunction: null }, otherLabel: { classPropertyName: "otherLabel", publicName: "otherLabel", isSignal: true, isRequired: false, transformFunction: null }, thickness: { classPropertyName: "thickness", publicName: "thickness", isSignal: true, isRequired: false, transformFunction: null }, frame: { classPropertyName: "frame", publicName: "frame", isSignal: true, isRequired: false, transformFunction: null }, tooltipLingerMs: { classPropertyName: "tooltipLingerMs", publicName: "tooltipLingerMs", isSignal: true, isRequired: false, transformFunction: null }, caption: { classPropertyName: "caption", publicName: "caption", isSignal: true, isRequired: false, transformFunction: null }, summary: { classPropertyName: "summary", publicName: "summary", isSignal: true, isRequired: false, transformFunction: null }, dataTable: { classPropertyName: "dataTable", publicName: "dataTable", isSignal: true, isRequired: false, transformFunction: null }, partOfWhole: { classPropertyName: "partOfWhole", publicName: "partOfWhole", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, emptyText: { classPropertyName: "emptyText", publicName: "emptyText", isSignal: true, isRequired: false, transformFunction: null }, error: { classPropertyName: "error", publicName: "error", isSignal: true, isRequired: false, transformFunction: null }, errorText: { classPropertyName: "errorText", publicName: "errorText", isSignal: true, isRequired: false, transformFunction: null }, valueFormat: { classPropertyName: "valueFormat", publicName: "valueFormat", isSignal: true, isRequired: false, transformFunction: null }, interactive: { classPropertyName: "interactive", publicName: "interactive", isSignal: true, isRequired: false, transformFunction: null }, pinOnClick: { classPropertyName: "pinOnClick", publicName: "pinOnClick", isSignal: true, isRequired: false, transformFunction: null }, dimOthers: { classPropertyName: "dimOthers", publicName: "dimOthers", isSignal: true, isRequired: false, transformFunction: null }, staggerMs: { classPropertyName: "staggerMs", publicName: "staggerMs", isSignal: true, isRequired: false, transformFunction: null }, tooltip: { classPropertyName: "tooltip", publicName: "tooltip", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { sliceClicked: "sliceClicked" }, host: { properties: { "class.framed": "frameResolved() === 'auto'" } }, queries: [{ propertyName: "tooltipTemplate", first: true, predicate: ["dsChartTooltip"], descendants: true, isSignal: true }], ngImport: i0, template: "<figure\n class=\"donut-chart\"\n [style.--_donut-chart-hole-fraction]=\"hole()\">\n @if (activeMark.pinned()) {\n <button\n class=\"pin-reset\"\n type=\"button\"\n (click)=\"activeMark.release()\">\n Unpin\n </button>\n }\n\n @if (caption()) {\n <figcaption>\n {{ caption() }}\n </figcaption>\n }\n\n @if (error()) {\n <div class=\"empty\">\n <div\n class=\"empty-ring\"\n aria-hidden=\"true\">\n </div>\n\n <p\n class=\"empty-text is-error\"\n role=\"status\">\n {{ errorTextResolved() }}\n </p>\n </div>\n } @else if (loading()) {\n <div\n class=\"skeleton\"\n aria-hidden=\"true\"\n [class.legend-bottom]=\"legend() === 'bottom'\">\n <ds-skeleton\n circle\n width=\"var(--_donut-chart-size)\"\n height=\"var(--_donut-chart-size)\" />\n\n @if (legend() !== 'none') {\n <div class=\"skeleton-legend\">\n @for (placeholder of skeletonRows(); track $index) {\n <ds-skeleton height=\"var(--_donut-chart-legend-row-height)\" />\n }\n </div>\n }\n </div>\n } @else if (isEmpty()) {\n <div class=\"empty\">\n <div\n class=\"empty-ring\"\n aria-hidden=\"true\">\n </div>\n\n <p class=\"empty-text\">\n {{ emptyTextResolved() }}\n </p>\n </div>\n } @else {\n <div\n class=\"chart\"\n [attr.role]=\"interactive() ? 'group' : 'img'\"\n [class.legend-bottom]=\"legend() === 'bottom'\"\n [attr.aria-label]=\"accessibleName()\"\n [dsChartTooltip]=\"tooltipContext()\"\n [dsChartTooltipPreferBelow]=\"activeMark.pinned()\"\n [dsChartTooltipOrigin]=\"activeMark.origin()\"\n [dsChartTooltipTemplate]=\"tooltipTemplate() ?? null\">\n <div\n class=\"ring\"\n [class.ring-outline]=\"total() === 0\">\n <svg\n class=\"ring-svg\"\n animate.enter=\"mark-enter\"\n [class.dims-others]=\"dimOthers()\"\n [attr.aria-hidden]=\"ringCarriesTheRoute() ? null : true\"\n [attr.viewBox]=\"viewBox\">\n @for (entry of slices(); track entry.slice.id; let index = $index) {\n <path\n class=\"slice\"\n [class.interactive]=\"interactive()\"\n [class.is-pinned]=\"\n activeMark.pinned() && activeMark.index() === index\n \"\n [class.is-dimmed]=\"isDimmed(index)\"\n [class.focusable]=\"ringCarriesTheRoute()\"\n [attr.d]=\"entry.path\"\n [style.fill]=\"entry.color\"\n [attr.role]=\"ringCarriesTheRoute() ? 'button' : null\"\n [attr.tabindex]=\"\n ringCarriesTheRoute()\n ? index === tabStopIndex()\n ? 0\n : -1\n : null\n \"\n [attr.data-mark-index]=\"index\"\n [attr.aria-label]=\"\n ringCarriesTheRoute() ? entryLabel(entry) : null\n \"\n (pointerenter)=\"activeMark.enter(index, $event)\"\n (pointerleave)=\"activeMark.leave()\"\n (focus)=\"onMarkFocus(index, $event)\"\n (blur)=\"activeMark.leave()\"\n (keydown)=\"onMarkNavigation($event, index, '.ring-svg')\"\n (click)=\"onMarkClick(entry.slice, index, $event)\"\n (keydown.enter)=\"onSliceKey(entry.slice, $event)\"\n (keydown.space)=\"onSliceKey(entry.slice, $event)\">\n </path>\n\n @if (activeMark.pinned() && activeMark.index() === index) {\n <foreignObject\n class=\"pin-marker\"\n width=\"14\"\n height=\"14\"\n [attr.x]=\"entry.center.x - 7\"\n [attr.y]=\"entry.center.y - 7\">\n <ds-icon\n name=\"pin\"\n [size]=\"14\" />\n </foreignObject>\n }\n }\n </svg>\n\n <div class=\"center\">\n <span class=\"center-value\">\n {{ resolvedCenterValue() }}\n </span>\n\n @if (centerLabel()) {\n <span class=\"center-label\">\n {{ centerLabel() }}\n </span>\n }\n </div>\n </div>\n\n @if (legend() !== 'none') {\n <ul class=\"legend\">\n @for (entry of slices(); track entry.slice.id; let index = $index) {\n <li\n class=\"legend-item\"\n [class.interactive]=\"interactive()\"\n [attr.role]=\"interactive() ? 'button' : null\"\n [attr.tabindex]=\"\n interactive() ? (index === tabStopIndex() ? 0 : -1) : null\n \"\n [attr.data-mark-index]=\"index\"\n [attr.aria-label]=\"interactive() ? entryLabel(entry) : null\"\n (pointerenter)=\"onLegendEnter(index, $event)\"\n (pointerleave)=\"activeMark.leave()\"\n (focus)=\"onLegendFocus(index, $event)\"\n (blur)=\"activeMark.leave()\"\n (keydown)=\"onMarkNavigation($event, index, '.legend')\"\n (click)=\"onLegendClick(entry.slice, index, $event)\"\n (keydown.enter)=\"onSliceKey(entry.slice, $event)\"\n (keydown.space)=\"onSliceKey(entry.slice, $event)\">\n <span\n class=\"swatch\"\n animate.enter=\"mark-enter\"\n [style.background]=\"entry.color\">\n </span>\n\n <span class=\"legend-label\">\n {{ entry.slice.label }}\n </span>\n\n <span class=\"legend-value\">\n {{ entry.formattedValue }}\n </span>\n\n @if (partOfWhole()) {\n <span class=\"legend-percent\">\n {{ entry.formattedPercent }}\n </span>\n }\n </li>\n }\n </ul>\n }\n </div>\n\n @if (dataTableResolved() !== 'none') {\n <details\n class=\"data-table\"\n [open]=\"dataTableResolved() === 'visible'\">\n <summary>\n Data table\n </summary>\n\n <table>\n <caption>\n {{\n caption() ?? 'Chart data'\n }}\n </caption>\n\n <thead>\n <tr>\n <th scope=\"col\">\n Label\n </th>\n\n <th scope=\"col\">\n Value\n </th>\n\n @if (partOfWhole()) {\n <th scope=\"col\">\n Share of total\n </th>\n }\n </tr>\n </thead>\n\n <tbody>\n @for (entry of slices(); track entry.slice.id) {\n <tr>\n <td>\n {{ entry.slice.label }}\n </td>\n\n <td>\n {{ entry.formattedValue }}\n </td>\n\n @if (partOfWhole()) {\n <td>\n {{ entry.formattedPercent }}\n </td>\n }\n </tr>\n }\n </tbody>\n </table>\n </details>\n }\n }\n</figure>\n", styles: ["@charset \"UTF-8\";:where(:focus-visible){outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:var(--focus-ring-offset);animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard)}@keyframes ds-focus-ring-in{0%{outline-color:transparent}}:root[data-focus=ring]{--ds-field-focus-shadow: var(--focus-ring);--ds-field-focus-shadow-error: var(--focus-ring-error)}:root[data-focus=edge]{--focus-ring-offset: 0px;--ds-field-focus-shadow: 0 0 0 var(--border-width-default) var(--primary);--ds-field-focus-shadow-error: 0 0 0 var(--border-width-default) var(--error)}[data-focus=inset]{--focus-ring-offset: calc(-1 * var(--focus-ring-width));--ds-field-focus-shadow: var(--focus-ring-inset);--ds-field-focus-shadow-error: var(--focus-ring-inset-error)}@media(forced-colors:active){:where(:focus-visible){outline:var(--focus-ring-width) solid CanvasText;outline-offset:var(--focus-ring-offset)}}@keyframes ds-chart-mark-grow-y{0%{opacity:0;transform:scaleY(0)}}@keyframes ds-chart-mark-grow-x{0%{opacity:0;transform:scaleX(0)}}@keyframes ds-chart-mark-fade-in{0%{opacity:0}}@keyframes ds-chart-mark-exit{to{opacity:0}}.ring-svg.mark-enter{animation:ds-chart-mark-fade-in var(--ds-motion-chart-mark-enter-duration) var(--ds-motion-chart-mark-enter-easing) calc(var(--ds-motion-chart-mark-exit-duration) + var(--_chart-mark-stagger, 0ms)) both}.ring-svg.mark-leave{animation:ds-chart-mark-exit var(--ds-motion-chart-mark-exit-duration) var(--ds-motion-chart-mark-exit-easing) both}.swatch.mark-enter{animation:ds-chart-mark-fade-in var(--ds-motion-chart-mark-enter-duration) var(--ds-motion-chart-mark-enter-easing) calc(var(--ds-motion-chart-mark-exit-duration) + var(--_chart-mark-stagger, 0ms)) both}.swatch.mark-leave{animation:ds-chart-mark-exit var(--ds-motion-chart-mark-exit-duration) var(--ds-motion-chart-mark-exit-easing) both}:host{display:block;-webkit-user-select:none;user-select:none}:host(.framed){padding:var(--ds-chart-frame-padding);background:var(--ds-chart-frame-bg-color);border:var(--ds-chart-frame-border-width) solid var(--ds-chart-frame-border-color);border-radius:var(--ds-chart-frame-radius)}.data-table,.stage-table,figcaption{-webkit-user-select:text;user-select:text}@media not (forced-colors:active){.slice:focus{outline:none}}.data-table{--_chart-data-table-marker: var(--space-1);margin-block-start:var(--space-4);color:var(--text-secondary);font-size:var(--font-size-s)}.data-table>summary{display:inline-flex;align-items:center;gap:var(--space-1);padding-block:var(--space-1);color:var(--text-tertiary);font-size:var(--font-size-xs);cursor:pointer;list-style:none}.data-table>summary::-webkit-details-marker{display:none}.data-table>summary:before{content:\"\";inline-size:0;block-size:0;border-block-start:var(--_chart-data-table-marker) solid transparent;border-block-end:var(--_chart-data-table-marker) solid transparent;border-inline-start:calc(var(--_chart-data-table-marker) * 1.25) solid currentcolor;transition:transform var(--duration-fast) var(--ease-standard)}@media(prefers-reduced-motion:reduce){.data-table>summary:before{transition:none}}.data-table[open]>summary:before{transform:rotate(90deg)}.data-table>summary{border-radius:var(--radius-sm)}.data-table caption{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}.data-table table{inline-size:100%;margin-block-start:var(--space-2);border-collapse:collapse;font-variant-numeric:tabular-nums}.data-table th,.data-table td{padding-block:var(--space-2);border-block-end:var(--border-width-default) solid var(--ds-chart-grid-line-color);text-align:end}.data-table thead th{color:var(--text-tertiary);font-size:var(--font-size-xs);font-weight:600}.data-table th:first-child,.data-table td:first-child{text-align:start}.data-table td+td{padding-inline-start:var(--space-3)}.donut-chart{--_donut-chart-size: var(--ds-donut-chart-size, 180px);--_donut-chart-gap: var(--ds-donut-chart-gap, var(--space-5));--_donut-chart-legend-row-gap: var(--ds-donut-chart-legend-row-gap, var(--space-2));--_donut-chart-legend-row-height: var(--ds-donut-chart-legend-row-height, 16px);--_donut-chart-swatch-size: var(--ds-donut-chart-swatch-size, 10px);--_donut-chart-focus-color: var(--ds-donut-chart-focus-color, var(--focus-ring-color));--_donut-chart-focus-width: var(--ds-donut-chart-focus-width, var(--focus-ring-width));--_donut-chart-outline-width: var(--ds-donut-chart-outline-width, calc(var(--border-width-strong) + var(--border-width-default)));margin:0}figcaption{margin-block-end:var(--space-3);color:var(--text-primary);font-weight:600}.empty{display:flex;flex-direction:column;gap:var(--space-3);align-items:center}.empty-ring,.ring-outline{position:relative;inline-size:var(--_donut-chart-size);block-size:var(--_donut-chart-size);border:var(--_donut-chart-outline-width) solid var(--border-divider);border-radius:var(--radius-pill)}.empty-ring:before,.ring-outline:before{content:\"\";position:absolute;inset:calc((100% - var(--_donut-chart-hole-fraction) * 100%) / 2);border:calc(var(--_donut-chart-hole-fraction) * var(--_donut-chart-outline-width)) solid var(--border-divider);border-radius:var(--radius-pill)}.empty-text{margin:0;color:var(--text-secondary)}.chart,.skeleton{display:flex;flex-wrap:wrap;gap:var(--_donut-chart-gap);align-items:center;justify-content:center}.chart.legend-bottom,.skeleton.legend-bottom{flex-direction:column}.ring{position:relative;flex:none;inline-size:var(--_donut-chart-size);block-size:var(--_donut-chart-size)}.ring-svg{display:block;inline-size:100%;block-size:100%}@media not (forced-colors:active){.slice.focusable:focus-visible{outline:none}}.slice.focusable:focus-visible{stroke:var(--ds-chart-focus-ring-color);stroke-width:var(--focus-ring-width);paint-order:stroke;filter:drop-shadow(0 0 var(--focus-ring-width) var(--ds-chart-focus-halo-color))}.center{position:absolute;inset:0;display:grid;place-content:center;justify-items:center;inline-size:max(56%,var(--_donut-chart-hole-fraction) * 70%);margin-inline:auto;overflow-wrap:anywhere;text-align:center;pointer-events:none}.center-value,.center-label{text-shadow:0 0 var(--space-1) var(--ds-chart-frame-bg-color),0 0 var(--space-0-5) var(--ds-chart-frame-bg-color)}.center-value{color:var(--text-primary);font-size:var(--font-size-h4);font-weight:700}.center-label{color:var(--text-tertiary);font-size:var(--font-size-xs)}.legend,.skeleton-legend{display:grid;row-gap:var(--_donut-chart-legend-row-gap);min-inline-size:0}.legend{margin:0;padding:0;list-style:none}.skeleton-legend{flex:1 1 auto}.legend-item{display:grid;grid-template-columns:auto 1fr auto auto;column-gap:var(--space-2);align-items:baseline}.legend-item.interactive{cursor:pointer}.swatch{align-self:center;inline-size:var(--_donut-chart-swatch-size);block-size:var(--_donut-chart-swatch-size);border-radius:var(--radius-pill)}.legend-label{color:var(--text-secondary)}.legend-value{font-weight:700}.legend-percent{color:var(--text-tertiary);font-size:var(--font-size-xs)}.legend-bottom .legend{display:flex;flex-wrap:wrap;gap:var(--_donut-chart-legend-row-gap) var(--space-4)}.legend-bottom .legend-item{display:flex;column-gap:var(--space-2)}.empty-text.is-error{color:var(--error)}.ring-svg .slice{transition:opacity var(--ds-motion-chart-state-duration) var(--ds-motion-chart-state-easing),fill var(--ds-motion-chart-mark-duration) var(--ds-motion-chart-mark-easing)}.ring-svg .slice.is-dimmed{opacity:var(--ds-chart-dim-opacity)}.ring-svg.dims-others:not(:has(.slice.is-pinned)):has(.slice.interactive:hover) .slice.interactive:not(:hover),.ring-svg.dims-others:not(:has(.slice.is-pinned)):has(.slice.interactive:focus-visible) .slice.interactive:not(:focus-visible),.ring-svg.dims-others:has(.slice.is-pinned) .slice:not(.is-pinned){opacity:var(--ds-chart-dim-opacity)}.ring-svg .slice.interactive{cursor:pointer}@media(forced-colors:active){.axis-line,.grid-line{stroke:CanvasText}.axis-label,.category-label{fill:CanvasText}:focus-visible{stroke:Highlight;filter:none}}:host{position:relative}.pin-reset{position:absolute;inset-block-start:var(--space-2);inset-inline:0;z-index:1;justify-self:center;margin-inline:auto;display:inline-flex;align-items:center;gap:var(--space-1);min-block-size:var(--space-12);inline-size:fit-content;padding:var(--space-1) var(--space-3);border:var(--border-width-default) solid var(--border-divider);border-radius:var(--radius-pill);background:var(--surface-default);color:var(--text-secondary);font-size:var(--font-size-xs);line-height:1;box-shadow:var(--shadow-1);cursor:pointer}.pin-reset:hover{color:var(--text-primary);border-color:var(--border-strong)}.pin-marker{display:grid;place-items:center;inline-size:var(--ds-chart-pin-size, 22px);block-size:var(--ds-chart-pin-size, 22px);border:var(--border-width-default) solid var(--border-divider);border-radius:var(--radius-pill);background:var(--surface-default);color:var(--text-primary);box-shadow:var(--shadow-1);pointer-events:none}\n"], dependencies: [{ kind: "component", type: SkeletonComponent, selector: "ds-skeleton", inputs: ["width", "height", "circle", "inline"] }, { kind: "directive", type: ChartTooltipDirective, selector: "[dsChartTooltip]", inputs: ["dsChartTooltip", "dsChartTooltipOrigin", "dsChartTooltipTemplate", "dsChartTooltipExtraGap", "dsChartTooltipPreferBelow"] }, { kind: "component", type: IconComponent, selector: "ds-icon", inputs: ["name", "size", "stroke", "ariaLabel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
300
371
  }
301
372
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: DonutChartComponent, decorators: [{
302
373
  type: Component,
303
- args: [{ selector: 'ds-donut-chart', standalone: true, imports: [SkeletonComponent, ChartTooltipDirective], encapsulation: ViewEncapsulation.Emulated, changeDetection: ChangeDetectionStrategy.OnPush, template: "<figure\n class=\"donut-chart\"\n [style.--_donut-chart-hole-fraction]=\"hole()\">\n @if (caption()) {\n <figcaption>\n {{ caption() }}\n </figcaption>\n }\n\n @if (error()) {\n <div class=\"empty\">\n <div\n class=\"empty-ring\"\n aria-hidden=\"true\">\n </div>\n\n <p\n class=\"empty-text is-error\"\n role=\"status\">\n {{ errorTextResolved() }}\n </p>\n </div>\n } @else if (loading()) {\n <div\n class=\"skeleton\"\n aria-hidden=\"true\"\n [class.legend-bottom]=\"legend() === 'bottom'\">\n <ds-skeleton\n circle\n width=\"var(--_donut-chart-size)\"\n height=\"var(--_donut-chart-size)\" />\n\n @if (legend() !== 'none') {\n <div class=\"skeleton-legend\">\n @for (placeholder of skeletonRows(); track $index) {\n <ds-skeleton height=\"var(--_donut-chart-legend-row-height)\" />\n }\n </div>\n }\n </div>\n } @else if (isEmpty()) {\n <div class=\"empty\">\n <div\n class=\"empty-ring\"\n aria-hidden=\"true\">\n </div>\n\n <p class=\"empty-text\">\n {{ emptyTextResolved() }}\n </p>\n </div>\n } @else {\n <div\n class=\"chart\"\n [attr.role]=\"interactive() ? 'group' : 'img'\"\n [class.legend-bottom]=\"legend() === 'bottom'\"\n [attr.aria-label]=\"accessibleName()\"\n [dsChartTooltip]=\"tooltipContext()\"\n [dsChartTooltipOrigin]=\"activeMark.origin()\"\n [dsChartTooltipTemplate]=\"tooltipTemplate() ?? null\">\n <div\n class=\"ring\"\n [class.ring-outline]=\"total() === 0\">\n <svg\n class=\"ring-svg\"\n animate.enter=\"mark-enter\"\n [class.dims-others]=\"dimOthers()\"\n [attr.aria-hidden]=\"ringCarriesTheRoute() ? null : true\"\n [attr.viewBox]=\"viewBox\">\n @for (entry of slices(); track entry.slice.id; let index = $index) {\n <path\n class=\"slice\"\n [class.interactive]=\"interactive()\"\n [class.focusable]=\"ringCarriesTheRoute()\"\n [attr.d]=\"entry.path\"\n [style.fill]=\"entry.color\"\n [attr.role]=\"ringCarriesTheRoute() ? 'button' : null\"\n [attr.tabindex]=\"\n ringCarriesTheRoute()\n ? index === tabStopIndex()\n ? 0\n : -1\n : null\n \"\n [attr.data-mark-index]=\"index\"\n [attr.aria-label]=\"\n ringCarriesTheRoute() ? entryLabel(entry) : null\n \"\n (pointerenter)=\"activeMark.enter(index, $event)\"\n (pointerleave)=\"activeMark.leave()\"\n (focus)=\"onMarkFocus(index, $event)\"\n (blur)=\"activeMark.leave()\"\n (keydown)=\"onMarkNavigation($event, index, '.ring-svg')\"\n (click)=\"sliceClicked.emit(entry.slice)\"\n (keydown.enter)=\"onSliceKey(entry.slice, $event)\"\n (keydown.space)=\"onSliceKey(entry.slice, $event)\">\n </path>\n }\n </svg>\n\n <div class=\"center\">\n <span class=\"center-value\">\n {{ resolvedCenterValue() }}\n </span>\n\n @if (centerLabel()) {\n <span class=\"center-label\">\n {{ centerLabel() }}\n </span>\n }\n </div>\n </div>\n\n @if (legend() !== 'none') {\n <ul class=\"legend\">\n @for (entry of slices(); track entry.slice.id; let index = $index) {\n <li\n class=\"legend-item\"\n [class.interactive]=\"interactive()\"\n [attr.role]=\"interactive() ? 'button' : null\"\n [attr.tabindex]=\"\n interactive() ? (index === tabStopIndex() ? 0 : -1) : null\n \"\n [attr.data-mark-index]=\"index\"\n [attr.aria-label]=\"interactive() ? entryLabel(entry) : null\"\n (pointerenter)=\"activeMark.enter(index, $event)\"\n (pointerleave)=\"activeMark.leave()\"\n (focus)=\"onMarkFocus(index, $event)\"\n (blur)=\"activeMark.leave()\"\n (keydown)=\"onMarkNavigation($event, index, '.legend')\"\n (click)=\"sliceClicked.emit(entry.slice)\"\n (keydown.enter)=\"onSliceKey(entry.slice, $event)\"\n (keydown.space)=\"onSliceKey(entry.slice, $event)\">\n <span\n class=\"swatch\"\n animate.enter=\"mark-enter\"\n [style.background]=\"entry.color\">\n </span>\n\n <span class=\"legend-label\">\n {{ entry.slice.label }}\n </span>\n\n <span class=\"legend-value\">\n {{ entry.formattedValue }}\n </span>\n\n <span class=\"legend-percent\">\n {{ entry.formattedPercent }}\n </span>\n </li>\n }\n </ul>\n }\n </div>\n\n @if (dataTableResolved() !== 'none') {\n <details\n class=\"data-table\"\n [open]=\"dataTableResolved() === 'visible'\">\n <summary>\n Data table\n </summary>\n\n <table>\n <caption>\n {{\n caption() ?? 'Chart data'\n }}\n </caption>\n\n <thead>\n <tr>\n <th scope=\"col\">\n Label\n </th>\n\n <th scope=\"col\">\n Value\n </th>\n\n <th scope=\"col\">\n Share\n </th>\n </tr>\n </thead>\n\n <tbody>\n @for (entry of slices(); track entry.slice.id) {\n <tr>\n <td>\n {{ entry.slice.label }}\n </td>\n\n <td>\n {{ entry.formattedValue }}\n </td>\n\n <td>\n {{ entry.formattedPercent }}\n </td>\n </tr>\n }\n </tbody>\n </table>\n </details>\n }\n }\n</figure>\n", styles: ["@charset \"UTF-8\";:where(:focus-visible){outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:var(--focus-ring-offset);animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard)}@keyframes ds-focus-ring-in{0%{outline-color:transparent}}:root[data-focus=ring]{--ds-field-focus-shadow: var(--focus-ring);--ds-field-focus-shadow-error: var(--focus-ring-error)}:root[data-focus=edge]{--focus-ring-offset: 0px;--ds-field-focus-shadow: 0 0 0 var(--border-width-default) var(--primary);--ds-field-focus-shadow-error: 0 0 0 var(--border-width-default) var(--error)}[data-focus=inset]{--focus-ring-offset: calc(-1 * var(--focus-ring-width));--ds-field-focus-shadow: var(--focus-ring-inset);--ds-field-focus-shadow-error: var(--focus-ring-inset-error)}@media(forced-colors:active){:where(:focus-visible){outline:var(--focus-ring-width) solid CanvasText;outline-offset:var(--focus-ring-offset)}}@keyframes ds-chart-mark-grow-y{0%{opacity:0;transform:scaleY(0)}}@keyframes ds-chart-mark-grow-x{0%{opacity:0;transform:scaleX(0)}}@keyframes ds-chart-mark-fade-in{0%{opacity:0}}@keyframes ds-chart-mark-exit{to{opacity:0}}.ring-svg.mark-enter{animation:ds-chart-mark-fade-in var(--ds-motion-chart-mark-enter-duration) var(--ds-motion-chart-mark-enter-easing) calc(var(--ds-motion-chart-mark-exit-duration) + var(--_chart-mark-stagger, 0ms)) both}.ring-svg.mark-leave{animation:ds-chart-mark-exit var(--ds-motion-chart-mark-exit-duration) var(--ds-motion-chart-mark-exit-easing) both}.swatch.mark-enter{animation:ds-chart-mark-fade-in var(--ds-motion-chart-mark-enter-duration) var(--ds-motion-chart-mark-enter-easing) calc(var(--ds-motion-chart-mark-exit-duration) + var(--_chart-mark-stagger, 0ms)) both}.swatch.mark-leave{animation:ds-chart-mark-exit var(--ds-motion-chart-mark-exit-duration) var(--ds-motion-chart-mark-exit-easing) both}:host{display:block;padding:var(--ds-chart-frame-padding);background:var(--ds-chart-frame-bg-color);border:var(--ds-chart-frame-border-width) solid var(--ds-chart-frame-border-color);border-radius:var(--ds-chart-frame-radius)}.data-table{--_chart-data-table-marker: var(--space-1);margin-block-start:var(--space-4);color:var(--text-secondary);font-size:var(--font-size-s)}.data-table>summary{display:inline-flex;align-items:center;gap:var(--space-1);padding-block:var(--space-1);color:var(--text-tertiary);font-size:var(--font-size-xs);cursor:pointer;list-style:none}.data-table>summary::-webkit-details-marker{display:none}.data-table>summary:before{content:\"\";inline-size:0;block-size:0;border-block-start:var(--_chart-data-table-marker) solid transparent;border-block-end:var(--_chart-data-table-marker) solid transparent;border-inline-start:calc(var(--_chart-data-table-marker) * 1.25) solid currentcolor;transition:transform var(--duration-fast) var(--ease-standard)}@media(prefers-reduced-motion:reduce){.data-table>summary:before{transition:none}}.data-table[open]>summary:before{transform:rotate(90deg)}.data-table>summary{border-radius:var(--radius-sm)}.data-table caption{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}.data-table table{inline-size:100%;margin-block-start:var(--space-2);border-collapse:collapse;font-variant-numeric:tabular-nums}.data-table th,.data-table td{padding-block:var(--space-2);border-block-end:var(--border-width-default) solid var(--ds-chart-grid-line-color);text-align:end}.data-table thead th{color:var(--text-tertiary);font-size:var(--font-size-xs);font-weight:600}.data-table th:first-child,.data-table td:first-child{text-align:start}.data-table td+td{padding-inline-start:var(--space-3)}.donut-chart{--_donut-chart-size: var(--ds-donut-chart-size, 180px);--_donut-chart-gap: var(--ds-donut-chart-gap, var(--space-5));--_donut-chart-legend-row-gap: var(--ds-donut-chart-legend-row-gap, var(--space-2));--_donut-chart-legend-row-height: var(--ds-donut-chart-legend-row-height, 16px);--_donut-chart-swatch-size: var(--ds-donut-chart-swatch-size, 10px);--_donut-chart-focus-color: var(--ds-donut-chart-focus-color, var(--focus-ring-color));--_donut-chart-focus-width: var(--ds-donut-chart-focus-width, var(--focus-ring-width));--_donut-chart-outline-width: var(--ds-donut-chart-outline-width, calc(var(--border-width-strong) + var(--border-width-default)));margin:0}figcaption{margin-block-end:var(--space-3);color:var(--text-primary);font-weight:600}.empty{display:flex;flex-direction:column;gap:var(--space-3);align-items:center}.empty-ring,.ring-outline{position:relative;inline-size:var(--_donut-chart-size);block-size:var(--_donut-chart-size);border:var(--_donut-chart-outline-width) solid var(--border-divider);border-radius:var(--radius-pill)}.empty-ring:before,.ring-outline:before{content:\"\";position:absolute;inset:calc((100% - var(--_donut-chart-hole-fraction) * 100%) / 2);border:calc(var(--_donut-chart-hole-fraction) * var(--_donut-chart-outline-width)) solid var(--border-divider);border-radius:var(--radius-pill)}.empty-text{margin:0;color:var(--text-secondary)}.chart,.skeleton{display:flex;flex-wrap:wrap;gap:var(--_donut-chart-gap);align-items:center;justify-content:center}.chart.legend-bottom,.skeleton.legend-bottom{flex-direction:column}.ring{position:relative;flex:none;inline-size:var(--_donut-chart-size);block-size:var(--_donut-chart-size)}.ring-svg{display:block;inline-size:100%;block-size:100%}@media not (forced-colors:active){.slice.focusable:focus-visible{outline:none}}.slice.focusable:focus-visible{stroke:var(--ds-chart-focus-ring-color);stroke-width:var(--focus-ring-width);paint-order:stroke;filter:drop-shadow(0 0 1px var(--ds-chart-focus-halo-color)) drop-shadow(0 0 1px var(--ds-chart-focus-halo-color))}.center{position:absolute;inset:0;display:grid;place-content:center;justify-items:center;inline-size:max(56%,var(--_donut-chart-hole-fraction) * 70%);margin-inline:auto;overflow-wrap:anywhere;text-align:center;pointer-events:none}.center-value,.center-label{text-shadow:0 0 var(--space-1) var(--ds-chart-frame-bg-color),0 0 var(--space-0-5) var(--ds-chart-frame-bg-color)}.center-value{color:var(--text-primary);font-size:var(--font-size-h4);font-weight:700}.center-label{color:var(--text-tertiary);font-size:var(--font-size-xs)}.legend,.skeleton-legend{display:grid;row-gap:var(--_donut-chart-legend-row-gap);min-inline-size:0}.legend{margin:0;padding:0;list-style:none}.skeleton-legend{flex:1 1 auto}.legend-item{display:grid;grid-template-columns:auto 1fr auto auto;column-gap:var(--space-2);align-items:baseline}.legend-item.interactive{cursor:pointer}.swatch{align-self:center;inline-size:var(--_donut-chart-swatch-size);block-size:var(--_donut-chart-swatch-size);border-radius:var(--radius-pill)}.legend-label{color:var(--text-secondary)}.legend-value{font-weight:700}.legend-percent{color:var(--text-tertiary);font-size:var(--font-size-xs)}.legend-bottom .legend{display:flex;flex-wrap:wrap;gap:var(--_donut-chart-legend-row-gap) var(--space-4)}.legend-bottom .legend-item{display:flex;column-gap:var(--space-2)}.empty-text.is-error{color:var(--error)}.ring-svg .slice{transition:opacity var(--ds-motion-chart-state-duration) var(--ds-motion-chart-state-easing),fill var(--ds-motion-chart-mark-duration) var(--ds-motion-chart-mark-easing)}.ring-svg .slice.is-dimmed{opacity:var(--ds-chart-dim-opacity)}.ring-svg.dims-others:has(.slice.interactive:hover) .slice.interactive:not(:hover),.ring-svg.dims-others:has(.slice.interactive:focus-visible) .slice.interactive:not(:focus-visible){opacity:var(--ds-chart-dim-opacity)}.ring-svg .slice.interactive{cursor:pointer}@media(forced-colors:active){.axis-line,.grid-line{stroke:CanvasText}.axis-label,.category-label{fill:CanvasText}:focus-visible{stroke:Highlight;filter:none}}\n"] }]
304
- }], propDecorators: { data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: true }] }], centerValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "centerValue", required: false }] }], centerLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "centerLabel", required: false }] }], legend: [{ type: i0.Input, args: [{ isSignal: true, alias: "legend", required: false }] }], maxSlices: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxSlices", required: false }] }], otherLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "otherLabel", required: false }] }], thickness: [{ type: i0.Input, args: [{ isSignal: true, alias: "thickness", required: false }] }], caption: [{ type: i0.Input, args: [{ isSignal: true, alias: "caption", required: false }] }], summary: [{ type: i0.Input, args: [{ isSignal: true, alias: "summary", required: false }] }], dataTable: [{ type: i0.Input, args: [{ isSignal: true, alias: "dataTable", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], emptyText: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyText", required: false }] }], error: [{ type: i0.Input, args: [{ isSignal: true, alias: "error", required: false }] }], errorText: [{ type: i0.Input, args: [{ isSignal: true, alias: "errorText", required: false }] }], valueFormat: [{ type: i0.Input, args: [{ isSignal: true, alias: "valueFormat", required: false }] }], interactive: [{ type: i0.Input, args: [{ isSignal: true, alias: "interactive", required: false }] }], sliceClicked: [{ type: i0.Output, args: ["sliceClicked"] }], dimOthers: [{ type: i0.Input, args: [{ isSignal: true, alias: "dimOthers", required: false }] }], staggerMs: [{ type: i0.Input, args: [{ isSignal: true, alias: "staggerMs", required: false }] }], tooltip: [{ type: i0.Input, args: [{ isSignal: true, alias: "tooltip", required: false }] }], tooltipTemplate: [{ type: i0.ContentChild, args: ['dsChartTooltip', { isSignal: true }] }] } });
374
+ args: [{ selector: 'ds-donut-chart', standalone: true, imports: [SkeletonComponent, ChartTooltipDirective, IconComponent], host: { '[class.framed]': "frameResolved() === 'auto'" }, encapsulation: ViewEncapsulation.Emulated, changeDetection: ChangeDetectionStrategy.OnPush, template: "<figure\n class=\"donut-chart\"\n [style.--_donut-chart-hole-fraction]=\"hole()\">\n @if (activeMark.pinned()) {\n <button\n class=\"pin-reset\"\n type=\"button\"\n (click)=\"activeMark.release()\">\n Unpin\n </button>\n }\n\n @if (caption()) {\n <figcaption>\n {{ caption() }}\n </figcaption>\n }\n\n @if (error()) {\n <div class=\"empty\">\n <div\n class=\"empty-ring\"\n aria-hidden=\"true\">\n </div>\n\n <p\n class=\"empty-text is-error\"\n role=\"status\">\n {{ errorTextResolved() }}\n </p>\n </div>\n } @else if (loading()) {\n <div\n class=\"skeleton\"\n aria-hidden=\"true\"\n [class.legend-bottom]=\"legend() === 'bottom'\">\n <ds-skeleton\n circle\n width=\"var(--_donut-chart-size)\"\n height=\"var(--_donut-chart-size)\" />\n\n @if (legend() !== 'none') {\n <div class=\"skeleton-legend\">\n @for (placeholder of skeletonRows(); track $index) {\n <ds-skeleton height=\"var(--_donut-chart-legend-row-height)\" />\n }\n </div>\n }\n </div>\n } @else if (isEmpty()) {\n <div class=\"empty\">\n <div\n class=\"empty-ring\"\n aria-hidden=\"true\">\n </div>\n\n <p class=\"empty-text\">\n {{ emptyTextResolved() }}\n </p>\n </div>\n } @else {\n <div\n class=\"chart\"\n [attr.role]=\"interactive() ? 'group' : 'img'\"\n [class.legend-bottom]=\"legend() === 'bottom'\"\n [attr.aria-label]=\"accessibleName()\"\n [dsChartTooltip]=\"tooltipContext()\"\n [dsChartTooltipPreferBelow]=\"activeMark.pinned()\"\n [dsChartTooltipOrigin]=\"activeMark.origin()\"\n [dsChartTooltipTemplate]=\"tooltipTemplate() ?? null\">\n <div\n class=\"ring\"\n [class.ring-outline]=\"total() === 0\">\n <svg\n class=\"ring-svg\"\n animate.enter=\"mark-enter\"\n [class.dims-others]=\"dimOthers()\"\n [attr.aria-hidden]=\"ringCarriesTheRoute() ? null : true\"\n [attr.viewBox]=\"viewBox\">\n @for (entry of slices(); track entry.slice.id; let index = $index) {\n <path\n class=\"slice\"\n [class.interactive]=\"interactive()\"\n [class.is-pinned]=\"\n activeMark.pinned() && activeMark.index() === index\n \"\n [class.is-dimmed]=\"isDimmed(index)\"\n [class.focusable]=\"ringCarriesTheRoute()\"\n [attr.d]=\"entry.path\"\n [style.fill]=\"entry.color\"\n [attr.role]=\"ringCarriesTheRoute() ? 'button' : null\"\n [attr.tabindex]=\"\n ringCarriesTheRoute()\n ? index === tabStopIndex()\n ? 0\n : -1\n : null\n \"\n [attr.data-mark-index]=\"index\"\n [attr.aria-label]=\"\n ringCarriesTheRoute() ? entryLabel(entry) : null\n \"\n (pointerenter)=\"activeMark.enter(index, $event)\"\n (pointerleave)=\"activeMark.leave()\"\n (focus)=\"onMarkFocus(index, $event)\"\n (blur)=\"activeMark.leave()\"\n (keydown)=\"onMarkNavigation($event, index, '.ring-svg')\"\n (click)=\"onMarkClick(entry.slice, index, $event)\"\n (keydown.enter)=\"onSliceKey(entry.slice, $event)\"\n (keydown.space)=\"onSliceKey(entry.slice, $event)\">\n </path>\n\n @if (activeMark.pinned() && activeMark.index() === index) {\n <foreignObject\n class=\"pin-marker\"\n width=\"14\"\n height=\"14\"\n [attr.x]=\"entry.center.x - 7\"\n [attr.y]=\"entry.center.y - 7\">\n <ds-icon\n name=\"pin\"\n [size]=\"14\" />\n </foreignObject>\n }\n }\n </svg>\n\n <div class=\"center\">\n <span class=\"center-value\">\n {{ resolvedCenterValue() }}\n </span>\n\n @if (centerLabel()) {\n <span class=\"center-label\">\n {{ centerLabel() }}\n </span>\n }\n </div>\n </div>\n\n @if (legend() !== 'none') {\n <ul class=\"legend\">\n @for (entry of slices(); track entry.slice.id; let index = $index) {\n <li\n class=\"legend-item\"\n [class.interactive]=\"interactive()\"\n [attr.role]=\"interactive() ? 'button' : null\"\n [attr.tabindex]=\"\n interactive() ? (index === tabStopIndex() ? 0 : -1) : null\n \"\n [attr.data-mark-index]=\"index\"\n [attr.aria-label]=\"interactive() ? entryLabel(entry) : null\"\n (pointerenter)=\"onLegendEnter(index, $event)\"\n (pointerleave)=\"activeMark.leave()\"\n (focus)=\"onLegendFocus(index, $event)\"\n (blur)=\"activeMark.leave()\"\n (keydown)=\"onMarkNavigation($event, index, '.legend')\"\n (click)=\"onLegendClick(entry.slice, index, $event)\"\n (keydown.enter)=\"onSliceKey(entry.slice, $event)\"\n (keydown.space)=\"onSliceKey(entry.slice, $event)\">\n <span\n class=\"swatch\"\n animate.enter=\"mark-enter\"\n [style.background]=\"entry.color\">\n </span>\n\n <span class=\"legend-label\">\n {{ entry.slice.label }}\n </span>\n\n <span class=\"legend-value\">\n {{ entry.formattedValue }}\n </span>\n\n @if (partOfWhole()) {\n <span class=\"legend-percent\">\n {{ entry.formattedPercent }}\n </span>\n }\n </li>\n }\n </ul>\n }\n </div>\n\n @if (dataTableResolved() !== 'none') {\n <details\n class=\"data-table\"\n [open]=\"dataTableResolved() === 'visible'\">\n <summary>\n Data table\n </summary>\n\n <table>\n <caption>\n {{\n caption() ?? 'Chart data'\n }}\n </caption>\n\n <thead>\n <tr>\n <th scope=\"col\">\n Label\n </th>\n\n <th scope=\"col\">\n Value\n </th>\n\n @if (partOfWhole()) {\n <th scope=\"col\">\n Share of total\n </th>\n }\n </tr>\n </thead>\n\n <tbody>\n @for (entry of slices(); track entry.slice.id) {\n <tr>\n <td>\n {{ entry.slice.label }}\n </td>\n\n <td>\n {{ entry.formattedValue }}\n </td>\n\n @if (partOfWhole()) {\n <td>\n {{ entry.formattedPercent }}\n </td>\n }\n </tr>\n }\n </tbody>\n </table>\n </details>\n }\n }\n</figure>\n", styles: ["@charset \"UTF-8\";:where(:focus-visible){outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:var(--focus-ring-offset);animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard)}@keyframes ds-focus-ring-in{0%{outline-color:transparent}}:root[data-focus=ring]{--ds-field-focus-shadow: var(--focus-ring);--ds-field-focus-shadow-error: var(--focus-ring-error)}:root[data-focus=edge]{--focus-ring-offset: 0px;--ds-field-focus-shadow: 0 0 0 var(--border-width-default) var(--primary);--ds-field-focus-shadow-error: 0 0 0 var(--border-width-default) var(--error)}[data-focus=inset]{--focus-ring-offset: calc(-1 * var(--focus-ring-width));--ds-field-focus-shadow: var(--focus-ring-inset);--ds-field-focus-shadow-error: var(--focus-ring-inset-error)}@media(forced-colors:active){:where(:focus-visible){outline:var(--focus-ring-width) solid CanvasText;outline-offset:var(--focus-ring-offset)}}@keyframes ds-chart-mark-grow-y{0%{opacity:0;transform:scaleY(0)}}@keyframes ds-chart-mark-grow-x{0%{opacity:0;transform:scaleX(0)}}@keyframes ds-chart-mark-fade-in{0%{opacity:0}}@keyframes ds-chart-mark-exit{to{opacity:0}}.ring-svg.mark-enter{animation:ds-chart-mark-fade-in var(--ds-motion-chart-mark-enter-duration) var(--ds-motion-chart-mark-enter-easing) calc(var(--ds-motion-chart-mark-exit-duration) + var(--_chart-mark-stagger, 0ms)) both}.ring-svg.mark-leave{animation:ds-chart-mark-exit var(--ds-motion-chart-mark-exit-duration) var(--ds-motion-chart-mark-exit-easing) both}.swatch.mark-enter{animation:ds-chart-mark-fade-in var(--ds-motion-chart-mark-enter-duration) var(--ds-motion-chart-mark-enter-easing) calc(var(--ds-motion-chart-mark-exit-duration) + var(--_chart-mark-stagger, 0ms)) both}.swatch.mark-leave{animation:ds-chart-mark-exit var(--ds-motion-chart-mark-exit-duration) var(--ds-motion-chart-mark-exit-easing) both}:host{display:block;-webkit-user-select:none;user-select:none}:host(.framed){padding:var(--ds-chart-frame-padding);background:var(--ds-chart-frame-bg-color);border:var(--ds-chart-frame-border-width) solid var(--ds-chart-frame-border-color);border-radius:var(--ds-chart-frame-radius)}.data-table,.stage-table,figcaption{-webkit-user-select:text;user-select:text}@media not (forced-colors:active){.slice:focus{outline:none}}.data-table{--_chart-data-table-marker: var(--space-1);margin-block-start:var(--space-4);color:var(--text-secondary);font-size:var(--font-size-s)}.data-table>summary{display:inline-flex;align-items:center;gap:var(--space-1);padding-block:var(--space-1);color:var(--text-tertiary);font-size:var(--font-size-xs);cursor:pointer;list-style:none}.data-table>summary::-webkit-details-marker{display:none}.data-table>summary:before{content:\"\";inline-size:0;block-size:0;border-block-start:var(--_chart-data-table-marker) solid transparent;border-block-end:var(--_chart-data-table-marker) solid transparent;border-inline-start:calc(var(--_chart-data-table-marker) * 1.25) solid currentcolor;transition:transform var(--duration-fast) var(--ease-standard)}@media(prefers-reduced-motion:reduce){.data-table>summary:before{transition:none}}.data-table[open]>summary:before{transform:rotate(90deg)}.data-table>summary{border-radius:var(--radius-sm)}.data-table caption{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}.data-table table{inline-size:100%;margin-block-start:var(--space-2);border-collapse:collapse;font-variant-numeric:tabular-nums}.data-table th,.data-table td{padding-block:var(--space-2);border-block-end:var(--border-width-default) solid var(--ds-chart-grid-line-color);text-align:end}.data-table thead th{color:var(--text-tertiary);font-size:var(--font-size-xs);font-weight:600}.data-table th:first-child,.data-table td:first-child{text-align:start}.data-table td+td{padding-inline-start:var(--space-3)}.donut-chart{--_donut-chart-size: var(--ds-donut-chart-size, 180px);--_donut-chart-gap: var(--ds-donut-chart-gap, var(--space-5));--_donut-chart-legend-row-gap: var(--ds-donut-chart-legend-row-gap, var(--space-2));--_donut-chart-legend-row-height: var(--ds-donut-chart-legend-row-height, 16px);--_donut-chart-swatch-size: var(--ds-donut-chart-swatch-size, 10px);--_donut-chart-focus-color: var(--ds-donut-chart-focus-color, var(--focus-ring-color));--_donut-chart-focus-width: var(--ds-donut-chart-focus-width, var(--focus-ring-width));--_donut-chart-outline-width: var(--ds-donut-chart-outline-width, calc(var(--border-width-strong) + var(--border-width-default)));margin:0}figcaption{margin-block-end:var(--space-3);color:var(--text-primary);font-weight:600}.empty{display:flex;flex-direction:column;gap:var(--space-3);align-items:center}.empty-ring,.ring-outline{position:relative;inline-size:var(--_donut-chart-size);block-size:var(--_donut-chart-size);border:var(--_donut-chart-outline-width) solid var(--border-divider);border-radius:var(--radius-pill)}.empty-ring:before,.ring-outline:before{content:\"\";position:absolute;inset:calc((100% - var(--_donut-chart-hole-fraction) * 100%) / 2);border:calc(var(--_donut-chart-hole-fraction) * var(--_donut-chart-outline-width)) solid var(--border-divider);border-radius:var(--radius-pill)}.empty-text{margin:0;color:var(--text-secondary)}.chart,.skeleton{display:flex;flex-wrap:wrap;gap:var(--_donut-chart-gap);align-items:center;justify-content:center}.chart.legend-bottom,.skeleton.legend-bottom{flex-direction:column}.ring{position:relative;flex:none;inline-size:var(--_donut-chart-size);block-size:var(--_donut-chart-size)}.ring-svg{display:block;inline-size:100%;block-size:100%}@media not (forced-colors:active){.slice.focusable:focus-visible{outline:none}}.slice.focusable:focus-visible{stroke:var(--ds-chart-focus-ring-color);stroke-width:var(--focus-ring-width);paint-order:stroke;filter:drop-shadow(0 0 var(--focus-ring-width) var(--ds-chart-focus-halo-color))}.center{position:absolute;inset:0;display:grid;place-content:center;justify-items:center;inline-size:max(56%,var(--_donut-chart-hole-fraction) * 70%);margin-inline:auto;overflow-wrap:anywhere;text-align:center;pointer-events:none}.center-value,.center-label{text-shadow:0 0 var(--space-1) var(--ds-chart-frame-bg-color),0 0 var(--space-0-5) var(--ds-chart-frame-bg-color)}.center-value{color:var(--text-primary);font-size:var(--font-size-h4);font-weight:700}.center-label{color:var(--text-tertiary);font-size:var(--font-size-xs)}.legend,.skeleton-legend{display:grid;row-gap:var(--_donut-chart-legend-row-gap);min-inline-size:0}.legend{margin:0;padding:0;list-style:none}.skeleton-legend{flex:1 1 auto}.legend-item{display:grid;grid-template-columns:auto 1fr auto auto;column-gap:var(--space-2);align-items:baseline}.legend-item.interactive{cursor:pointer}.swatch{align-self:center;inline-size:var(--_donut-chart-swatch-size);block-size:var(--_donut-chart-swatch-size);border-radius:var(--radius-pill)}.legend-label{color:var(--text-secondary)}.legend-value{font-weight:700}.legend-percent{color:var(--text-tertiary);font-size:var(--font-size-xs)}.legend-bottom .legend{display:flex;flex-wrap:wrap;gap:var(--_donut-chart-legend-row-gap) var(--space-4)}.legend-bottom .legend-item{display:flex;column-gap:var(--space-2)}.empty-text.is-error{color:var(--error)}.ring-svg .slice{transition:opacity var(--ds-motion-chart-state-duration) var(--ds-motion-chart-state-easing),fill var(--ds-motion-chart-mark-duration) var(--ds-motion-chart-mark-easing)}.ring-svg .slice.is-dimmed{opacity:var(--ds-chart-dim-opacity)}.ring-svg.dims-others:not(:has(.slice.is-pinned)):has(.slice.interactive:hover) .slice.interactive:not(:hover),.ring-svg.dims-others:not(:has(.slice.is-pinned)):has(.slice.interactive:focus-visible) .slice.interactive:not(:focus-visible),.ring-svg.dims-others:has(.slice.is-pinned) .slice:not(.is-pinned){opacity:var(--ds-chart-dim-opacity)}.ring-svg .slice.interactive{cursor:pointer}@media(forced-colors:active){.axis-line,.grid-line{stroke:CanvasText}.axis-label,.category-label{fill:CanvasText}:focus-visible{stroke:Highlight;filter:none}}:host{position:relative}.pin-reset{position:absolute;inset-block-start:var(--space-2);inset-inline:0;z-index:1;justify-self:center;margin-inline:auto;display:inline-flex;align-items:center;gap:var(--space-1);min-block-size:var(--space-12);inline-size:fit-content;padding:var(--space-1) var(--space-3);border:var(--border-width-default) solid var(--border-divider);border-radius:var(--radius-pill);background:var(--surface-default);color:var(--text-secondary);font-size:var(--font-size-xs);line-height:1;box-shadow:var(--shadow-1);cursor:pointer}.pin-reset:hover{color:var(--text-primary);border-color:var(--border-strong)}.pin-marker{display:grid;place-items:center;inline-size:var(--ds-chart-pin-size, 22px);block-size:var(--ds-chart-pin-size, 22px);border:var(--border-width-default) solid var(--border-divider);border-radius:var(--radius-pill);background:var(--surface-default);color:var(--text-primary);box-shadow:var(--shadow-1);pointer-events:none}\n"] }]
375
+ }], propDecorators: { data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: true }] }], centerValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "centerValue", required: false }] }], centerLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "centerLabel", required: false }] }], legend: [{ type: i0.Input, args: [{ isSignal: true, alias: "legend", required: false }] }], maxSlices: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxSlices", required: false }] }], otherLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "otherLabel", required: false }] }], thickness: [{ type: i0.Input, args: [{ isSignal: true, alias: "thickness", required: false }] }], frame: [{ type: i0.Input, args: [{ isSignal: true, alias: "frame", required: false }] }], tooltipLingerMs: [{ type: i0.Input, args: [{ isSignal: true, alias: "tooltipLingerMs", required: false }] }], caption: [{ type: i0.Input, args: [{ isSignal: true, alias: "caption", required: false }] }], summary: [{ type: i0.Input, args: [{ isSignal: true, alias: "summary", required: false }] }], dataTable: [{ type: i0.Input, args: [{ isSignal: true, alias: "dataTable", required: false }] }], partOfWhole: [{ type: i0.Input, args: [{ isSignal: true, alias: "partOfWhole", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], emptyText: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyText", required: false }] }], error: [{ type: i0.Input, args: [{ isSignal: true, alias: "error", required: false }] }], errorText: [{ type: i0.Input, args: [{ isSignal: true, alias: "errorText", required: false }] }], valueFormat: [{ type: i0.Input, args: [{ isSignal: true, alias: "valueFormat", required: false }] }], interactive: [{ type: i0.Input, args: [{ isSignal: true, alias: "interactive", required: false }] }], sliceClicked: [{ type: i0.Output, args: ["sliceClicked"] }], pinOnClick: [{ type: i0.Input, args: [{ isSignal: true, alias: "pinOnClick", required: false }] }], dimOthers: [{ type: i0.Input, args: [{ isSignal: true, alias: "dimOthers", required: false }] }], staggerMs: [{ type: i0.Input, args: [{ isSignal: true, alias: "staggerMs", required: false }] }], tooltip: [{ type: i0.Input, args: [{ isSignal: true, alias: "tooltip", required: false }] }], tooltipTemplate: [{ type: i0.ContentChild, args: ['dsChartTooltip', { isSignal: true }] }] } });
305
376
 
306
377
  /**
307
378
  * Generated bundle index. Do not edit.