@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-bar-chart.mjs","sources":["../../../src/lib/components/bar-chart/bar-chart.math.ts","../../../src/lib/components/bar-chart/bar-chart.component.ts","../../../src/lib/components/bar-chart/bar-chart.component.html","../../../src/lib/components/bar-chart/ids-group-ltd-ids-design-system-components-bar-chart.ts"],"sourcesContent":["/** Largest finite value, or `explicitMax` when it is a usable track length. A\n * non-finite datum is skipped rather than compared: one `Infinity` row would\n * otherwise become the track length and flatten every other row to nothing. */\nexport function resolveMax(\n explicitMax: number | null,\n values: readonly number[],\n): number {\n if (explicitMax !== null && Number.isFinite(explicitMax) && explicitMax > 0) {\n return explicitMax;\n }\n const finite = values.filter((value) => Number.isFinite(value));\n\n return finite.length ? Math.max(...finite) : 0;\n}\n\n/** Track share for one row, in percent. Has no upper bound: an explicit `max`\n * below the data is the caller's statement, and `.track` clips the overflow. */\nexport function widthPercent(value: number, max: 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 `width: NaN%` is\n // dropped silently.\n if (!Number.isFinite(value) || !Number.isFinite(max) || max <= 0) {\n return 0;\n }\n\n return Math.max((value / max) * 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 chartColors,\n describeSeries,\n formatPercent,\n describeShare,\n focusMark,\n formatValue,\n nextRovingIndex,\n staggerDelay,\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 { resolveMax, widthPercent } from './bar-chart.math';\nimport type { BarChartRow } from './bar-chart.types';\n\nconst defaultValueFormat = (value: number) => formatValue(value);\n\n@Component({\n selector: 'ds-bar-chart',\n standalone: true,\n imports: [SkeletonComponent, ChartTooltipDirective],\n templateUrl: './bar-chart.component.html',\n styleUrl: './bar-chart.component.scss',\n encapsulation: ViewEncapsulation.Emulated,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class BarChartComponent {\n /** One row per bar, drawn in the order given. */\n readonly data = input.required<readonly BarChartRow[]>();\n\n /** Track length is relative to this. Null uses the largest value, so the\n * longest row always fills its track. */\n readonly max = input<number | null>(null, {\n transform: (raw: unknown) => (raw == null ? null : numberAttribute(raw)),\n });\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 /** Prints each row's share of `max` beside its value. */\n readonly showPercent = input(true, { transform: booleanAttribute });\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 row that was clicked, or activated with Enter or Space. Fires whether or not\n * `interactive` is set. */\n readonly rowClicked = output<BarChartRow>();\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 row opens a tooltip. `'axis'` is not offered — a bar\n * 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 protected readonly activeMark = chartActiveMark();\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.rows().length - 1)),\n );\n\n protected onMarkFocus(index: number, event: FocusEvent): void {\n this.rovingIndex.set(index);\n this.activeMark.enter(index, event);\n }\n\n protected onMarkNavigation(event: KeyboardEvent, index: number): void {\n const next = nextRovingIndex(event.key, index, this.rows().length);\n if (next === null) {\n return;\n }\n event.preventDefault();\n this.rovingIndex.set(next);\n focusMark((event.currentTarget as Element).closest('.rows'), next);\n }\n\n protected readonly tooltipContext = computed<ChartTooltipContext | null>(\n () => {\n const entry = this.rows()[this.activeMark.index()];\n if (this.tooltip() === 'none' || !entry) {\n return null;\n }\n\n return {\n category: '',\n entries: [\n {\n label: entry.row.label,\n value: entry.row.value,\n formatted: entry.formattedValue,\n color: entry.color,\n detail: describeShare(\n this.data().map((row) => row.value),\n this.activeMark.index(),\n ),\n },\n ],\n };\n },\n );\n\n protected readonly resolvedMax = computed(() =>\n resolveMax(\n this.max(),\n this.data().map((row) => row.value),\n ),\n );\n\n protected readonly rows = computed(() => {\n const max = this.resolvedMax();\n const format = this.valueFormatResolved();\n\n return this.data().map((row, index) => ({\n key: row.id ?? String(index),\n row,\n widthPercent: widthPercent(row.value, max),\n formattedValue: format(row.value),\n formattedPercent:\n row.percent !== undefined\n ? formatPercent(row.percent, 100)\n : formatPercent(row.value, max),\n color: row.color ?? chartColors.seriesDefault,\n }));\n });\n\n protected readonly accessibleName = computed(\n () =>\n this.summary() ??\n describeSeries(\n this.caption() ?? 'Chart',\n this.data().map((row) => ({ label: row.label, value: row.value })),\n this.valueFormatResolved(),\n this.dataTableResolved() !== 'none',\n ),\n );\n\n protected entryLabel(entry: { row: BarChartRow; formattedValue: string }) {\n return `${entry.row.label}, ${entry.formattedValue}`;\n }\n\n protected onRowKey(row: BarChartRow, event: Event): void {\n // Only the row's own key opens the row: a key pressed on a control inside it belongs to that\n // control.\n if (!this.interactive() || event.target !== event.currentTarget) {\n return;\n }\n event.preventDefault();\n this.rowClicked.emit(row);\n }\n\n protected readonly isEmpty = computed(() => this.data().length === 0);\n\n /** Placeholder bars while loading. Follows the real row count so the chart does not resize\n * when the data lands; falls back to three when `data` is still empty. */\n protected readonly skeletonRows = computed(() =>\n Array.from({ length: Math.max(this.data().length, 3) }),\n );\n}\n","<figure class=\"bar-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 skeletonRows(); track $index) {\n <ds-skeleton height=\"var(--_bar-chart-track-height)\" />\n }\n </div>\n } @else if (isEmpty()) {\n <p class=\"empty\">\n {{ emptyTextResolved() }}\n </p>\n } @else {\n <div\n class=\"rows\"\n [class.dims-others]=\"dimOthers()\"\n [attr.role]=\"interactive() ? 'group' : 'img'\"\n [attr.aria-label]=\"accessibleName()\"\n [dsChartTooltip]=\"tooltipContext()\"\n [dsChartTooltipOrigin]=\"activeMark.origin()\"\n [dsChartTooltipTemplate]=\"tooltipTemplate() ?? null\">\n @for (entry of rows(); track entry.key; let index = $index) {\n <div\n class=\"row\"\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)=\"activeMark.enter(index, $event)\"\n (pointerleave)=\"activeMark.leave()\"\n (focus)=\"onMarkFocus(index, $event)\"\n (blur)=\"activeMark.leave()\"\n (keydown)=\"onMarkNavigation($event, index)\"\n (click)=\"rowClicked.emit(entry.row)\"\n (keydown.enter)=\"onRowKey(entry.row, $event)\"\n (keydown.space)=\"onRowKey(entry.row, $event)\">\n <span class=\"label\">\n {{ entry.row.label }}\n </span>\n\n <span class=\"value\">\n {{ entry.formattedValue }}\n </span>\n\n @if (showPercent()) {\n <span class=\"percent\">\n {{ entry.formattedPercent }}\n </span>\n }\n\n <span class=\"track\">\n <span\n class=\"fill\"\n animate.enter=\"mark-enter\"\n [style.width.%]=\"entry.widthPercent\"\n [style.background]=\"entry.color\">\n </span>\n </span>\n </div>\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 </tr>\n </thead>\n\n <tbody>\n @for (entry of rows(); track entry.key) {\n <tr>\n <td>\n {{ entry.row.label }}\n </td>\n\n <td>\n {{ entry.formattedValue }}\n </td>\n </tr>\n }\n </tbody>\n </table>\n </details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,CAAC,EAAA,aAAA,EAGpC,iBAAiB,CAAC,QAAQ,EAAA,eAAA,EACxB,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,08GAAA,EAAA,MAAA,EAAA,CAAA,u4IAAA,CAAA,EAAA;oiDAkG3C,gBAAgB,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AEnJtB;;AAEG;;;;"}
1
+ {"version":3,"file":"ids-group-ltd-ids-design-system-components-bar-chart.mjs","sources":["../../../src/lib/components/bar-chart/bar-chart.math.ts","../../../src/lib/components/bar-chart/bar-chart.component.ts","../../../src/lib/components/bar-chart/bar-chart.component.html","../../../src/lib/components/bar-chart/ids-group-ltd-ids-design-system-components-bar-chart.ts"],"sourcesContent":["/** Largest finite value, or `explicitMax` when it is a usable track length. A\n * non-finite datum is skipped rather than compared: one `Infinity` row would\n * otherwise become the track length and flatten every other row to nothing. */\nexport function resolveMax(\n explicitMax: number | null,\n values: readonly number[],\n): number {\n if (explicitMax !== null && Number.isFinite(explicitMax) && explicitMax > 0) {\n return explicitMax;\n }\n const finite = values.filter((value) => Number.isFinite(value));\n\n return finite.length ? Math.max(...finite) : 0;\n}\n\n/** Track share for one row, in percent. Has no upper bound: an explicit `max`\n * below the data is the caller's statement, and `.track` clips the overflow. */\nexport function widthPercent(value: number, max: 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 `width: NaN%` is\n // dropped silently.\n if (!Number.isFinite(value) || !Number.isFinite(max) || max <= 0) {\n return 0;\n }\n\n return Math.max((value / max) * 100, 0);\n}\n\n/** Each segment's share of the row's track, in percent. Sized against the segments' OWN sum, never\n * the row's `value`: when the two disagree the row is a distribution that does not add up, and a\n * gap left where the difference is would draw that error as an unlabelled category.\n *\n * A set with no positive finite total has no shares to give, and returns none. */\nexport function segmentWidths(values: readonly number[]): number[] {\n const total = values\n .filter((value) => Number.isFinite(value) && value > 0)\n .reduce((sum, value) => sum + value, 0);\n if (total <= 0) {\n return [];\n }\n\n return values.map((value) =>\n Number.isFinite(value) && value > 0 ? (value / total) * 100 : 0,\n );\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 chartColors,\n defaultChartFormat,\n describeSeries,\n formatPercent,\n describeShare,\n shareOfTotal,\n focusMark,\n nextRovingIndex,\n staggerDelay,\n} from '@ids-group-ltd/ids-design-system/components';\nimport { SkeletonComponent } from '@ids-group-ltd/ids-design-system/components/skeleton';\nimport { IconComponent } from '@ids-group-ltd/ids-design-system/icons';\nimport { resolveWithConfig } from '@ids-group-ltd/ids-design-system/core';\nimport type {\n ChartDataTable,\n ChartFrame,\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 { resolveMax, segmentWidths, widthPercent } from './bar-chart.math';\nimport type { BarChartRow, BarChartSegment } from './bar-chart.types';\n\n/** A row's parts, ready to draw: a width, a colour and a formatted value each. Segments are\n * CATEGORIES, so they take the categorical palette in order — unlike the rows, which are one\n * series and share one colour. */\nfunction segmentsOf(\n row: BarChartRow,\n format: (value: number) => string,\n): readonly {\n key: string;\n segment: BarChartSegment;\n widthPercent: number;\n formattedValue: string;\n color: string;\n}[] {\n const parts = row.segments ?? [];\n const widths = segmentWidths(parts.map((part) => part.value));\n\n return widths.length\n ? parts.map((segment, index) => ({\n key: segment.id ?? String(index),\n segment,\n widthPercent: widths[index],\n formattedValue: format(segment.value),\n color:\n segment.color ??\n CHART_SERIES_COLORS[index % CHART_SERIES_COLORS.length],\n }))\n : [];\n}\n\n@Component({\n selector: 'ds-bar-chart',\n standalone: true,\n imports: [SkeletonComponent, ChartTooltipDirective, IconComponent],\n templateUrl: './bar-chart.component.html',\n styleUrl: './bar-chart.component.scss',\n host: { '[class.framed]': \"frameResolved() === 'auto'\" },\n encapsulation: ViewEncapsulation.Emulated,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class BarChartComponent {\n /** One row per bar, drawn in the order given. */\n readonly data = input.required<readonly BarChartRow[]>();\n\n /** Track length is relative to this. Null uses the largest value, so the\n * longest row always fills its track. */\n readonly max = input<number | null>(null, {\n transform: (raw: unknown) => (raw == null ? null : numberAttribute(raw)),\n });\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 /** Prints each row's share of `max` beside its value. */\n readonly showPercent = input(true, { transform: booleanAttribute });\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 row that was clicked, or activated with Enter or Space. Fires whether or not\n * `interactive` is set. */\n readonly rowClicked = output<BarChartRow>();\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. `rowClicked` 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 protected markStagger(index: number): string {\n return `${staggerDelay(index, this.staggerMs())}ms`;\n }\n\n /** Whether a hovered or focused row opens a tooltip. `'axis'` is not offered — a bar\n * 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 private readonly tooltipLingerResolved = resolveWithConfig(\n this.tooltipLingerMs,\n (config) => config.chart?.tooltipLingerMs,\n 0,\n );\n\n protected readonly activeMark = chartActiveMark(() =>\n this.tooltipLingerResolved(),\n );\n\n protected onMarkClick(\n payload: BarChartRow,\n index: number,\n event: Event,\n ): void {\n this.rowClicked.emit(payload);\n if (this.pinOnClick()) {\n this.activeMark.pin(index, event, '.track');\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.rows().length - 1)),\n );\n\n protected onMarkFocus(index: number, event: FocusEvent): void {\n this.rovingIndex.set(index);\n this.activeMark.enter(index, event, '.track');\n }\n\n protected onMarkNavigation(event: KeyboardEvent, index: number): void {\n const next = nextRovingIndex(event.key, index, this.rows().length);\n if (next === null) {\n return;\n }\n event.preventDefault();\n this.rovingIndex.set(next);\n focusMark((event.currentTarget as Element).closest('.rows'), next);\n }\n\n protected readonly tooltipContext = computed<ChartTooltipContext | null>(\n () => {\n const entry = this.rows()[this.activeMark.index()];\n if (this.tooltip() === 'none' || !entry) {\n return null;\n }\n\n return {\n category: '',\n entries: [\n {\n label: entry.row.label,\n value: entry.row.value,\n formatted: entry.formattedValue,\n color: entry.color,\n detail: this.partOfWhole()\n ? describeShare(\n this.data().map((row) => row.value),\n this.activeMark.index(),\n )\n : undefined,\n },\n ],\n };\n },\n );\n\n protected readonly resolvedMax = computed(() =>\n resolveMax(\n this.max(),\n this.data().map((row) => row.value),\n ),\n );\n\n protected readonly rows = computed(() => {\n const max = this.resolvedMax();\n const format = this.valueFormatResolved();\n const values = this.data().map((row) => row.value);\n\n return this.data().map((row, index) => ({\n key: row.id ?? String(index),\n row,\n widthPercent: widthPercent(row.value, max),\n formattedValue: format(row.value, 'tooltip'),\n formattedPercent:\n row.percent !== undefined\n ? formatPercent(row.percent, 100)\n : formatPercent(row.value, max),\n share: this.partOfWhole() ? shareOfTotal(values, index) : '',\n segments: segmentsOf(row, (value) => format(value, 'tooltip')),\n color: row.color ?? chartColors.seriesDefault,\n }));\n });\n\n protected readonly accessibleName = computed(\n () =>\n this.summary() ??\n describeSeries(\n this.caption() ?? 'Chart',\n this.data().map((row) => ({ label: row.label, value: row.value })),\n (value) => this.valueFormatResolved()(value, 'tooltip'),\n this.dataTableResolved() !== 'none',\n ),\n );\n\n protected entryLabel(entry: { row: BarChartRow; formattedValue: string }) {\n return `${entry.row.label}, ${entry.formattedValue}`;\n }\n\n protected onRowKey(row: BarChartRow, event: Event): void {\n // Only the row's own key opens the row: a key pressed on a control inside it belongs to that\n // control.\n if (!this.interactive() || event.target !== event.currentTarget) {\n return;\n }\n event.preventDefault();\n this.rowClicked.emit(row);\n }\n\n protected readonly isEmpty = computed(() => this.data().length === 0);\n\n /** Placeholder bars while loading. Follows the real row count so the chart does not resize\n * when the data lands; falls back to three when `data` is still empty. */\n protected readonly skeletonRows = computed(() =>\n Array.from({ length: Math.max(this.data().length, 3) }),\n );\n}\n","<figure class=\"bar-chart\">\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 <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 skeletonRows(); track $index) {\n <ds-skeleton height=\"var(--_bar-chart-track-height)\" />\n }\n </div>\n } @else if (isEmpty()) {\n <p class=\"empty\">\n {{ emptyTextResolved() }}\n </p>\n } @else {\n <div\n class=\"rows\"\n [class.dims-others]=\"dimOthers()\"\n [attr.role]=\"interactive() ? 'group' : 'img'\"\n [attr.aria-label]=\"accessibleName()\"\n [dsChartTooltip]=\"tooltipContext()\"\n [dsChartTooltipPreferBelow]=\"activeMark.pinned()\"\n [dsChartTooltipOrigin]=\"activeMark.origin()\"\n [dsChartTooltipTemplate]=\"tooltipTemplate() ?? null\">\n @for (entry of rows(); track entry.key; let index = $index) {\n <div\n class=\"row\"\n animate.leave=\"mark-leave\"\n [style.--_chart-mark-stagger]=\"markStagger(index)\"\n [class.interactive]=\"interactive()\"\n [class.is-pinned]=\"\n activeMark.pinned() && activeMark.index() === index\n \"\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, '.track')\"\n (pointerleave)=\"activeMark.leave()\"\n (focus)=\"onMarkFocus(index, $event)\"\n (blur)=\"activeMark.leave()\"\n (keydown)=\"onMarkNavigation($event, index)\"\n (click)=\"onMarkClick(entry.row, index, $event)\"\n (keydown.enter)=\"onRowKey(entry.row, $event)\"\n (keydown.space)=\"onRowKey(entry.row, $event)\">\n <span class=\"label\">\n {{ entry.row.label }}\n\n @if (entry.row.detail) {\n <span class=\"detail\">\n {{ entry.row.detail }}\n </span>\n }\n </span>\n\n <span class=\"value\">\n {{ entry.formattedValue }}\n </span>\n\n @if (showPercent()) {\n <span class=\"percent\">\n {{ entry.formattedPercent }}\n </span>\n }\n\n <span class=\"track\">\n <span\n class=\"fill\"\n animate.enter=\"mark-enter\"\n [style.width.%]=\"entry.widthPercent\"\n [style.background]=\"entry.segments.length ? null : entry.color\">\n @for (part of entry.segments; track part.key) {\n <span\n class=\"segment\"\n [style.width.%]=\"part.widthPercent\"\n [style.background]=\"part.color\">\n </span>\n }\n\n @if (activeMark.pinned() && activeMark.index() === index) {\n <ds-icon\n class=\"pin-marker\"\n name=\"pin\"\n [size]=\"14\" />\n }\n </span>\n </span>\n </div>\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 rows(); track entry.key) {\n <tr>\n <td>\n {{ entry.row.label }}\n\n @if (entry.row.detail) {\n <span class=\"detail\">\n {{ entry.row.detail }}\n </span>\n }\n </td>\n\n <td>\n {{ entry.formattedValue }}\n </td>\n\n @if (partOfWhole()) {\n <td>\n {{ entry.share }}\n </td>\n }\n </tr>\n\n @for (part of entry.segments; track part.key) {\n <tr class=\"segment-row\">\n <td>\n {{ part.segment.label }}\n </td>\n\n <td>\n {{ part.formattedValue }}\n </td>\n\n @if (partOfWhole()) {\n <td></td>\n }\n </tr>\n }\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;;AAEgF;AAC1E,SAAU,UAAU,CACxB,WAA0B,EAC1B,MAAyB,EAAA;AAEzB,IAAA,IAAI,WAAW,KAAK,IAAI,IAAI,MAAM,CAAC,QAAQ,CAAC,WAAW,CAAC,IAAI,WAAW,GAAG,CAAC,EAAE;AAC3E,QAAA,OAAO,WAAW;IACpB;AACA,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;AACiF;AAC3E,SAAU,YAAY,CAAC,KAAa,EAAE,GAAW,EAAA;;;;IAIrD,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,GAAG,IAAI,CAAC,EAAE;AAChE,QAAA,OAAO,CAAC;IACV;AAEA,IAAA,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,KAAK,GAAG,GAAG,IAAI,GAAG,EAAE,CAAC,CAAC;AACzC;AAEA;;;;AAImF;AAC7E,SAAU,aAA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OAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EDpHY,iBAAiB,EAAA,QAAA,EAAA,aAAA,EAAA,MAAA,EAAA,CAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,QAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAE,qBAAqB,kMAAE,aAAa,EAAA,QAAA,EAAA,SAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,MAAA,EAAA,QAAA,EAAA,WAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;4FAOtD,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAV7B,SAAS;+BACE,cAAc,EAAA,UAAA,EACZ,IAAI,EAAA,OAAA,EACP,CAAC,iBAAiB,EAAE,qBAAqB,EAAE,aAAa,CAAC,EAAA,IAAA,EAG5D,EAAE,gBAAgB,EAAE,4BAA4B,EAAE,EAAA,aAAA,EACzC,iBAAiB,CAAC,QAAQ,EAAA,eAAA,EACxB,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,g4KAAA,EAAA,MAAA,EAAA,CAAA,ysOAAA,CAAA,EAAA;s7DAoI3C,gBAAgB,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AErNtB;;AAEG;;;;"}
@@ -0,0 +1,95 @@
1
+ import * as i0 from '@angular/core';
2
+ import { input, numberAttribute, booleanAttribute, computed, ViewEncapsulation, ChangeDetectionStrategy, Component } from '@angular/core';
3
+
4
+ /**
5
+ * One horizontal track with one fill: a task's completion, or a measurement on a known scale.
6
+ *
7
+ * The two are the same drawing and a different claim, which is what `semantics` carries — the
8
+ * platform splits them the same way, into `<progress>` and `<meter>`. Getting it wrong is not
9
+ * cosmetic: a table of two hundred rates under `'progress'` announces two hundred progress bars.
10
+ */
11
+ class BarComponent {
12
+ /** The reading, in units of `max`; clamped, and ignored while `indeterminate`. */
13
+ value = input(0, { ...(ngDevMode ? { debugName: "value" } : /* istanbul ignore next */ {}), transform: numberAttribute });
14
+ /** The full scale `value` and `target` are read against. Left at 100 they are percentages. Set
15
+ * it to the real total — `[value]="37" [max]="80"` — and the accessible name carries "37 of 80"
16
+ * rather than the 46% a caller would otherwise have to compute. For a column of measurements
17
+ * it is usually the column's own largest value, so the longest bar fills its track and the rest
18
+ * are its share. Zero or less falls back to 100, because a scale with no width has no fraction
19
+ * to draw. */
20
+ max = input(100, { ...(ngDevMode ? { debugName: "max" } : /* istanbul ignore next */ {}), transform: numberAttribute });
21
+ /** What the bar is, and therefore how it is announced. See `BarSemantics`. Defaults to
22
+ * `'progress'`. */
23
+ semantics = input('progress', ...(ngDevMode ? [{ debugName: "semantics" }] : /* istanbul ignore next */ []));
24
+ /** Colour role — drives the success/warning/error styling. */
25
+ variant = input('default', ...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
26
+ /** Indeterminate (unknown-duration) animation instead of a fixed `value`. Only a task has an
27
+ * unknown duration, so it is ignored unless `semantics` is `'progress'`. */
28
+ indeterminate = input(false, { ...(ngDevMode ? { debugName: "indeterminate" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
29
+ /** Overrides the fill for this one bar. A whole column is coloured once through
30
+ * `--ds-bar-fill-color` instead; use this where the colour carries meaning on one row. */
31
+ color = input(null, ...(ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []));
32
+ /** Accessible name (e.g. "Upload progress"). With a `target` set, name the comparison here —
33
+ * the mark is drawn and the role has no second value to announce, so "Resolved 62% against a
34
+ * 75% target" is what reaches a screen reader. Unused under `semantics="none"`. */
35
+ ariaLabel = input(null, ...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
36
+ /** A second point on the same scale as `value`, drawn as a hairline across the track — a goal,
37
+ * a baseline or a threshold to read `value` against. Clamped like `value`, ignored while
38
+ * `indeterminate`, and unset draws nothing. */
39
+ target = input(null, ...(ngDevMode ? [{ debugName: "target" }] : /* istanbul ignore next */ []));
40
+ role = computed(() => {
41
+ const semantics = this.semantics();
42
+ return semantics === 'none'
43
+ ? null
44
+ : semantics === 'meter'
45
+ ? 'meter'
46
+ : 'progressbar';
47
+ }, ...(ngDevMode ? [{ debugName: "role" }] : /* istanbul ignore next */ []));
48
+ scale = computed(() => {
49
+ const max = this.max();
50
+ return Number.isFinite(max) && max > 0 ? max : 100;
51
+ }, ...(ngDevMode ? [{ debugName: "scale" }] : /* istanbul ignore next */ []));
52
+ clampedValue = computed(() => {
53
+ const value = this.value();
54
+ return Number.isFinite(value)
55
+ ? Math.max(0, Math.min(this.scale(), value))
56
+ : 0;
57
+ }, ...(ngDevMode ? [{ debugName: "clampedValue" }] : /* istanbul ignore next */ []));
58
+ /** Width and offset are percentages of the track whatever the scale is. */
59
+ valuePercent = computed(() => (this.clampedValue() / this.scale()) * 100, ...(ngDevMode ? [{ debugName: "valuePercent" }] : /* istanbul ignore next */ []));
60
+ clampedTarget = computed(() => {
61
+ const target = this.target();
62
+ return target == null || !Number.isFinite(target)
63
+ ? null
64
+ : Math.max(0, Math.min(this.scale(), target));
65
+ }, ...(ngDevMode ? [{ debugName: "clampedTarget" }] : /* istanbul ignore next */ []));
66
+ targetPercent = computed(() => {
67
+ const target = this.clampedTarget();
68
+ return target === null ? null : (target / this.scale()) * 100;
69
+ }, ...(ngDevMode ? [{ debugName: "targetPercent" }] : /* istanbul ignore next */ []));
70
+ isIndet = computed(() => this.indeterminate() && this.semantics() === 'progress', ...(ngDevMode ? [{ debugName: "isIndet" }] : /* istanbul ignore next */ []));
71
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: BarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
72
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: BarComponent, isStandalone: true, selector: "ds-bar", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, semantics: { classPropertyName: "semantics", publicName: "semantics", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, indeterminate: { classPropertyName: "indeterminate", publicName: "indeterminate", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, target: { classPropertyName: "target", publicName: "target", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.role": "role()", "attr.aria-hidden": "semantics() === 'none' ? true : null", "attr.aria-valuemin": "role() ? 0 : null", "attr.aria-valuemax": "role() ? scale() : null", "attr.aria-valuenow": "role() && !isIndet() ? clampedValue() : null", "attr.aria-label": "ariaLabel()", "class.success": "variant() === 'success'", "class.warning": "variant() === 'warning'", "class.error": "variant() === 'error'", "class.indeterminate": "isIndet()" } }, ngImport: i0, template: "@if (isIndet()) {\n <span></span>\n} @else {\n <span\n [style.width.%]=\"valuePercent()\"\n [style.background]=\"color()\">\n </span>\n\n @if (targetPercent() !== null) {\n <div\n class=\"target\"\n [style.left.%]=\"targetPercent()\">\n </div>\n }\n}\n", styles: ["@charset \"UTF-8\";:host{--_bar-height: var(--ds-bar-height, var(--bar-h));--_bar-track-color: var(--ds-bar-track-color, var(--surface-muted));--_bar-fill-color: var(--ds-bar-fill-color, var(--accent));--_bar-target-color: var(--ds-bar-target-color, var(--text-primary));--_bar-target-width: var(--ds-bar-target-width, 2px);display:block;position:relative;inline-size:100%;min-inline-size:var(--ds-bar-min-width, 3rem);block-size:var(--_bar-height);background:var(--_bar-track-color);border-radius:var(--radius-pill);overflow:hidden}:host>span{display:block;block-size:100%;background:var(--_bar-fill-color);border-radius:var(--radius-pill);transition:inline-size var(--duration-base) var(--ease-standard)}:host>.target{position:absolute;inset-block-start:0;block-size:100%;inline-size:var(--_bar-target-width);transform:translate(-50%);background:var(--_bar-target-color);transition:left var(--duration-base) var(--ease-standard)}:host(.success){--_bar-fill-color-success: var(--ds-bar-fill-color-success, var(--success))}:host(.warning){--_bar-fill-color-warning: var(--ds-bar-fill-color-warning, var(--yellow-500))}:host(.error){--_bar-fill-color-error: var(--ds-bar-fill-color-error, var(--error))}:host(.success)>span{background:var(--_bar-fill-color-success)}:host(.warning)>span{background:var(--_bar-fill-color-warning)}:host(.error)>span{background:var(--_bar-fill-color-error)}:host(.indeterminate)>span{inline-size:30%;animation:bar-indet var(--duration-loop-slow) var(--ease-standard) infinite}@keyframes bar-indet{0%{transform:translate(-100%)}to{transform:translate(400%)}}@media(prefers-reduced-motion:reduce){:host>span,:host>.target{transition:none}:host(.indeterminate)>span{animation:none;inline-size:100%}}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
73
+ }
74
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: BarComponent, decorators: [{
75
+ type: Component,
76
+ args: [{ selector: 'ds-bar', standalone: true, imports: [], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.Emulated, host: {
77
+ '[attr.role]': 'role()',
78
+ '[attr.aria-hidden]': "semantics() === 'none' ? true : null",
79
+ '[attr.aria-valuemin]': 'role() ? 0 : null',
80
+ '[attr.aria-valuemax]': 'role() ? scale() : null',
81
+ '[attr.aria-valuenow]': 'role() && !isIndet() ? clampedValue() : null',
82
+ '[attr.aria-label]': 'ariaLabel()',
83
+ '[class.success]': "variant() === 'success'",
84
+ '[class.warning]': "variant() === 'warning'",
85
+ '[class.error]': "variant() === 'error'",
86
+ '[class.indeterminate]': 'isIndet()',
87
+ }, template: "@if (isIndet()) {\n <span></span>\n} @else {\n <span\n [style.width.%]=\"valuePercent()\"\n [style.background]=\"color()\">\n </span>\n\n @if (targetPercent() !== null) {\n <div\n class=\"target\"\n [style.left.%]=\"targetPercent()\">\n </div>\n }\n}\n", styles: ["@charset \"UTF-8\";:host{--_bar-height: var(--ds-bar-height, var(--bar-h));--_bar-track-color: var(--ds-bar-track-color, var(--surface-muted));--_bar-fill-color: var(--ds-bar-fill-color, var(--accent));--_bar-target-color: var(--ds-bar-target-color, var(--text-primary));--_bar-target-width: var(--ds-bar-target-width, 2px);display:block;position:relative;inline-size:100%;min-inline-size:var(--ds-bar-min-width, 3rem);block-size:var(--_bar-height);background:var(--_bar-track-color);border-radius:var(--radius-pill);overflow:hidden}:host>span{display:block;block-size:100%;background:var(--_bar-fill-color);border-radius:var(--radius-pill);transition:inline-size var(--duration-base) var(--ease-standard)}:host>.target{position:absolute;inset-block-start:0;block-size:100%;inline-size:var(--_bar-target-width);transform:translate(-50%);background:var(--_bar-target-color);transition:left var(--duration-base) var(--ease-standard)}:host(.success){--_bar-fill-color-success: var(--ds-bar-fill-color-success, var(--success))}:host(.warning){--_bar-fill-color-warning: var(--ds-bar-fill-color-warning, var(--yellow-500))}:host(.error){--_bar-fill-color-error: var(--ds-bar-fill-color-error, var(--error))}:host(.success)>span{background:var(--_bar-fill-color-success)}:host(.warning)>span{background:var(--_bar-fill-color-warning)}:host(.error)>span{background:var(--_bar-fill-color-error)}:host(.indeterminate)>span{inline-size:30%;animation:bar-indet var(--duration-loop-slow) var(--ease-standard) infinite}@keyframes bar-indet{0%{transform:translate(-100%)}to{transform:translate(400%)}}@media(prefers-reduced-motion:reduce){:host>span,:host>.target{transition:none}:host(.indeterminate)>span{animation:none;inline-size:100%}}\n"] }]
88
+ }], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }], max: [{ type: i0.Input, args: [{ isSignal: true, alias: "max", required: false }] }], semantics: [{ type: i0.Input, args: [{ isSignal: true, alias: "semantics", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], indeterminate: [{ type: i0.Input, args: [{ isSignal: true, alias: "indeterminate", required: false }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], target: [{ type: i0.Input, args: [{ isSignal: true, alias: "target", required: false }] }] } });
89
+
90
+ /**
91
+ * Generated bundle index. Do not edit.
92
+ */
93
+
94
+ export { BarComponent };
95
+ //# sourceMappingURL=ids-group-ltd-ids-design-system-components-bar.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ids-group-ltd-ids-design-system-components-bar.mjs","sources":["../../../src/lib/components/bar/bar.component.ts","../../../src/lib/components/bar/bar.component.html","../../../src/lib/components/bar/ids-group-ltd-ids-design-system-components-bar.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n ViewEncapsulation,\n booleanAttribute,\n computed,\n input,\n numberAttribute,\n} from '@angular/core';\nimport type { BarSemantics, BarVariant } from './bar.types';\n\n/**\n * One horizontal track with one fill: a task's completion, or a measurement on a known scale.\n *\n * The two are the same drawing and a different claim, which is what `semantics` carries — the\n * platform splits them the same way, into `<progress>` and `<meter>`. Getting it wrong is not\n * cosmetic: a table of two hundred rates under `'progress'` announces two hundred progress bars.\n */\n@Component({\n selector: 'ds-bar',\n standalone: true,\n imports: [],\n templateUrl: './bar.component.html',\n styleUrl: './bar.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.Emulated,\n host: {\n '[attr.role]': 'role()',\n '[attr.aria-hidden]': \"semantics() === 'none' ? true : null\",\n '[attr.aria-valuemin]': 'role() ? 0 : null',\n '[attr.aria-valuemax]': 'role() ? scale() : null',\n '[attr.aria-valuenow]': 'role() && !isIndet() ? clampedValue() : null',\n '[attr.aria-label]': 'ariaLabel()',\n '[class.success]': \"variant() === 'success'\",\n '[class.warning]': \"variant() === 'warning'\",\n '[class.error]': \"variant() === 'error'\",\n '[class.indeterminate]': 'isIndet()',\n },\n})\nexport class BarComponent {\n /** The reading, in units of `max`; clamped, and ignored while `indeterminate`. */\n readonly value = input(0, { transform: numberAttribute });\n /** The full scale `value` and `target` are read against. Left at 100 they are percentages. Set\n * it to the real total — `[value]=\"37\" [max]=\"80\"` — and the accessible name carries \"37 of 80\"\n * rather than the 46% a caller would otherwise have to compute. For a column of measurements\n * it is usually the column's own largest value, so the longest bar fills its track and the rest\n * are its share. Zero or less falls back to 100, because a scale with no width has no fraction\n * to draw. */\n readonly max = input(100, { transform: numberAttribute });\n /** What the bar is, and therefore how it is announced. See `BarSemantics`. Defaults to\n * `'progress'`. */\n readonly semantics = input<BarSemantics>('progress');\n /** Colour role — drives the success/warning/error styling. */\n readonly variant = input<BarVariant>('default');\n /** Indeterminate (unknown-duration) animation instead of a fixed `value`. Only a task has an\n * unknown duration, so it is ignored unless `semantics` is `'progress'`. */\n readonly indeterminate = input(false, { transform: booleanAttribute });\n /** Overrides the fill for this one bar. A whole column is coloured once through\n * `--ds-bar-fill-color` instead; use this where the colour carries meaning on one row. */\n readonly color = input<string | null>(null);\n /** Accessible name (e.g. \"Upload progress\"). With a `target` set, name the comparison here —\n * the mark is drawn and the role has no second value to announce, so \"Resolved 62% against a\n * 75% target\" is what reaches a screen reader. Unused under `semantics=\"none\"`. */\n readonly ariaLabel = input<string | null>(null);\n /** A second point on the same scale as `value`, drawn as a hairline across the track — a goal,\n * a baseline or a threshold to read `value` against. Clamped like `value`, ignored while\n * `indeterminate`, and unset draws nothing. */\n readonly target = input<number | null>(null);\n\n protected readonly role = computed(() => {\n const semantics = this.semantics();\n\n return semantics === 'none'\n ? null\n : semantics === 'meter'\n ? 'meter'\n : 'progressbar';\n });\n\n protected readonly scale = computed(() => {\n const max = this.max();\n\n return Number.isFinite(max) && max > 0 ? max : 100;\n });\n\n protected readonly clampedValue = computed(() => {\n const value = this.value();\n\n return Number.isFinite(value)\n ? Math.max(0, Math.min(this.scale(), value))\n : 0;\n });\n\n /** Width and offset are percentages of the track whatever the scale is. */\n protected readonly valuePercent = computed(\n () => (this.clampedValue() / this.scale()) * 100,\n );\n\n protected readonly clampedTarget = computed(() => {\n const target = this.target();\n\n return target == null || !Number.isFinite(target)\n ? null\n : Math.max(0, Math.min(this.scale(), target));\n });\n\n protected readonly targetPercent = computed(() => {\n const target = this.clampedTarget();\n\n return target === null ? null : (target / this.scale()) * 100;\n });\n\n protected readonly isIndet = computed(\n () => this.indeterminate() && this.semantics() === 'progress',\n );\n}\n","@if (isIndet()) {\n <span></span>\n} @else {\n <span\n [style.width.%]=\"valuePercent()\"\n [style.background]=\"color()\">\n </span>\n\n @if (targetPercent() !== null) {\n <div\n class=\"target\"\n [style.left.%]=\"targetPercent()\">\n </div>\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;AAWA;;;;;;AAMG;MAsBU,YAAY,CAAA;;IAEd,KAAK,GAAG,KAAK,CAAC,CAAC,6EAAI,SAAS,EAAE,eAAe,EAAA,CAAG;AACzD;;;;;AAKe;IACN,GAAG,GAAG,KAAK,CAAC,GAAG,2EAAI,SAAS,EAAE,eAAe,EAAA,CAAG;AACzD;AACoB;AACX,IAAA,SAAS,GAAG,KAAK,CAAe,UAAU,gFAAC;;AAE3C,IAAA,OAAO,GAAG,KAAK,CAAa,SAAS,8EAAC;AAC/C;AAC6E;IACpE,aAAa,GAAG,KAAK,CAAC,KAAK,qFAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;AACtE;AAC2F;AAClF,IAAA,KAAK,GAAG,KAAK,CAAgB,IAAI,4EAAC;AAC3C;;AAEoF;AAC3E,IAAA,SAAS,GAAG,KAAK,CAAgB,IAAI,gFAAC;AAC/C;;AAEgD;AACvC,IAAA,MAAM,GAAG,KAAK,CAAgB,IAAI,6EAAC;AAEzB,IAAA,IAAI,GAAG,QAAQ,CAAC,MAAK;AACtC,QAAA,MAAM,SAAS,GAAG,IAAI,CAAC,SAAS,EAAE;QAElC,OAA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;AAEG;;;;"}
@@ -44,6 +44,9 @@ const DISCOURAGED_COMBOS = new Map([
44
44
  ],
45
45
  ]);
46
46
  class ButtonComponent extends DsMessageBase {
47
+ // A button is not a form row, so an app-wide `DS_CONFIG.field.reserveMessage` must not give it
48
+ // an empty message line and the column box that comes with it. `[reserveMessage]` still works.
49
+ reserveFollowsFieldDefault = false;
47
50
  // As a group segment the group owns the border, radius and ring, so `.in-group` strips this
48
51
  // control back to its bare contents.
49
52
  inGroup = inFieldGroup();
@@ -1 +1 @@
1
- {"version":3,"file":"ids-group-ltd-ids-design-system-components-button.mjs","sources":["../../../src/lib/components/button/button.component.ts","../../../src/lib/components/button/button.component.html","../../../src/lib/components/button/ids-group-ltd-ids-design-system-components-button.ts"],"sourcesContent":["import {\n Component,\n ElementRef,\n ViewEncapsulation,\n booleanAttribute,\n computed,\n input,\n output,\n signal,\n viewChild,\n} from '@angular/core';\nimport { devWarn } from '@ids-group-ltd/ids-design-system/core';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { RouterLink, RouterLinkActive } from '@angular/router';\nimport type {\n IsActiveMatchOptions,\n Params,\n QueryParamsHandling,\n} from '@angular/router';\nimport { IconComponent } from '@ids-group-ltd/ids-design-system/icons';\nimport type { IconName } from '@ids-group-ltd/ids-design-system/core';\nimport {\n dsAriaCurrent,\n dsDestination,\n} from '@ids-group-ltd/ids-design-system/components';\nimport type {\n DsAriaCurrent,\n DsLinkModifiers,\n DsRouterLink,\n} from '@ids-group-ltd/ids-design-system/components';\nimport type { ButtonColor, ButtonVariant, ButtonType } from './button.types';\nimport type { DsSize } from '@ids-group-ltd/ids-design-system/core';\nimport { inFieldGroup } from '@ids-group-ltd/ids-design-system/components/field-group';\nimport { resolveWithConfig } from '@ids-group-ltd/ids-design-system/core';\nimport { DsMessageBase } from '@ids-group-ltd/ids-design-system/components';\nimport {\n resolveFieldMessage,\n trimmedText,\n type DsFieldError,\n} from '@ids-group-ltd/ids-design-system/components';\nimport { FieldMessageComponent } from '@ids-group-ltd/ids-design-system/components/field-message';\nimport { nextControlId } from '@ids-group-ltd/ids-design-system/components';\n\n// `resolveFieldMessage` reads a form control's validation state; a button has\n// none, so these stand in for the two sources a field feeds in from its control.\nconst NO_ERRORS = signal<readonly DsFieldError[]>([]).asReadonly();\nconst NEVER_INVALID = signal(false).asReadonly();\n\n// Modifiers that only reach the router branch. Read as a tuple so the warning can name the one\n// that was actually set.\nconst ROUTER_ONLY = [\n ['fragment'],\n ['queryParams'],\n ['queryParamsHandling'],\n] as const;\n\n// Discouraged, not blocked — two inputs cannot be narrowed against each other at compile time,\n// so the pair is warned about in dev and still renders.\nconst DISCOURAGED_COMBOS = new Map<string, string>([\n [\n 'neutral|solid',\n 'a solid grey button reads as disabled — prefer tonal/ghost/outline',\n ],\n [\n 'success|ghost',\n 'low-emphasis success rarely warrants an action affordance — prefer solid/tonal',\n ],\n [\n 'success|outline',\n 'low-emphasis success rarely warrants an action affordance — prefer solid/tonal',\n ],\n [\n 'warning|ghost',\n 'yellow at low emphasis is too low-contrast to read — prefer solid/tonal',\n ],\n [\n 'warning|outline',\n 'yellow at low emphasis is too low-contrast to read — prefer solid/tonal',\n ],\n]);\n\n@Component({\n selector: 'ds-button',\n standalone: true,\n imports: [\n IconComponent,\n FieldMessageComponent,\n NgTemplateOutlet,\n RouterLink,\n RouterLinkActive,\n ],\n templateUrl: './button.component.html',\n styleUrl: './button.component.scss',\n encapsulation: ViewEncapsulation.Emulated,\n host: {\n '[class.in-group]': 'inGroup',\n '[class.full-width]': 'fullWidth()',\n // Reflected so a consumer can target one axis without the inner class names, which sit on\n // the inner <button> and are unreachable from a host rule. Styling only.\n '[attr.data-variant]': 'variant()',\n '[attr.data-color]': 'color()',\n '[class.with-message]': 'hasMessageRow()',\n },\n})\nexport class ButtonComponent extends DsMessageBase {\n // As a group segment the group owns the border, radius and ring, so `.in-group` strips this\n // control back to its bare contents.\n protected readonly inGroup = inFieldGroup();\n\n /** Brand/status hue family. */\n readonly color = input<ButtonColor>('primary');\n /** Fill pattern. Every color×variant pair renders; the discouraged ones dev-warn with the\n * reason. `text` is discouraged for every colour — prefer the global `.link` class, and keep\n * this one only where the ds-button API is needed. */\n readonly variant = input<ButtonVariant>('solid');\n /** Button height — sm/md/lg.\n * Unset falls back to `DS_CONFIG.control.size`, then `'md'`. */\n readonly size = input<DsSize | null>(null);\n readonly sizeResolved = resolveWithConfig(\n this.size,\n (config) => config.control?.size,\n 'md' as DsSize,\n );\n /** `RouterLink` target. Set it and the button renders an `<a [routerLink]>` with\n * `routerLinkActive`: middle-click, open-in-new-tab and the announced \"link\" role depend on the\n * element, not on the look.\n *\n * Accepts a `UrlTree` as well as a path or a command array — `Router.createUrlTree` is the way\n * to reach the `UrlCreationOptions` that have no input of their own here (`relativeTo`,\n * `preserveFragment`). */\n readonly routerLink = input<DsRouterLink>(null);\n /** Plain `href` target, used when `routerLink` is not set — an external address or a download.\n * Renders an `<a href>`; same reasoning as `routerLink`. */\n readonly href = input<string>('');\n /** Hash to append to a `routerLink` destination — the section of the page to land on.\n * routerLink-only: on an `href` put it in the URL, and on a plain button it is ignored with a\n * dev warning. */\n readonly fragment = input<string | undefined>(undefined);\n /** Query parameters for a `routerLink` destination. routerLink-only, same as `fragment`. */\n readonly queryParams = input<Params | null | undefined>(undefined);\n /** How the destination's query merges with the current one — `'merge'`, `'preserve'` or\n * `'replace'`. routerLink-only. */\n readonly queryParamsHandling = input<QueryParamsHandling | null | undefined>(\n undefined,\n );\n /** Browsing context for the link — `'_blank'` and the rest. Both link destinations take it; on a\n * plain button it is ignored with a dev warning. */\n readonly target = input<string | undefined>(undefined);\n /** `rel` for the link. Pair it with `target=\"_blank\"`: without `noopener` the opened page can\n * reach back through `window.opener`. Both link destinations take it. */\n readonly rel = input<string | undefined>(undefined);\n /** How `routerLinkActive` decides the `active` CLASS — prefix by default, so a section link\n * stays lit inside its own pages. It also bounds the announcement, because the same directive\n * writes it: narrowed to `{ exact: true }`, a prefix match is no longer active and the link\n * announces nothing rather than `true`. Pass `ariaCurrent` alongside to keep one. */\n readonly routerLinkActiveOptions = input<\n { exact: boolean } | IsActiveMatchOptions\n >({ exact: false });\n /** Overrides what the link announces. Unset, an exact match announces `page` and a prefix match\n * announces `true`, which is what ARIA means by each; pass `null` to announce nothing, or one\n * of the other values when the link is a step or a location rather than a page. */\n readonly ariaCurrent = input<DsAriaCurrent | null | undefined>(undefined);\n /** Native `type`, defaulting to `'button'` so it never submits an ancestor form by accident.\n * Button-only: ignored on a link, with a dev warning. */\n readonly type = input<ButtonType>('button');\n /** Disables the button and blocks `pressed`. */\n readonly disabled = input(false, { transform: booleanAttribute });\n /** Busy state — disables interaction and sets `aria-busy`. Button-only: a navigation cannot be\n * in flight before it starts, so on an anchor it is ignored with a dev-mode warning. */\n readonly loading = input(false, { transform: booleanAttribute });\n /** Stretch to fill the container: the host becomes block-level and 100% wide. */\n readonly fullWidth = input(false, { transform: booleanAttribute });\n /** Accessible name, forwarded as `aria-label`. For an icon-only or non-descriptive label. */\n readonly ariaLabel = input<string | null>(null);\n /** Leading icon, before the projected content. */\n readonly icon = input<IconName | null>(null);\n /** Trailing icon, after the projected content. */\n readonly trailingIcon = input<IconName | null>(null);\n /** ARIA `aria-haspopup`, forwarded to the inner <button> — set when this\n * button triggers a menu/dialog/listbox overlay. */\n readonly ariaHasPopup = input<\n 'true' | 'menu' | 'listbox' | 'tree' | 'grid' | 'dialog' | null\n >(null);\n /** ARIA `aria-expanded`, forwarded to the inner <button> — bind to the\n * overlay's open state on a trigger button. */\n readonly ariaExpanded = input<boolean | null>(null);\n /** ARIA `aria-controls`, forwarded to the inner <button> — the id of the panel\n * this button opens, e.g. `ds-app-layout`'s `railId`. */\n readonly ariaControls = input<string | null>(null);\n /** Why the button is refused, shown as its second line and read only while `disabled`. Setting\n * it also changes HOW the button is disabled — `aria-disabled` instead of the native attribute,\n * because a natively disabled button cannot be focused and the reason would never be announced,\n * so the click is swallowed in `onClick` instead. Uncapped: the text wraps and the button grows.\n * Same name and meaning as `TableRowAction.disabledReason`. */\n readonly disabledReason = input<string, string | null | undefined>('', {\n transform: trimmedText,\n });\n /** ARIA `aria-describedby` — point the button at a description the app renders\n * itself, such as a `ds-field-message` under a form. Merged with the id of\n * `disabledReason` when both are present. */\n readonly ariaDescribedBy = input<string | null>(null);\n /** Fires on click, unless `disabled` or `loading`. */\n readonly pressed = output<MouseEvent>();\n\n /** The inner control, for an overlay trigger to position against and restore focus to. Typed\n * `HTMLElement`, not `HTMLButtonElement`: the element follows the destination. */\n readonly controlRef = viewChild.required<ElementRef<HTMLElement>>('btn');\n\n protected readonly destination = dsDestination(this.routerLink, this.href);\n protected readonly linkModifiers = computed<DsLinkModifiers>(() => ({\n fragment: this.fragment(),\n queryParams: this.queryParams(),\n queryParamsHandling: this.queryParamsHandling(),\n }));\n protected readonly ariaCurrentResolved = dsAriaCurrent(\n this.routerLink,\n this.linkModifiers,\n this.ariaCurrent,\n );\n\n protected readonly classes = computed(() => {\n const color = this.color();\n const variant = this.variant();\n const parts = [\n 'button',\n color === 'primary' ? '' : `c-${color}`,\n variant === 'solid' ? '' : `v-${variant}`,\n this.sizeResolved(),\n this.loading() ? 'loading' : '',\n ];\n\n return parts.filter(Boolean).join(' ');\n });\n\n protected readonly softDisabled = computed(\n () => this.disabled() && this.disabledReason().length > 0,\n );\n\n private readonly uid = nextControlId('ds-button');\n protected readonly reasonId = `${this.uid}-reason`;\n protected readonly hintId = computed(() =>\n this.message().text ? `${this.uid}-hint` : null,\n );\n protected readonly describedBy = computed(() => {\n const ids = [\n this.softDisabled() ? this.reasonId : null,\n this.hintId(),\n this.ariaDescribedBy(),\n ].filter(Boolean);\n\n return ids.length ? ids.join(' ') : null;\n });\n\n protected readonly hasMessageRow = computed(\n () => this.message().text.length > 0 || this.reserveMessageResolved(),\n );\n\n private readonly fieldMessage = resolveFieldMessage({\n hint: this.hint,\n warning: this.warning,\n error: this.error,\n errors: NO_ERRORS,\n invalid: NEVER_INVALID,\n });\n protected readonly message = this.fieldMessage.message;\n\n constructor() {\n super();\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n devWarn(() => {\n const variant = this.variant();\n if (variant === 'text') {\n return '[ds-button] variant=\"text\" is discouraged — prefer the global `.link` class for link-styled actions. It renders, but `.link` is the canonical link affordance.';\n }\n const destination = this.destination();\n if (destination !== 'button') {\n if (this.loading()) {\n return '[ds-button] `loading` is ignored on a link-button — a navigation cannot be in flight before it starts. Remove it, or drop the destination and emit `(pressed)` instead.';\n }\n if (this.type() !== 'button') {\n return `[ds-button] type=\"${this.type()}\" is ignored on a link-button — an anchor has no form to submit. Drop the destination to submit a form.`;\n }\n }\n if (destination !== 'routerLink') {\n const routed = ROUTER_ONLY.find(\n ([name]) => this[name]() !== undefined,\n );\n if (routed) {\n return `[ds-button] \\`${routed[0]}\\` only applies to a \\`routerLink\\` destination${destination === 'href' ? ' — put it in the `href` URL instead' : ''}.`;\n }\n }\n if (destination === 'button' && (this.target() || this.rel())) {\n return '[ds-button] `target` and `rel` need a destination — set `routerLink` or `href`, or drop them.';\n }\n const reason = DISCOURAGED_COMBOS.get(`${this.color()}|${variant}`);\n\n return reason\n ? `[ds-button] color=\"${this.color()}\" variant=\"${variant}\" is a UX-discouraged combination — it renders, but ${reason}.`\n : null;\n });\n }\n }\n\n protected onClick(event: MouseEvent): void {\n // A soft-disabled button is only `aria-disabled`, so the browser still\n // dispatches the click — this is what stops it.\n if (this.disabled() || this.loading()) {\n // The routerLink branch binds `null`; an `<a href>` still navigates.\n if (this.destination() === 'href') {\n event.preventDefault();\n }\n\n return;\n }\n this.pressed.emit(event);\n }\n}\n","<!-- Every branch must keep #btn: `controlRef` is required, so dropping it leaves that destination\n throwing. `type`, `loading` and the native `disabled` are button-only, which is why the\n anchors take `aria-disabled` and `tabindex=\"-1\"` instead. -->\n@switch (destination()) {\n @case ('routerLink') {\n <a\n #btn\n routerLinkActive=\"active\"\n [class]=\"classes()\"\n [routerLink]=\"disabled() ? null : routerLink()\"\n [routerLinkActiveOptions]=\"routerLinkActiveOptions()\"\n [fragment]=\"fragment()\"\n [queryParams]=\"queryParams()\"\n [queryParamsHandling]=\"queryParamsHandling()\"\n [target]=\"target()\"\n [attr.rel]=\"rel()\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-haspopup]=\"ariaHasPopup()\"\n [attr.aria-expanded]=\"ariaExpanded()\"\n [attr.aria-controls]=\"ariaControls()\"\n [ariaCurrentWhenActive]=\"ariaCurrentResolved()\"\n [attr.aria-disabled]=\"disabled() ? 'true' : null\"\n [attr.tabindex]=\"disabled() ? -1 : null\"\n [attr.aria-describedby]=\"describedBy()\"\n (click)=\"onClick($event)\">\n <ng-container [ngTemplateOutlet]=\"content\" />\n </a>\n }\n @case ('href') {\n <a\n #btn\n [class]=\"classes()\"\n [href]=\"href()\"\n [attr.target]=\"target()\"\n [attr.rel]=\"rel()\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-haspopup]=\"ariaHasPopup()\"\n [attr.aria-expanded]=\"ariaExpanded()\"\n [attr.aria-controls]=\"ariaControls()\"\n [attr.aria-disabled]=\"disabled() ? 'true' : null\"\n [attr.tabindex]=\"disabled() ? -1 : null\"\n [attr.aria-describedby]=\"describedBy()\"\n (click)=\"onClick($event)\">\n <ng-container [ngTemplateOutlet]=\"content\" />\n </a>\n }\n @default {\n <button\n #btn\n [class]=\"classes()\"\n [type]=\"type()\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-haspopup]=\"ariaHasPopup()\"\n [attr.aria-expanded]=\"ariaExpanded()\"\n [attr.aria-controls]=\"ariaControls()\"\n [attr.aria-busy]=\"loading() ? 'true' : null\"\n [attr.aria-disabled]=\"softDisabled() ? 'true' : null\"\n [attr.aria-describedby]=\"describedBy()\"\n [disabled]=\"(disabled() || loading()) && !softDisabled()\"\n (click)=\"onClick($event)\">\n <ng-container [ngTemplateOutlet]=\"content\" />\n </button>\n }\n}\n\n<ng-template #content>\n <span class=\"button-main\">\n @if (icon(); as name) {\n <ds-icon [name]=\"name\" />\n }\n\n <ng-content></ng-content>\n\n @if (trailingIcon(); as name) {\n <ds-icon [name]=\"name\" />\n }\n </span>\n\n <span class=\"subtext-slot\">\n <ng-content select=\"[dsButtonSubtext]\"></ng-content>\n </span>\n\n @if (softDisabled()) {\n <!-- aria-hidden keeps the reason out of the button's accessible NAME; the\n aria-describedby above still reaches it, because a node referenced\n directly is read even when hidden. -->\n <span\n class=\"reason\"\n aria-hidden=\"true\"\n [id]=\"reasonId\">\n {{ disabledReason() }}\n </span>\n }\n</ng-template>\n\n<ds-field-message\n [icon]=\"messageIcon()\"\n [text]=\"message().text\"\n [state]=\"message().state\"\n [messageId]=\"hintId()\"\n [reserve]=\"reserveMessageResolved()\" />\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;AA2CA;AACA;AACA,MAAM,SAAS,GAAG,MAAM,CAA0B,EAAE,CAAC,CAAC,UAAU,EAAE;AAClE,MAAM,aAAa,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC,UAAU,EAAE;AAEhD;AACA;AACA,MAAM,WAAW,GAAG;AAClB,IAAA,CAAC,UAAU,CAAC;AACZ,IAAA,CAAC,aAAa,CAAC;AACf,IAAA,CAAC,qBAAqB,CAAC;CACf;AAEV;AACA;AACA,MAAM,kBAAkB,GAAG,IAAI,GAAG,CAAiB;AACjD,IAAA;QACE,eAAe;QACf,oEAAoE;AACrE,KAAA;AACD,IAAA;QACE,eAAe;QACf,gFAAgF;AACjF,KAAA;AACD,IAAA;QACE,iBAAiB;QACjB,gFAAgF;AACjF,KAAA;AACD,IAAA;QACE,eAAe;QACf,yEAAyE;AAC1E,KAAA;AACD,IAAA;QACE,iBAAiB;QACjB,yEAAyE;AAC1E,KAAA;AACF,CAAA,CAAC;AAyBI,MAAO,eAAgB,SAAQ,aAAa,CAAA;;;IAG7B,OAAO,GAAG,YAAY,EAAE;;AAGlC,IAAA,KAAK,GAAG,KAAK,CAAc,SAAS,4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W,EAAA,UAAA,EACT,IAAI,EAAA,OAAA,EACP;wBACP,aAAa;wBACb,qBAAqB;wBACrB,gBAAgB;wBAChB,UAAU;wBACV,gBAAgB;qBACjB,EAAA,aAAA,EAGc,iBAAiB,CAAC,QAAQ,EAAA,IAAA,EACnC;AACJ,wBAAA,kBAAkB,EAAE,SAAS;AAC7B,wBAAA,oBAAoB,EAAE,aAAa;;;AAGnC,wBAAA,qBAAqB,EAAE,WAAW;AAClC,wBAAA,mBAAmB,EAAE,SAAS;AAC9B,wBAAA,sBAAsB,EAAE,iBAAiB;AAC1C,qBAAA,EAAA,QAAA,EAAA,myGAAA,EAAA,MAAA,EAAA,CAAA,6wXAAA,CAAA,EAAA;+9EAwGiE,KAAK,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AE9MzE;;AAEG;;;;"}
1
+ {"version":3,"file":"ids-group-ltd-ids-design-system-components-button.mjs","sources":["../../../src/lib/components/button/button.component.ts","../../../src/lib/components/button/button.component.html","../../../src/lib/components/button/ids-group-ltd-ids-design-system-components-button.ts"],"sourcesContent":["import {\n Component,\n ElementRef,\n ViewEncapsulation,\n booleanAttribute,\n computed,\n input,\n output,\n signal,\n viewChild,\n} from '@angular/core';\nimport { devWarn } from '@ids-group-ltd/ids-design-system/core';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { RouterLink, RouterLinkActive } from '@angular/router';\nimport type {\n IsActiveMatchOptions,\n Params,\n QueryParamsHandling,\n} from '@angular/router';\nimport { IconComponent } from '@ids-group-ltd/ids-design-system/icons';\nimport type { IconName } from '@ids-group-ltd/ids-design-system/core';\nimport {\n dsAriaCurrent,\n dsDestination,\n} from '@ids-group-ltd/ids-design-system/components';\nimport type {\n DsAriaCurrent,\n DsLinkModifiers,\n DsRouterLink,\n} from '@ids-group-ltd/ids-design-system/components';\nimport type { ButtonColor, ButtonVariant, ButtonType } from './button.types';\nimport type { DsSize } from '@ids-group-ltd/ids-design-system/core';\nimport { inFieldGroup } from '@ids-group-ltd/ids-design-system/components/field-group';\nimport { resolveWithConfig } from '@ids-group-ltd/ids-design-system/core';\nimport { DsMessageBase } from '@ids-group-ltd/ids-design-system/components';\nimport {\n resolveFieldMessage,\n trimmedText,\n type DsFieldError,\n} from '@ids-group-ltd/ids-design-system/components';\nimport { FieldMessageComponent } from '@ids-group-ltd/ids-design-system/components/field-message';\nimport { nextControlId } from '@ids-group-ltd/ids-design-system/components';\n\n// `resolveFieldMessage` reads a form control's validation state; a button has\n// none, so these stand in for the two sources a field feeds in from its control.\nconst NO_ERRORS = signal<readonly DsFieldError[]>([]).asReadonly();\nconst NEVER_INVALID = signal(false).asReadonly();\n\n// Modifiers that only reach the router branch. Read as a tuple so the warning can name the one\n// that was actually set.\nconst ROUTER_ONLY = [\n ['fragment'],\n ['queryParams'],\n ['queryParamsHandling'],\n] as const;\n\n// Discouraged, not blocked — two inputs cannot be narrowed against each other at compile time,\n// so the pair is warned about in dev and still renders.\nconst DISCOURAGED_COMBOS = new Map<string, string>([\n [\n 'neutral|solid',\n 'a solid grey button reads as disabled — prefer tonal/ghost/outline',\n ],\n [\n 'success|ghost',\n 'low-emphasis success rarely warrants an action affordance — prefer solid/tonal',\n ],\n [\n 'success|outline',\n 'low-emphasis success rarely warrants an action affordance — prefer solid/tonal',\n ],\n [\n 'warning|ghost',\n 'yellow at low emphasis is too low-contrast to read — prefer solid/tonal',\n ],\n [\n 'warning|outline',\n 'yellow at low emphasis is too low-contrast to read — prefer solid/tonal',\n ],\n]);\n\n@Component({\n selector: 'ds-button',\n standalone: true,\n imports: [\n IconComponent,\n FieldMessageComponent,\n NgTemplateOutlet,\n RouterLink,\n RouterLinkActive,\n ],\n templateUrl: './button.component.html',\n styleUrl: './button.component.scss',\n encapsulation: ViewEncapsulation.Emulated,\n host: {\n '[class.in-group]': 'inGroup',\n '[class.full-width]': 'fullWidth()',\n // Reflected so a consumer can target one axis without the inner class names, which sit on\n // the inner <button> and are unreachable from a host rule. Styling only.\n '[attr.data-variant]': 'variant()',\n '[attr.data-color]': 'color()',\n '[class.with-message]': 'hasMessageRow()',\n },\n})\nexport class ButtonComponent extends DsMessageBase {\n // A button is not a form row, so an app-wide `DS_CONFIG.field.reserveMessage` must not give it\n // an empty message line and the column box that comes with it. `[reserveMessage]` still works.\n protected override readonly reserveFollowsFieldDefault = false;\n\n // As a group segment the group owns the border, radius and ring, so `.in-group` strips this\n // control back to its bare contents.\n protected readonly inGroup = inFieldGroup();\n\n /** Brand/status hue family. */\n readonly color = input<ButtonColor>('primary');\n /** Fill pattern. Every color×variant pair renders; the discouraged ones dev-warn with the\n * reason. `text` is discouraged for every colour — prefer the global `.link` class, and keep\n * this one only where the ds-button API is needed. */\n readonly variant = input<ButtonVariant>('solid');\n /** Button height — sm/md/lg.\n * Unset falls back to `DS_CONFIG.control.size`, then `'md'`. */\n readonly size = input<DsSize | null>(null);\n readonly sizeResolved = resolveWithConfig(\n this.size,\n (config) => config.control?.size,\n 'md' as DsSize,\n );\n /** `RouterLink` target. Set it and the button renders an `<a [routerLink]>` with\n * `routerLinkActive`: middle-click, open-in-new-tab and the announced \"link\" role depend on the\n * element, not on the look.\n *\n * Accepts a `UrlTree` as well as a path or a command array — `Router.createUrlTree` is the way\n * to reach the `UrlCreationOptions` that have no input of their own here (`relativeTo`,\n * `preserveFragment`). */\n readonly routerLink = input<DsRouterLink>(null);\n /** Plain `href` target, used when `routerLink` is not set — an external address or a download.\n * Renders an `<a href>`; same reasoning as `routerLink`. */\n readonly href = input<string>('');\n /** Hash to append to a `routerLink` destination — the section of the page to land on.\n * routerLink-only: on an `href` put it in the URL, and on a plain button it is ignored with a\n * dev warning. */\n readonly fragment = input<string | undefined>(undefined);\n /** Query parameters for a `routerLink` destination. routerLink-only, same as `fragment`. */\n readonly queryParams = input<Params | null | undefined>(undefined);\n /** How the destination's query merges with the current one — `'merge'`, `'preserve'` or\n * `'replace'`. routerLink-only. */\n readonly queryParamsHandling = input<QueryParamsHandling | null | undefined>(\n undefined,\n );\n /** Browsing context for the link — `'_blank'` and the rest. Both link destinations take it; on a\n * plain button it is ignored with a dev warning. */\n readonly target = input<string | undefined>(undefined);\n /** `rel` for the link. Pair it with `target=\"_blank\"`: without `noopener` the opened page can\n * reach back through `window.opener`. Both link destinations take it. */\n readonly rel = input<string | undefined>(undefined);\n /** How `routerLinkActive` decides the `active` CLASS — prefix by default, so a section link\n * stays lit inside its own pages. It also bounds the announcement, because the same directive\n * writes it: narrowed to `{ exact: true }`, a prefix match is no longer active and the link\n * announces nothing rather than `true`. Pass `ariaCurrent` alongside to keep one. */\n readonly routerLinkActiveOptions = input<\n { exact: boolean } | IsActiveMatchOptions\n >({ exact: false });\n /** Overrides what the link announces. Unset, an exact match announces `page` and a prefix match\n * announces `true`, which is what ARIA means by each; pass `null` to announce nothing, or one\n * of the other values when the link is a step or a location rather than a page. */\n readonly ariaCurrent = input<DsAriaCurrent | null | undefined>(undefined);\n /** Native `type`, defaulting to `'button'` so it never submits an ancestor form by accident.\n * Button-only: ignored on a link, with a dev warning. */\n readonly type = input<ButtonType>('button');\n /** Disables the button and blocks `pressed`. */\n readonly disabled = input(false, { transform: booleanAttribute });\n /** Busy state — disables interaction and sets `aria-busy`. Button-only: a navigation cannot be\n * in flight before it starts, so on an anchor it is ignored with a dev-mode warning. */\n readonly loading = input(false, { transform: booleanAttribute });\n /** Stretch to fill the container: the host becomes block-level and 100% wide. */\n readonly fullWidth = input(false, { transform: booleanAttribute });\n /** Accessible name, forwarded as `aria-label`. For an icon-only or non-descriptive label. */\n readonly ariaLabel = input<string | null>(null);\n /** Leading icon, before the projected content. */\n readonly icon = input<IconName | null>(null);\n /** Trailing icon, after the projected content. */\n readonly trailingIcon = input<IconName | null>(null);\n /** ARIA `aria-haspopup`, forwarded to the inner <button> — set when this\n * button triggers a menu/dialog/listbox overlay. */\n readonly ariaHasPopup = input<\n 'true' | 'menu' | 'listbox' | 'tree' | 'grid' | 'dialog' | null\n >(null);\n /** ARIA `aria-expanded`, forwarded to the inner <button> — bind to the\n * overlay's open state on a trigger button. */\n readonly ariaExpanded = input<boolean | null>(null);\n /** ARIA `aria-controls`, forwarded to the inner <button> — the id of the panel\n * this button opens, e.g. `ds-app-layout`'s `railId`. */\n readonly ariaControls = input<string | null>(null);\n /** Why the button is refused, shown as its second line and read only while `disabled`. Setting\n * it also changes HOW the button is disabled — `aria-disabled` instead of the native attribute,\n * because a natively disabled button cannot be focused and the reason would never be announced,\n * so the click is swallowed in `onClick` instead. Uncapped: the text wraps and the button grows.\n * Same name and meaning as `TableRowAction.disabledReason`. */\n readonly disabledReason = input<string, string | null | undefined>('', {\n transform: trimmedText,\n });\n /** ARIA `aria-describedby` — point the button at a description the app renders\n * itself, such as a `ds-field-message` under a form. Merged with the id of\n * `disabledReason` when both are present. */\n readonly ariaDescribedBy = input<string | null>(null);\n /** Fires on click, unless `disabled` or `loading`. */\n readonly pressed = output<MouseEvent>();\n\n /** The inner control, for an overlay trigger to position against and restore focus to. Typed\n * `HTMLElement`, not `HTMLButtonElement`: the element follows the destination. */\n readonly controlRef = viewChild.required<ElementRef<HTMLElement>>('btn');\n\n protected readonly destination = dsDestination(this.routerLink, this.href);\n protected readonly linkModifiers = computed<DsLinkModifiers>(() => ({\n fragment: this.fragment(),\n queryParams: this.queryParams(),\n queryParamsHandling: this.queryParamsHandling(),\n }));\n protected readonly ariaCurrentResolved = dsAriaCurrent(\n this.routerLink,\n this.linkModifiers,\n this.ariaCurrent,\n );\n\n protected readonly classes = computed(() => {\n const color = this.color();\n const variant = this.variant();\n const parts = [\n 'button',\n color === 'primary' ? '' : `c-${color}`,\n variant === 'solid' ? '' : `v-${variant}`,\n this.sizeResolved(),\n this.loading() ? 'loading' : '',\n ];\n\n return parts.filter(Boolean).join(' ');\n });\n\n protected readonly softDisabled = computed(\n () => this.disabled() && this.disabledReason().length > 0,\n );\n\n private readonly uid = nextControlId('ds-button');\n protected readonly reasonId = `${this.uid}-reason`;\n protected readonly hintId = computed(() =>\n this.message().text ? `${this.uid}-hint` : null,\n );\n protected readonly describedBy = computed(() => {\n const ids = [\n this.softDisabled() ? this.reasonId : null,\n this.hintId(),\n this.ariaDescribedBy(),\n ].filter(Boolean);\n\n return ids.length ? ids.join(' ') : null;\n });\n\n protected readonly hasMessageRow = computed(\n () => this.message().text.length > 0 || this.reserveMessageResolved(),\n );\n\n private readonly fieldMessage = resolveFieldMessage({\n hint: this.hint,\n warning: this.warning,\n error: this.error,\n errors: NO_ERRORS,\n invalid: NEVER_INVALID,\n });\n protected readonly message = this.fieldMessage.message;\n\n constructor() {\n super();\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n devWarn(() => {\n const variant = this.variant();\n if (variant === 'text') {\n return '[ds-button] variant=\"text\" is discouraged — prefer the global `.link` class for link-styled actions. It renders, but `.link` is the canonical link affordance.';\n }\n const destination = this.destination();\n if (destination !== 'button') {\n if (this.loading()) {\n return '[ds-button] `loading` is ignored on a link-button — a navigation cannot be in flight before it starts. Remove it, or drop the destination and emit `(pressed)` instead.';\n }\n if (this.type() !== 'button') {\n return `[ds-button] type=\"${this.type()}\" is ignored on a link-button — an anchor has no form to submit. Drop the destination to submit a form.`;\n }\n }\n if (destination !== 'routerLink') {\n const routed = ROUTER_ONLY.find(\n ([name]) => this[name]() !== undefined,\n );\n if (routed) {\n return `[ds-button] \\`${routed[0]}\\` only applies to a \\`routerLink\\` destination${destination === 'href' ? ' — put it in the `href` URL instead' : ''}.`;\n }\n }\n if (destination === 'button' && (this.target() || this.rel())) {\n return '[ds-button] `target` and `rel` need a destination — set `routerLink` or `href`, or drop them.';\n }\n const reason = DISCOURAGED_COMBOS.get(`${this.color()}|${variant}`);\n\n return reason\n ? `[ds-button] color=\"${this.color()}\" variant=\"${variant}\" is a UX-discouraged combination — it renders, but ${reason}.`\n : null;\n });\n }\n }\n\n protected onClick(event: MouseEvent): void {\n // A soft-disabled button is only `aria-disabled`, so the browser still\n // dispatches the click — this is what stops it.\n if (this.disabled() || this.loading()) {\n // The routerLink branch binds `null`; an `<a href>` still navigates.\n if (this.destination() === 'href') {\n event.preventDefault();\n }\n\n return;\n }\n this.pressed.emit(event);\n }\n}\n","<!-- Every branch must keep #btn: `controlRef` is required, so dropping it leaves that destination\n throwing. `type`, `loading` and the native `disabled` are button-only, which is why the\n anchors take `aria-disabled` and `tabindex=\"-1\"` instead. -->\n@switch (destination()) {\n @case ('routerLink') {\n <a\n #btn\n routerLinkActive=\"active\"\n [class]=\"classes()\"\n [routerLink]=\"disabled() ? null : routerLink()\"\n [routerLinkActiveOptions]=\"routerLinkActiveOptions()\"\n [fragment]=\"fragment()\"\n [queryParams]=\"queryParams()\"\n [queryParamsHandling]=\"queryParamsHandling()\"\n [target]=\"target()\"\n [attr.rel]=\"rel()\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-haspopup]=\"ariaHasPopup()\"\n [attr.aria-expanded]=\"ariaExpanded()\"\n [attr.aria-controls]=\"ariaControls()\"\n [ariaCurrentWhenActive]=\"ariaCurrentResolved()\"\n [attr.aria-disabled]=\"disabled() ? 'true' : null\"\n [attr.tabindex]=\"disabled() ? -1 : null\"\n [attr.aria-describedby]=\"describedBy()\"\n (click)=\"onClick($event)\">\n <ng-container [ngTemplateOutlet]=\"content\" />\n </a>\n }\n @case ('href') {\n <a\n #btn\n [class]=\"classes()\"\n [href]=\"href()\"\n [attr.target]=\"target()\"\n [attr.rel]=\"rel()\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-haspopup]=\"ariaHasPopup()\"\n [attr.aria-expanded]=\"ariaExpanded()\"\n [attr.aria-controls]=\"ariaControls()\"\n [attr.aria-disabled]=\"disabled() ? 'true' : null\"\n [attr.tabindex]=\"disabled() ? -1 : null\"\n [attr.aria-describedby]=\"describedBy()\"\n (click)=\"onClick($event)\">\n <ng-container [ngTemplateOutlet]=\"content\" />\n </a>\n }\n @default {\n <button\n #btn\n [class]=\"classes()\"\n [type]=\"type()\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-haspopup]=\"ariaHasPopup()\"\n [attr.aria-expanded]=\"ariaExpanded()\"\n [attr.aria-controls]=\"ariaControls()\"\n [attr.aria-busy]=\"loading() ? 'true' : null\"\n [attr.aria-disabled]=\"softDisabled() ? 'true' : null\"\n [attr.aria-describedby]=\"describedBy()\"\n [disabled]=\"(disabled() || loading()) && !softDisabled()\"\n (click)=\"onClick($event)\">\n <ng-container [ngTemplateOutlet]=\"content\" />\n </button>\n }\n}\n\n<ng-template #content>\n <span class=\"button-main\">\n @if (icon(); as name) {\n <ds-icon [name]=\"name\" />\n }\n\n <ng-content></ng-content>\n\n @if (trailingIcon(); as name) {\n <ds-icon [name]=\"name\" />\n }\n </span>\n\n <span class=\"subtext-slot\">\n <ng-content select=\"[dsButtonSubtext]\"></ng-content>\n </span>\n\n @if (softDisabled()) {\n <!-- aria-hidden keeps the reason out of the button's accessible NAME; the\n aria-describedby above still reaches it, because a node referenced\n directly is read even when hidden. -->\n <span\n class=\"reason\"\n aria-hidden=\"true\"\n [id]=\"reasonId\">\n {{ disabledReason() }}\n </span>\n }\n</ng-template>\n\n<ds-field-message\n [icon]=\"messageIcon()\"\n [text]=\"message().text\"\n [state]=\"message().state\"\n [messageId]=\"hintId()\"\n [reserve]=\"reserveMessageResolved()\" />\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;AA2CA;AACA;AACA,MAAM,SAAS,GAAG,MAAM,CAA0B,EAAE,CAAC,CAAC,UAAU,EAAE;AAClE,MAAM,aAAa,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC,UAAU,EAAE;AAEhD;AACA;AACA,MAAM,WAAW,GAAG;AAClB,IAAA,CAAC,UAAU,CAAC;AACZ,IAAA,CAAC,aAAa,CAAC;AACf,IAAA,CAAC,qBAAqB,CAAC;CACf;AAEV;AACA;AACA,MAAM,kBAAkB,GAAG,IAAI,GAAG,CAAiB;AACjD,IAAA;QACE,eAAe;QACf,oEAAoE;A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