@ids-group-ltd/ids-design-system 0.13.0 → 0.13.2

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 (104) hide show
  1. package/CHANGELOG.md +656 -3
  2. package/components.md +32 -11
  3. package/docs/agent/INDEX.md +2 -0
  4. package/docs/agent/charts/ds-bar-chart.md +1 -1
  5. package/docs/agent/charts/ds-column-chart.md +1 -1
  6. package/docs/agent/charts/ds-config.md +12 -0
  7. package/docs/agent/charts/ds-donut-chart.md +2 -2
  8. package/docs/agent/charts/ds-funnel-chart.md +1 -1
  9. package/docs/agent/charts/ds-line-chart.md +3 -2
  10. package/docs/agent/feedback/ds-meter.md +11 -0
  11. package/docs/agent/feedback/ds-progress.md +4 -1
  12. package/docs/agent/forms/ds-button.md +1 -1
  13. package/docs/agent/forms/ds-icon-button.md +1 -1
  14. package/docs/agent/surfaces/ds-card.md +1 -1
  15. package/fesm2022/ids-group-ltd-ids-design-system-components-accordion.mjs +2 -2
  16. package/fesm2022/ids-group-ltd-ids-design-system-components-accordion.mjs.map +1 -1
  17. package/fesm2022/ids-group-ltd-ids-design-system-components-alert.mjs +2 -2
  18. package/fesm2022/ids-group-ltd-ids-design-system-components-alert.mjs.map +1 -1
  19. package/fesm2022/ids-group-ltd-ids-design-system-components-autocomplete.mjs +9 -4
  20. package/fesm2022/ids-group-ltd-ids-design-system-components-autocomplete.mjs.map +1 -1
  21. package/fesm2022/ids-group-ltd-ids-design-system-components-banner.mjs +2 -2
  22. package/fesm2022/ids-group-ltd-ids-design-system-components-banner.mjs.map +1 -1
  23. package/fesm2022/ids-group-ltd-ids-design-system-components-bar-chart.mjs +100 -15
  24. package/fesm2022/ids-group-ltd-ids-design-system-components-bar-chart.mjs.map +1 -1
  25. package/fesm2022/ids-group-ltd-ids-design-system-components-bottom-sheet.mjs +2 -2
  26. package/fesm2022/ids-group-ltd-ids-design-system-components-bottom-sheet.mjs.map +1 -1
  27. package/fesm2022/ids-group-ltd-ids-design-system-components-button.mjs +3 -0
  28. package/fesm2022/ids-group-ltd-ids-design-system-components-button.mjs.map +1 -1
  29. package/fesm2022/ids-group-ltd-ids-design-system-components-chart-legend.mjs +47 -5
  30. package/fesm2022/ids-group-ltd-ids-design-system-components-chart-legend.mjs.map +1 -1
  31. package/fesm2022/ids-group-ltd-ids-design-system-components-chart-tooltip.mjs +155 -21
  32. package/fesm2022/ids-group-ltd-ids-design-system-components-chart-tooltip.mjs.map +1 -1
  33. package/fesm2022/ids-group-ltd-ids-design-system-components-color-picker.mjs +9 -4
  34. package/fesm2022/ids-group-ltd-ids-design-system-components-color-picker.mjs.map +1 -1
  35. package/fesm2022/ids-group-ltd-ids-design-system-components-column-chart.mjs +81 -18
  36. package/fesm2022/ids-group-ltd-ids-design-system-components-column-chart.mjs.map +1 -1
  37. package/fesm2022/ids-group-ltd-ids-design-system-components-date-picker.mjs +9 -4
  38. package/fesm2022/ids-group-ltd-ids-design-system-components-date-picker.mjs.map +1 -1
  39. package/fesm2022/ids-group-ltd-ids-design-system-components-donut-chart.mjs +75 -23
  40. package/fesm2022/ids-group-ltd-ids-design-system-components-donut-chart.mjs.map +1 -1
  41. package/fesm2022/ids-group-ltd-ids-design-system-components-drawer.mjs +2 -1
  42. package/fesm2022/ids-group-ltd-ids-design-system-components-drawer.mjs.map +1 -1
  43. package/fesm2022/ids-group-ltd-ids-design-system-components-empty-state.mjs +2 -2
  44. package/fesm2022/ids-group-ltd-ids-design-system-components-empty-state.mjs.map +1 -1
  45. package/fesm2022/ids-group-ltd-ids-design-system-components-funnel-chart.mjs +107 -19
  46. package/fesm2022/ids-group-ltd-ids-design-system-components-funnel-chart.mjs.map +1 -1
  47. package/fesm2022/ids-group-ltd-ids-design-system-components-line-chart.mjs +236 -31
  48. package/fesm2022/ids-group-ltd-ids-design-system-components-line-chart.mjs.map +1 -1
  49. package/fesm2022/ids-group-ltd-ids-design-system-components-list.mjs +2 -1
  50. package/fesm2022/ids-group-ltd-ids-design-system-components-list.mjs.map +1 -1
  51. package/fesm2022/ids-group-ltd-ids-design-system-components-meter.mjs +61 -0
  52. package/fesm2022/ids-group-ltd-ids-design-system-components-meter.mjs.map +1 -0
  53. package/fesm2022/ids-group-ltd-ids-design-system-components-modal.mjs +4 -4
  54. package/fesm2022/ids-group-ltd-ids-design-system-components-modal.mjs.map +1 -1
  55. package/fesm2022/ids-group-ltd-ids-design-system-components-multi-select.mjs +9 -4
  56. package/fesm2022/ids-group-ltd-ids-design-system-components-multi-select.mjs.map +1 -1
  57. package/fesm2022/ids-group-ltd-ids-design-system-components-page-header.mjs +2 -2
  58. package/fesm2022/ids-group-ltd-ids-design-system-components-page-header.mjs.map +1 -1
  59. package/fesm2022/ids-group-ltd-ids-design-system-components-pagination.mjs +1 -1
  60. package/fesm2022/ids-group-ltd-ids-design-system-components-pagination.mjs.map +1 -1
  61. package/fesm2022/ids-group-ltd-ids-design-system-components-progress.mjs +34 -10
  62. package/fesm2022/ids-group-ltd-ids-design-system-components-progress.mjs.map +1 -1
  63. package/fesm2022/ids-group-ltd-ids-design-system-components-select.mjs +9 -4
  64. package/fesm2022/ids-group-ltd-ids-design-system-components-select.mjs.map +1 -1
  65. package/fesm2022/ids-group-ltd-ids-design-system-components-table.mjs +2 -2
  66. package/fesm2022/ids-group-ltd-ids-design-system-components-table.mjs.map +1 -1
  67. package/fesm2022/ids-group-ltd-ids-design-system-components-time-picker.mjs +9 -4
  68. package/fesm2022/ids-group-ltd-ids-design-system-components-time-picker.mjs.map +1 -1
  69. package/fesm2022/ids-group-ltd-ids-design-system-components-toast.mjs +2 -2
  70. package/fesm2022/ids-group-ltd-ids-design-system-components-toast.mjs.map +1 -1
  71. package/fesm2022/ids-group-ltd-ids-design-system-components.mjs +119 -13
  72. package/fesm2022/ids-group-ltd-ids-design-system-components.mjs.map +1 -1
  73. package/fesm2022/ids-group-ltd-ids-design-system-core.mjs.map +1 -1
  74. package/fesm2022/ids-group-ltd-ids-design-system.mjs +1 -0
  75. package/fesm2022/ids-group-ltd-ids-design-system.mjs.map +1 -1
  76. package/migrations/0.13.1.json +236 -0
  77. package/migrations/0.13.2.json +269 -0
  78. package/package.json +9 -1
  79. package/styles/_chart-frame.scss +116 -4
  80. package/styles/_chart-interactive.scss +27 -7
  81. package/styles/_chart-motion.scss +61 -18
  82. package/styles/_dropdown-overlay.scss +9 -3
  83. package/styles/_focus.scss +10 -1
  84. package/styles/_overlay-motion.scss +11 -1
  85. package/styles/_tokens-charts.scss +5 -0
  86. package/types/ids-group-ltd-ids-design-system-components-autocomplete.d.ts +6 -1
  87. package/types/ids-group-ltd-ids-design-system-components-bar-chart.d.ts +87 -10
  88. package/types/ids-group-ltd-ids-design-system-components-button.d.ts +1 -0
  89. package/types/ids-group-ltd-ids-design-system-components-chart-legend.d.ts +25 -2
  90. package/types/ids-group-ltd-ids-design-system-components-chart-tooltip.d.ts +23 -3
  91. package/types/ids-group-ltd-ids-design-system-components-color-picker.d.ts +6 -1
  92. package/types/ids-group-ltd-ids-design-system-components-column-chart.d.ts +60 -9
  93. package/types/ids-group-ltd-ids-design-system-components-date-picker.d.ts +6 -1
  94. package/types/ids-group-ltd-ids-design-system-components-donut-chart.d.ts +53 -13
  95. package/types/ids-group-ltd-ids-design-system-components-funnel-chart.d.ts +73 -11
  96. package/types/ids-group-ltd-ids-design-system-components-line-chart.d.ts +116 -12
  97. package/types/ids-group-ltd-ids-design-system-components-meter.d.ts +36 -0
  98. package/types/ids-group-ltd-ids-design-system-components-multi-select.d.ts +6 -1
  99. package/types/ids-group-ltd-ids-design-system-components-progress.d.ts +21 -3
  100. package/types/ids-group-ltd-ids-design-system-components-select.d.ts +6 -1
  101. package/types/ids-group-ltd-ids-design-system-components-time-picker.d.ts +6 -1
  102. package/types/ids-group-ltd-ids-design-system-components.d.ts +47 -5
  103. package/types/ids-group-ltd-ids-design-system-core.d.ts +40 -1
  104. package/types/ids-group-ltd-ids-design-system.d.ts +6 -5
@@ -1 +1 @@
1
- {"version":3,"file":"ids-group-ltd-ids-design-system-components-column-chart.mjs","sources":["../../../src/lib/components/column-chart/column-chart.math.ts","../../../src/lib/components/column-chart/column-chart.component.ts","../../../src/lib/components/column-chart/column-chart.component.html","../../../src/lib/components/column-chart/ids-group-ltd-ids-design-system-components-column-chart.ts"],"sourcesContent":["/** Largest finite value in the series — the domain the value axis is niced from.\n * A non-finite point is skipped rather than compared: one `Infinity` point\n * would otherwise become the domain and flatten every other column to nothing. */\nexport function resolveDomainMax(values: readonly number[]): number {\n const finite = values.filter((value) => Number.isFinite(value));\n\n return finite.length ? Math.max(...finite) : 0;\n}\n\n/** Share of the plot area, in percent. Drives both a column's height and a\n * gridline's offset, so a tick and the column beside it cannot drift apart. */\nexport function heightPercent(value: number, axisMax: number): number {\n // Math.max(NaN, 0) is NaN, so the lower clamp cannot stand in for this test —\n // and the result is written into a style attribute, where `height: NaN%` is\n // dropped silently.\n if (!Number.isFinite(value) || !Number.isFinite(axisMax) || axisMax <= 0) {\n return 0;\n }\n\n return Math.max((value / axisMax) * 100, 0);\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n TemplateRef,\n ViewEncapsulation,\n booleanAttribute,\n computed,\n contentChild,\n input,\n numberAttribute,\n output,\n signal,\n} from '@angular/core';\nimport {\n CHART_SERIES_COLORS,\n describeSeries,\n formatTick,\n formatValue,\n niceMax,\n tickStep,\n focusMark,\n nextRovingIndex,\n staggerDelay,\n tickValues,\n} from '@ids-group-ltd/ids-design-system/components';\nimport { SkeletonComponent } from '@ids-group-ltd/ids-design-system/components/skeleton';\nimport {\n ChartTooltipDirective,\n chartActiveMark,\n} from '@ids-group-ltd/ids-design-system/components/chart-tooltip';\nimport type {\n ChartItemTooltipTrigger,\n ChartTooltipContext,\n} from '@ids-group-ltd/ids-design-system/components/chart-tooltip';\nimport { heightPercent, resolveDomainMax } from './column-chart.math';\nimport type { ColumnChartPoint } from './column-chart.types';\n\nconst defaultValueFormat = (value: number) => formatValue(value);\n\n@Component({\n selector: 'ds-column-chart',\n standalone: true,\n imports: [SkeletonComponent, ChartTooltipDirective],\n templateUrl: './column-chart.component.html',\n styleUrl: './column-chart.component.scss',\n encapsulation: ViewEncapsulation.Emulated,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ColumnChartComponent {\n /** One column per point, drawn in the order given. */\n readonly data = input.required<readonly ColumnChartPoint[]>();\n\n /** Prints each column's value above the column. */\n readonly showValues = input(true, { transform: booleanAttribute });\n\n /** How many value-axis ticks to aim for. A hint, not a count: ticks are\n * snapped to a round step, so the axis may carry one more or one fewer. */\n readonly tickCount = input(5, { transform: numberAttribute });\n\n /** Printed above the plot as the chart's visible title, and reused as the annex table's\n * caption. */\n readonly caption = input<string | null>(null);\n\n /** Accessible name. Generated from the data when omitted. */\n readonly summary = input<string | null>(null);\n\n /** The label-and-value table under the plot: `'toggle'` puts it behind a disclosure,\n * `'visible'` opens it, `'none'` renders none. It is the non-visual route to the numbers, so\n * `'none'` belongs only where the same data is already in a table on the page. */\n readonly dataTable = input<'toggle' | 'visible' | 'none'>('toggle');\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. */\n readonly emptyText = input<string>('No data');\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. */\n readonly errorText = input<string>('Could not load the data');\n /** Formats every value the chart prints, the annex table and the generated description\n * included. Defaults to the browser's locale grouping with a K/M/B suffix past four digits. */\n readonly valueFormat = input<(value: number) => string>(defaultValueFormat);\n\n /** Turns on the click affordance — the pointer cursor and any hover tint.\n * The click output fires whether or not this is set, so a consumer that\n * binds the output and forgets the flag still receives every click. */\n readonly interactive = input(false, { transform: booleanAttribute });\n\n /** The point that was clicked, or activated with Enter or Space. Fires whether or not\n * `interactive` is set. */\n readonly pointClicked = output<ColumnChartPoint>();\n\n /** Milliseconds between one mark's entrance and the next. `0`, the default, is no stagger at\n * all; `40` is the documented non-zero step. The total is capped, so a long series does not\n * crawl in. */\n readonly staggerMs = input(0, { transform: numberAttribute });\n\n protected markStagger(index: number): string {\n return `${staggerDelay(index, this.staggerMs())}ms`;\n }\n\n /** Whether a hovered or focused column opens a tooltip. `'axis'` is not offered — a\n * column chart's marks ARE its categories, so an axis tooltip would repeat the item one. */\n readonly tooltip = input<ChartItemTooltipTrigger>('item');\n\n protected readonly tooltipTemplate =\n contentChild<TemplateRef<{ $implicit: ChartTooltipContext }>>(\n 'dsChartTooltip',\n );\n\n 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.columns().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.columns().length);\n if (next === null) {\n return;\n }\n event.preventDefault();\n this.rovingIndex.set(next);\n focusMark((event.currentTarget as Element).closest('.columns'), next);\n }\n\n protected readonly tooltipContext = computed<ChartTooltipContext | null>(\n () => {\n const entry = this.columns()[this.activeMark.index()];\n if (this.tooltip() === 'none' || !entry) {\n return null;\n }\n\n return {\n category: '',\n entries: [\n {\n label: entry.point.label,\n value: entry.point.value,\n formatted: entry.formattedValue,\n color: entry.color,\n },\n ],\n };\n },\n );\n\n protected readonly domainMax = computed(() =>\n resolveDomainMax(this.data().map((point) => point.value)),\n );\n\n /** Top of the value axis: the domain rounded up to a whole tick, so the\n * tallest column ends on a gridline rather than between two. */\n protected readonly axisMax = computed(() =>\n niceMax(this.domainMax(), this.tickCount()),\n );\n\n protected readonly ticks = computed(() => {\n const axisMax = this.axisMax();\n // Niced from the same domain as `axisMax`, which is what makes the top tick\n // and the top of the axis the same number.\n const values = tickValues(this.domainMax(), this.tickCount());\n const step = tickStep(values);\n const format = this.valueFormat();\n\n return values.map((value) => ({\n label:\n format === defaultValueFormat ? formatTick(value, step) : format(value),\n offsetPercent: heightPercent(value, axisMax),\n }));\n });\n\n protected readonly columns = computed(() => {\n const axisMax = this.axisMax();\n const format = this.valueFormat();\n\n return this.data().map((point, index) => ({\n key: point.id ?? String(index),\n point,\n heightPercent: heightPercent(point.value, axisMax),\n formattedValue: format(point.value),\n color:\n point.color ?? CHART_SERIES_COLORS[index % CHART_SERIES_COLORS.length],\n }));\n });\n\n protected readonly accessibleName = computed(\n () =>\n this.summary() ??\n describeSeries(\n this.caption() ?? 'Chart',\n this.data().map((point) => ({\n label: point.label,\n value: point.value,\n })),\n this.valueFormat(),\n this.dataTable() !== 'none',\n ),\n );\n\n protected entryLabel(entry: {\n point: ColumnChartPoint;\n formattedValue: string;\n }) {\n return `${entry.point.label}, ${entry.formattedValue}`;\n }\n\n protected onPointKey(point: ColumnChartPoint, event: Event): void {\n // Only the column's own key opens it: a key pressed on a control inside belongs to that\n // control.\n if (!this.interactive() || event.target !== event.currentTarget) {\n return;\n }\n event.preventDefault();\n this.pointClicked.emit(point);\n }\n\n protected readonly isEmpty = computed(() => this.data().length === 0);\n\n /** Placeholder columns while loading. Follows the real point count so the chart does not resize\n * when the data lands; falls back to three when `data` is still empty. */\n protected readonly skeletonColumns = computed(() =>\n Array.from({ length: Math.max(this.data().length, 3) }),\n );\n}\n","<figure class=\"column-chart\">\n @if (caption()) {\n <figcaption>\n {{ caption() }}\n </figcaption>\n }\n\n @if (error()) {\n <p\n class=\"empty is-error\"\n role=\"status\">\n {{ errorText() }}\n </p>\n } @else if (loading()) {\n <div\n class=\"skeleton\"\n aria-hidden=\"true\">\n @for (placeholder of skeletonColumns(); track $index) {\n <ds-skeleton height=\"var(--_column-chart-plot-height)\" />\n }\n </div>\n } @else if (isEmpty()) {\n <p class=\"empty\">\n {{ emptyText() }}\n </p>\n } @else {\n <div\n class=\"chart\"\n [attr.role]=\"interactive() ? 'group' : 'img'\"\n [attr.aria-label]=\"accessibleName()\">\n <div class=\"tick-labels\">\n @for (tick of ticks(); track $index) {\n <span\n class=\"tick-label\"\n [style.bottom.%]=\"tick.offsetPercent\">\n {{ tick.label }}\n </span>\n }\n </div>\n\n <div class=\"canvas\">\n <div class=\"grid-lines\">\n @for (tick of ticks(); track $index) {\n <span\n class=\"grid-line\"\n [style.bottom.%]=\"tick.offsetPercent\">\n </span>\n }\n </div>\n\n <div\n class=\"columns\"\n [dsChartTooltip]=\"tooltipContext()\"\n [dsChartTooltipOrigin]=\"activeMark.origin()\"\n [dsChartTooltipTemplate]=\"tooltipTemplate() ?? null\">\n @for (entry of columns(); track entry.key; let index = $index) {\n <div\n class=\"column\"\n animate.enter=\"mark-enter\"\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)=\"pointClicked.emit(entry.point)\"\n (keydown.enter)=\"onPointKey(entry.point, $event)\"\n (keydown.space)=\"onPointKey(entry.point, $event)\">\n <span class=\"plot-cell\">\n @if (showValues()) {\n <span class=\"value\">\n {{ entry.formattedValue }}\n </span>\n }\n\n <span\n class=\"bar\"\n [style.height.%]=\"entry.heightPercent\"\n [style.background]=\"entry.color\">\n </span>\n </span>\n\n <span class=\"category-label\">\n {{ entry.point.label }}\n </span>\n </div>\n }\n </div>\n </div>\n </div>\n\n @if (dataTable() !== 'none') {\n <details\n class=\"data-table\"\n [open]=\"dataTable() === 'visible'\">\n <summary>\n Data table\n </summary>\n\n <table>\n <caption>\n {{\n caption() ?? 'Chart data'\n }}\n </caption>\n\n <thead>\n <tr>\n <th scope=\"col\">\n Label\n </th>\n\n <th scope=\"col\">\n Value\n </th>\n </tr>\n </thead>\n\n <tbody>\n @for (entry of columns(); track entry.key) {\n <tr>\n <td>\n {{ entry.point.label }}\n </td>\n\n <td>\n {{ entry.formattedValue }}\n </td>\n </tr>\n }\n </tbody>\n </table>\n </details>\n }\n }\n</figure>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAAA;;AAEmF;AAC7E,SAAU,gBAAgB,CAAC,MAAyB,EAAA;AACxD,IAAA,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,KAAK,KAAK,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;AAE/D,IAAA,OAAO,MAAM,CAAC,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC;AAChD;AAEA;AACgF;AAC1E,SAAU,aAAa,CAAC,KAAa,EAAE,OAAe,EAAA;;;;IAI1D,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,OAAO,IAAI,CAAC,EAAE;AACxE,QAAA,OAAO,CAAC;IACV;AAEA,IAAA,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,KAAK,GAAG,OAAO,IAAI,GAAG,EAAE,CAAC,CAAC;AAC7C;;ACiBA,MAAM,kBAAkB,GAAG,CAAC,KAAa,KAAK,WAAW,CAAC,KAAK,CAAC;MAWnD,oBAAoB,CAAA;;AAEtB,IAAA,IAAI,GAAG,KAAK,C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AE/GtB;;AAEG;;;;"}
1
+ {"version":3,"file":"ids-group-ltd-ids-design-system-components-column-chart.mjs","sources":["../../../src/lib/components/column-chart/column-chart.math.ts","../../../src/lib/components/column-chart/column-chart.component.ts","../../../src/lib/components/column-chart/column-chart.component.html","../../../src/lib/components/column-chart/ids-group-ltd-ids-design-system-components-column-chart.ts"],"sourcesContent":["/** Largest finite value in the series — the domain the value axis is niced from.\n * A non-finite point is skipped rather than compared: one `Infinity` point\n * would otherwise become the domain and flatten every other column to nothing. */\nexport function resolveDomainMax(values: readonly number[]): number {\n const finite = values.filter((value) => Number.isFinite(value));\n\n return finite.length ? Math.max(...finite) : 0;\n}\n\n/** Share of the plot area, in percent. Drives both a column's height and a\n * gridline's offset, so a tick and the column beside it cannot drift apart. */\nexport function heightPercent(value: number, axisMax: number): number {\n // Math.max(NaN, 0) is NaN, so the lower clamp cannot stand in for this test —\n // and the result is written into a style attribute, where `height: NaN%` is\n // dropped silently.\n if (!Number.isFinite(value) || !Number.isFinite(axisMax) || axisMax <= 0) {\n return 0;\n }\n\n return Math.max((value / axisMax) * 100, 0);\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n TemplateRef,\n ViewEncapsulation,\n booleanAttribute,\n computed,\n contentChild,\n input,\n numberAttribute,\n output,\n signal,\n} from '@angular/core';\nimport {\n CHART_SERIES_COLORS,\n describeSeries,\n formatTick,\n formatValue,\n niceMax,\n tickStep,\n describeShare,\n shareOfTotal,\n focusMark,\n nextRovingIndex,\n staggerDelay,\n tickValues,\n} from '@ids-group-ltd/ids-design-system/components';\nimport { SkeletonComponent } from '@ids-group-ltd/ids-design-system/components/skeleton';\nimport { 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 { heightPercent, resolveDomainMax } from './column-chart.math';\nimport type { ColumnChartPoint } from './column-chart.types';\n\nconst defaultValueFormat = (value: number) => formatValue(value);\n\n@Component({\n selector: 'ds-column-chart',\n standalone: true,\n imports: [SkeletonComponent, ChartTooltipDirective, IconComponent],\n templateUrl: './column-chart.component.html',\n styleUrl: './column-chart.component.scss',\n host: { '[class.framed]': \"frameResolved() === 'auto'\" },\n encapsulation: ViewEncapsulation.Emulated,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ColumnChartComponent {\n /** One column per point, drawn in the order given. */\n readonly data = input.required<readonly ColumnChartPoint[]>();\n\n /** Prints each column's value above the column. */\n readonly showValues = input(true, { transform: booleanAttribute });\n\n /** How many value-axis ticks to aim for. A hint, not a count: ticks are\n * snapped to a round step, so the axis may carry one more or one fewer. */\n readonly tickCount = input(5, { transform: numberAttribute });\n\n /** Whether the chart draws its own bordered, padded box. `'auto'`, the default, draws it;\n * `'none'` leaves the chart bare, for one placed inside a card the page has already drawn.\n * Unset falls back to `DS_CONFIG.chart.frame`, then `'auto'` — whether charts live inside cards\n * is one decision per app rather than per plot. */\n readonly frame = input<ChartFrame | null>(null);\n\n /** How long the tooltip stays after the pointer leaves the mark, in milliseconds. Zero, the\n * default, takes it away at once: a panel that outlives the pointer sits over the plot the\n * reader has moved on to.\n *\n * Raise it only for a panel a reader has to REACH — one carrying a link, a figure, or anything\n * selectable — which is WCAG 1.4.13's hoverable clause. The panel is portaled to the body, so\n * crossing the gap to it at an ordinary pointer speed needs about 140. Unset falls back to\n * `DS_CONFIG.chart.tooltipLingerMs`, then 0. */\n readonly tooltipLingerMs = input<number | null>(null, {\n transform: (raw: unknown) => (raw == null ? null : numberAttribute(raw)),\n });\n /** Printed above the plot as the chart's visible title, and reused as the annex table's\n * caption. */\n readonly caption = input<string | null>(null);\n\n /** Accessible name. Generated from the data when omitted. */\n readonly summary = input<string | null>(null);\n\n /** The label-and-value table under the plot: `'toggle'` puts it behind a disclosure,\n * `'visible'` opens it, `'none'` renders none. It is the non-visual route to the numbers, so\n * `'none'` belongs only where the same data is already in a table on the page.\n * Unset falls back to `DS_CONFIG.chart.dataTable`, then `'none'`. */\n readonly dataTable = input<ChartDataTable | null>(null);\n /** Declares that the marks are parts of one whole, which is what makes a share of their total a\n * real quantity. Off by default: a chart of visitors per stage or revenue per month sums to a\n * number nobody can point at, and \"18.6% of total\" against it is arithmetic dressed as a fact.\n * On, each mark's share appears on the tooltip's second line and in the data table. */\n readonly partOfWhole = input(false, { transform: booleanAttribute });\n\n /** Draws skeleton marks in place of the data, at the same count, so the chart does not resize\n * when the data lands. */\n readonly loading = input(false, { transform: booleanAttribute });\n /** Shown in place of the plot when `data` is empty. Unset falls back to\n * `DS_CONFIG.chart.emptyText`, then `'No data'`. */\n readonly emptyText = input<string | null>(null);\n\n /** Shows `errorText` in place of the plot. Separate from `loading` and from an empty `data`,\n * because \"the request failed\" and \"there is nothing to show\" read the same to a reader and\n * mean opposite things. */\n readonly error = input(false, { transform: booleanAttribute });\n\n /** The message the error state prints. Unset falls back to `DS_CONFIG.chart.errorText`, then\n * `'Could not load the data'`. */\n readonly errorText = input<string | null>(null);\n /** Formats every value the chart prints, the annex table and the generated description\n * included. Unset falls back to `DS_CONFIG.chart.valueFormat`, then the browser's locale\n * grouping with a K/M/B suffix past four digits. */\n readonly valueFormat = input<ChartValueFormat | null>(null);\n\n readonly frameResolved = resolveWithConfig(\n this.frame,\n (config) => config.chart?.frame,\n 'auto' as ChartFrame,\n );\n readonly dataTableResolved = resolveWithConfig(\n this.dataTable,\n (config) => config.chart?.dataTable,\n 'none' as ChartDataTable,\n );\n readonly emptyTextResolved = resolveWithConfig(\n this.emptyText,\n (config) => config.chart?.emptyText,\n 'No data',\n );\n readonly errorTextResolved = resolveWithConfig(\n this.errorText,\n (config) => config.chart?.errorText,\n 'Could not load the data',\n );\n readonly valueFormatResolved = resolveWithConfig(\n this.valueFormat,\n (config) => config.chart?.valueFormat,\n defaultValueFormat as ChartValueFormat,\n );\n\n /** Turns on the click affordance — the pointer cursor and any hover tint.\n * The click output fires whether or not this is set, so a consumer that\n * binds the output and forgets the flag still receives every click. */\n readonly interactive = input(false, { transform: booleanAttribute });\n\n /** The point that was clicked, or activated with Enter or Space. Fires whether or not\n * `interactive` is set. */\n readonly pointClicked = output<ColumnChartPoint>();\n\n /** Holds the hovered mark and its tooltip in place when it is clicked, until Escape or a press\n * outside releases it. Off by default: a click is already the drill-down hook, and a mark left\n * lit after the pointer has gone needs a reader who knows why it is lit. `pointClicked` fires\n * either way — pinning is a state, not a handler. */\n readonly pinOnClick = input(false, { transform: booleanAttribute });\n\n /** Dims every OTHER mark while one is hovered or focused, so the reader's eye is held on the\n * one under the pointer. Off by default: the dimming costs the separation BETWEEN the dimmed\n * marks — measured 2026-09-13, the worst pair of three dimmed series falls from dE 14.8 at full\n * opacity to 2.1 at `--ds-chart-dim-opacity`'s default 0.3 — so it buys loudness for one mark\n * and pays for it with the rest of the chart. */\n readonly dimOthers = input(false, { transform: booleanAttribute });\n\n /** Milliseconds between one mark's entrance and the next. `0`, the default, is no stagger at\n * all; `40` is the documented non-zero step. The total is capped, so a long series does not\n * crawl in. */\n readonly staggerMs = input(0, { transform: numberAttribute });\n\n protected markStagger(index: number): string {\n return `${staggerDelay(index, this.staggerMs())}ms`;\n }\n\n /** Whether a hovered or focused column opens a tooltip. `'axis'` is not offered — a\n * column chart's marks ARE its categories, so an axis tooltip would repeat the item one. */\n readonly tooltip = input<ChartItemTooltipTrigger>('item');\n\n protected readonly tooltipTemplate =\n contentChild<TemplateRef<{ $implicit: ChartTooltipContext }>>(\n 'dsChartTooltip',\n );\n\n /** Where the tooltip is pinned. `'mark'`, the default, is the column itself — a panel over the\n * reading it describes. `'cell'` is the full-height category cell, which puts the panel at the\n * top of the plot whatever the column's value. */\n readonly tooltipAnchor = input<'mark' | 'cell'>('mark');\n\n /** The value is printed ABOVE the column, so a panel anchored to the column alone opens on top\n * of that number. One text line of clearance puts it above both. */\n protected readonly valueClearance = computed(() =>\n this.showValues() ? 18 : 0,\n );\n\n 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: ColumnChartPoint,\n index: number,\n event: Event,\n ): void {\n this.pointClicked.emit(payload);\n if (this.pinOnClick()) {\n this.activeMark.pin(\n index,\n event,\n this.tooltipAnchor() === 'mark' ? '.bar' : undefined,\n );\n }\n }\n\n protected onMarkEnter(index: number, event: Event): void {\n this.activeMark.enter(\n index,\n event,\n this.tooltipAnchor() === 'mark' ? '.bar' : undefined,\n );\n }\n /** One tab stop per chart, not one per mark: WCAG 2.1.1's Understanding is explicit that not\n * every mouse-operable control has to be separately focusable, and that is what keeps a\n * twenty-five mark chart from being twenty-five stops in the page's tab order. */\n protected readonly rovingIndex = signal(0);\n\n protected readonly tabStopIndex = computed(() =>\n Math.min(this.rovingIndex(), Math.max(0, this.columns().length - 1)),\n );\n\n protected onMarkFocus(index: number, event: FocusEvent): void {\n this.rovingIndex.set(index);\n this.onMarkEnter(index, event);\n }\n\n protected onMarkNavigation(event: KeyboardEvent, index: number): void {\n const next = nextRovingIndex(event.key, index, this.columns().length);\n if (next === null) {\n return;\n }\n event.preventDefault();\n this.rovingIndex.set(next);\n focusMark((event.currentTarget as Element).closest('.columns'), next);\n }\n\n protected readonly tooltipContext = computed<ChartTooltipContext | null>(\n () => {\n const entry = this.columns()[this.activeMark.index()];\n if (this.tooltip() === 'none' || !entry) {\n return null;\n }\n\n return {\n category: '',\n entries: [\n {\n label: entry.point.label,\n value: entry.point.value,\n formatted: entry.formattedValue,\n color: entry.color,\n detail: this.partOfWhole()\n ? describeShare(\n this.data().map((point) => point.value),\n this.activeMark.index(),\n )\n : undefined,\n },\n ],\n };\n },\n );\n\n protected readonly domainMax = computed(() =>\n resolveDomainMax(this.data().map((point) => point.value)),\n );\n\n /** Top of the value axis: the domain rounded up to a whole tick, so the\n * tallest column ends on a gridline rather than between two. */\n protected readonly axisMax = computed(() =>\n niceMax(this.domainMax(), this.tickCount()),\n );\n\n protected readonly ticks = computed(() => {\n const axisMax = this.axisMax();\n // Niced from the same domain as `axisMax`, which is what makes the top tick\n // and the top of the axis the same number.\n const values = tickValues(this.domainMax(), this.tickCount());\n const step = tickStep(values);\n const format = this.valueFormatResolved();\n\n return values.map((value) => ({\n label:\n format === defaultValueFormat ? formatTick(value, step) : format(value),\n offsetPercent: heightPercent(value, axisMax),\n }));\n });\n\n protected readonly columns = computed(() => {\n const axisMax = this.axisMax();\n const format = this.valueFormatResolved();\n const values = this.data().map((point) => point.value);\n\n return this.data().map((point, index) => ({\n key: point.id ?? String(index),\n point,\n heightPercent: heightPercent(point.value, axisMax),\n formattedValue: format(point.value),\n share: this.partOfWhole() ? shareOfTotal(values, index) : '',\n color:\n point.color ?? CHART_SERIES_COLORS[index % CHART_SERIES_COLORS.length],\n }));\n });\n\n protected readonly accessibleName = computed(\n () =>\n this.summary() ??\n describeSeries(\n this.caption() ?? 'Chart',\n this.data().map((point) => ({\n label: point.label,\n value: point.value,\n })),\n this.valueFormatResolved(),\n this.dataTableResolved() !== 'none',\n ),\n );\n\n protected entryLabel(entry: {\n point: ColumnChartPoint;\n formattedValue: string;\n }) {\n return `${entry.point.label}, ${entry.formattedValue}`;\n }\n\n protected onPointKey(point: ColumnChartPoint, event: Event): void {\n // Only the column's own key opens it: a key pressed on a control inside belongs to that\n // control.\n if (!this.interactive() || event.target !== event.currentTarget) {\n return;\n }\n event.preventDefault();\n this.pointClicked.emit(point);\n }\n\n protected readonly isEmpty = computed(() => this.data().length === 0);\n\n /** Placeholder columns while loading. Follows the real point count so the chart does not resize\n * when the data lands; falls back to three when `data` is still empty. */\n protected readonly skeletonColumns = computed(() =>\n Array.from({ length: Math.max(this.data().length, 3) }),\n );\n}\n","<figure class=\"column-chart\">\n @if (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 skeletonColumns(); track $index) {\n <ds-skeleton height=\"var(--_column-chart-plot-height)\" />\n }\n </div>\n } @else if (isEmpty()) {\n <p class=\"empty\">\n {{ emptyTextResolved() }}\n </p>\n } @else {\n <div\n class=\"chart\"\n [attr.role]=\"interactive() ? 'group' : 'img'\"\n [attr.aria-label]=\"accessibleName()\">\n <div class=\"tick-labels\">\n @for (tick of ticks(); track $index) {\n <span\n class=\"tick-label\"\n [style.bottom.%]=\"tick.offsetPercent\">\n {{ tick.label }}\n </span>\n }\n </div>\n\n <div class=\"canvas\">\n <div class=\"grid-lines\">\n @for (tick of ticks(); track $index) {\n <span\n class=\"grid-line\"\n [style.bottom.%]=\"tick.offsetPercent\">\n </span>\n }\n </div>\n\n <div\n class=\"columns\"\n [class.dims-others]=\"dimOthers()\"\n [dsChartTooltip]=\"tooltipContext()\"\n [dsChartTooltipExtraGap]=\"valueClearance()\"\n [dsChartTooltipOrigin]=\"activeMark.origin()\"\n [dsChartTooltipTemplate]=\"tooltipTemplate() ?? null\">\n @for (entry of columns(); track entry.key; let index = $index) {\n <div\n class=\"column\"\n animate.leave=\"mark-leave\"\n [style.--_chart-mark-stagger]=\"markStagger(index)\"\n [class.interactive]=\"interactive()\"\n [class.is-pinned]=\"activeMark.pinned() && activeMark.index() === index\"\n [attr.role]=\"interactive() ? 'button' : null\"\n [attr.tabindex]=\"\n interactive() ? (index === tabStopIndex() ? 0 : -1) : null\n \"\n [attr.data-mark-index]=\"index\"\n [attr.aria-label]=\"interactive() ? entryLabel(entry) : null\"\n (pointerenter)=\"onMarkEnter(index, $event)\"\n (pointerleave)=\"activeMark.leave()\"\n (focus)=\"onMarkFocus(index, $event)\"\n (blur)=\"activeMark.leave()\"\n (keydown)=\"onMarkNavigation($event, index)\"\n (click)=\"onMarkClick(entry.point, index, $event)\"\n (keydown.enter)=\"onPointKey(entry.point, $event)\"\n (keydown.space)=\"onPointKey(entry.point, $event)\">\n <span class=\"plot-cell\">\n @if (showValues()) {\n <span class=\"value\">\n {{ entry.formattedValue }}\n </span>\n }\n\n <span\n class=\"bar\"\n animate.enter=\"mark-enter\"\n [style.height.%]=\"entry.heightPercent\"\n [style.background]=\"entry.color\">\n @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\n <span class=\"category-label\">\n {{ entry.point.label }}\n </span>\n </div>\n }\n </div>\n </div>\n </div>\n\n @if (dataTableResolved() !== 'none') {\n <details\n class=\"data-table\"\n [open]=\"dataTableResolved() === 'visible'\">\n <summary>\n Data table\n </summary>\n\n <table>\n <caption>\n {{\n caption() ?? 'Chart data'\n }}\n </caption>\n\n <thead>\n <tr>\n <th scope=\"col\">\n Label\n </th>\n\n <th scope=\"col\">\n Value\n </th>\n\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 columns(); track entry.key) {\n <tr>\n <td>\n {{ entry.point.label }}\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 </tbody>\n </table>\n </details>\n }\n }\n</figure>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AAAA;;AAEmF;AAC7E,SAAU,gBAAgB,CAAC,MAAyB,EAAA;AACxD,IAAA,MAAM,MAAM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
  import { TemplatePortal } from '@angular/cdk/portal';
6
6
  import * as i1 from '@angular/cdk/a11y';
7
7
  import { A11yModule } from '@angular/cdk/a11y';
8
- import { DsControlValueAccessor, trimmedText, resolveFieldMessage, dropdownOverlay, prepareOverlayEnter, forwardOverlayTokens, closeOnOutsidePointer, closeOnScroll, clearOnDetach, focusIsInside, disposeWithLeave } from '@ids-group-ltd/ids-design-system/components';
8
+ import { DsControlValueAccessor, trimmedText, resolveFieldMessage, dropdownOverlay, panelClassesOf, prepareOverlayEnter, forwardOverlayTokens, closeOnOutsidePointer, closeOnScroll, clearOnDetach, focusIsInside, disposeWithLeave } from '@ids-group-ltd/ids-design-system/components';
9
9
  import { IconComponent } from '@ids-group-ltd/ids-design-system/icons';
10
10
  import { CalendarDayComponent } from '@ids-group-ltd/ids-design-system/components/calendar-day';
11
11
  import { FieldMessageComponent } from '@ids-group-ltd/ids-design-system/components/field-message';
@@ -414,6 +414,11 @@ class DatePickerComponent extends DsControlValueAccessor {
414
414
  required = input(false, { ...(ngDevMode ? { debugName: "required" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
415
415
  /** Shows an "(optional)" marker beside the label — ignored when `required` is set. */
416
416
  optional = input(false, { ...(ngDevMode ? { debugName: "optional" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
417
+ /** Extra classes for the portaled panel, beside `ds-dropdown-panel`,
418
+ * `ds-overlay-pane` and this component's own `ds-date-picker-panel`. The panel
419
+ * is portaled out of the host, so a class on the pane is the only way a consumer
420
+ * stylesheet reaches ONE instance of it. */
421
+ panelClass = input([], ...(ngDevMode ? [{ debugName: "panelClass" }] : /* istanbul ignore next */ []));
417
422
  /** Disables the picker and blocks all interaction. */
418
423
  disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
419
424
  /** Confirmation text, shown when there is no error or warning — and it paints
@@ -795,7 +800,7 @@ class DatePickerComponent extends DsControlValueAccessor {
795
800
  if (this.isDisabled() || this.overlayRef) {
796
801
  return;
797
802
  }
798
- const { positionStrategy, config } = dropdownOverlay(this.overlay, this.anchor().nativeElement, 'ds-overlay-pane');
803
+ const { positionStrategy, config } = dropdownOverlay(this.overlay, this.anchor().nativeElement, ['ds-date-picker-panel', ...panelClassesOf(this.panelClass())]);
799
804
  this.overlayRef = this.overlay.create(config);
800
805
  prepareOverlayEnter(this.overlayRef, this.host.nativeElement, positionStrategy);
801
806
  forwardOverlayTokens(this.overlayRef, this.host.nativeElement, this.panelTokens);
@@ -1202,7 +1207,7 @@ class DatePickerComponent extends DsControlValueAccessor {
1202
1207
  this.focusTrigger();
1203
1208
  }
1204
1209
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: DatePickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1205
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: DatePickerComponent, isStandalone: true, selector: "ds-date-picker", inputs: { mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, fullWidth: { classPropertyName: "fullWidth", publicName: "fullWidth", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, optional: { classPropertyName: "optional", publicName: "optional", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, success: { classPropertyName: "success", publicName: "success", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, minYear: { classPropertyName: "minYear", publicName: "minYear", isSignal: true, isRequired: false, transformFunction: null }, maxYear: { classPropertyName: "maxYear", publicName: "maxYear", isSignal: true, isRequired: false, transformFunction: null }, minDate: { classPropertyName: "minDate", publicName: "minDate", isSignal: true, isRequired: false, transformFunction: null }, maxDate: { classPropertyName: "maxDate", publicName: "maxDate", isSignal: true, isRequired: false, transformFunction: null }, disabledDate: { classPropertyName: "disabledDate", publicName: "disabledDate", isSignal: true, isRequired: false, transformFunction: null }, presets: { classPropertyName: "presets", publicName: "presets", isSignal: true, isRequired: false, transformFunction: null }, locale: { classPropertyName: "locale", publicName: "locale", isSignal: true, isRequired: false, transformFunction: null }, dateFormat: { classPropertyName: "dateFormat", publicName: "dateFormat", isSignal: true, isRequired: false, transformFunction: null }, firstDayOfWeek: { classPropertyName: "firstDayOfWeek", publicName: "firstDayOfWeek", isSignal: true, isRequired: false, transformFunction: null }, defaultDate: { classPropertyName: "defaultDate", publicName: "defaultDate", isSignal: true, isRequired: false, transformFunction: null }, allowInput: { classPropertyName: "allowInput", publicName: "allowInput", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange" }, host: { properties: { "attr.data-field-state": "controlState()", "class.in-group": "inGroup", "class.full-width": "fullWidth()" } }, providers: [
1210
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: DatePickerComponent, isStandalone: true, selector: "ds-date-picker", inputs: { mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, fullWidth: { classPropertyName: "fullWidth", publicName: "fullWidth", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, optional: { classPropertyName: "optional", publicName: "optional", isSignal: true, isRequired: false, transformFunction: null }, panelClass: { classPropertyName: "panelClass", publicName: "panelClass", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, success: { classPropertyName: "success", publicName: "success", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, minYear: { classPropertyName: "minYear", publicName: "minYear", isSignal: true, isRequired: false, transformFunction: null }, maxYear: { classPropertyName: "maxYear", publicName: "maxYear", isSignal: true, isRequired: false, transformFunction: null }, minDate: { classPropertyName: "minDate", publicName: "minDate", isSignal: true, isRequired: false, transformFunction: null }, maxDate: { classPropertyName: "maxDate", publicName: "maxDate", isSignal: true, isRequired: false, transformFunction: null }, disabledDate: { classPropertyName: "disabledDate", publicName: "disabledDate", isSignal: true, isRequired: false, transformFunction: null }, presets: { classPropertyName: "presets", publicName: "presets", isSignal: true, isRequired: false, transformFunction: null }, locale: { classPropertyName: "locale", publicName: "locale", isSignal: true, isRequired: false, transformFunction: null }, dateFormat: { classPropertyName: "dateFormat", publicName: "dateFormat", isSignal: true, isRequired: false, transformFunction: null }, firstDayOfWeek: { classPropertyName: "firstDayOfWeek", publicName: "firstDayOfWeek", isSignal: true, isRequired: false, transformFunction: null }, defaultDate: { classPropertyName: "defaultDate", publicName: "defaultDate", isSignal: true, isRequired: false, transformFunction: null }, allowInput: { classPropertyName: "allowInput", publicName: "allowInput", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange" }, host: { properties: { "attr.data-field-state": "controlState()", "class.in-group": "inGroup", "class.full-width": "fullWidth()" } }, providers: [
1206
1211
  {
1207
1212
  provide: NG_VALUE_ACCESSOR,
1208
1213
  useExisting: forwardRef(() => DatePickerComponent),
@@ -1228,7 +1233,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
1228
1233
  '[class.in-group]': 'inGroup',
1229
1234
  '[class.full-width]': 'fullWidth()',
1230
1235
  }, template: "<div class=\"field\">\n @if (label()) {\n <span\n class=\"label\"\n [id]=\"labelId\">\n {{ label() }}\n @if (required()) {\n <span\n class=\"req\"\n aria-hidden=\"true\">\n *\n </span>\n } @else if (optional()) {\n <span\n class=\"optional-marker\"\n aria-hidden=\"true\">\n (optional)\n </span>\n }\n </span>\n }\n\n <!-- Whole-field click opens the panel; keyboard access is on the inner input\n (aria-haspopup + ArrowDown), so the wrapper needs no key handler of its own. -->\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -->\n <div\n #anchor\n [class]=\"triggerClasses()\"\n (click)=\"onFieldClick()\">\n <span class=\"input-wrap\">\n <input\n #inputEl\n type=\"text\"\n class=\"date-input\"\n inputmode=\"numeric\"\n autocomplete=\"off\"\n aria-haspopup=\"dialog\"\n [class.masked]=\"allowInput()\"\n [value]=\"fieldText()\"\n [attr.size]=\"fieldSize()\"\n [readOnly]=\"!allowInput()\"\n [disabled]=\"isDisabled()\"\n [attr.aria-expanded]=\"isOpen()\"\n [attr.aria-controls]=\"isOpen() ? panelId : null\"\n [attr.aria-labelledby]=\"label() ? labelId : null\"\n [attr.aria-label]=\"resolvedAriaLabel()\"\n [attr.aria-required]=\"required() ? 'true' : null\"\n [attr.aria-invalid]=\"invalidResolved() ? 'true' : null\"\n [attr.aria-describedby]=\"describedByIds(hintId(), groupMessage())\"\n [attr.aria-placeholder]=\"fieldPlaceholder()\"\n (beforeinput)=\"onFieldBeforeInput($event)\"\n (input)=\"onFieldInput($event)\"\n (paste)=\"onFieldPaste($event)\"\n (blur)=\"onFieldBlur()\"\n (keydown)=\"onFieldKeydown($event)\"\n (keydown.arrowdown)=\"open(true); $event.preventDefault()\" />\n\n <!-- Per-slot overlay: the real input is transparent (see .masked in the\n SCSS), so this paints every glyph \u2014 digits at normal weight, unfilled\n positions muted. Monospace font keeps letters and digits equal\n width, so glyphs stay aligned 1:1 with the invisible input's caret. -->\n @if (allowInput()) {\n <!-- Whitespace-tight on purpose: the overlay paints with `white-space:\n pre`, so it must hug its tags or stray whitespace would render\n and shift later glyphs out of alignment. -->\n <!-- eslint-disable ds/template/element-content-newline -->\n <span\n class=\"mask-ghost\"\n aria-hidden=\"true\">\n @for (part of displaySlots(); track $index) {\n <span [class.muted]=\"part.muted\">{{ part.text }}</span>\n }\n </span>\n <!-- eslint-enable ds/template/element-content-newline -->\n }\n </span>\n\n <button\n type=\"button\"\n class=\"calendar-toggle\"\n tabindex=\"-1\"\n aria-hidden=\"true\"\n [disabled]=\"isDisabled()\"\n (click)=\"onFieldClick(); $event.stopPropagation()\">\n <!-- 14, not 16. The calendar path fills 18 of its 24 viewBox units, so at 16 its ink is 12px\n tall against the value's ~10px cap height \u2014 same centre, but overhanging a pixel above and\n below, which is what read as the two being out of line. At 14 the ink is 10.5px. -->\n <ds-icon\n name=\"calendar\"\n [size]=\"14\" />\n </button>\n </div>\n\n <ds-field-message\n [icon]=\"messageIcon()\"\n [text]=\"message().text\"\n [state]=\"message().state\"\n [messageId]=\"hintId()\"\n [reserve]=\"reserveMessageResolved()\" />\n</div>\n\n<ng-template #panel>\n <!-- Dialog-level click is a pointer-only light-dismiss that closes an open\n month/year popup; keyboard users dismiss it with Escape (bound on each popup). -->\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events -->\n <div\n class=\"calendar\"\n role=\"dialog\"\n aria-label=\"Choose date\"\n cdkTrapFocus\n [id]=\"panelId\"\n [class.has-presets]=\"presets().length > 0\"\n (click)=\"closeMenus()\">\n <span\n class=\"visually-hidden\"\n aria-live=\"polite\">\n {{ monthYearLabel() }}\n </span>\n\n <div class=\"calendar-body\">\n <div class=\"head\">\n <span\n class=\"period\"\n [id]=\"captionId\">\n <span class=\"period-item\">\n <button\n type=\"button\"\n class=\"period-trigger\"\n aria-haspopup=\"listbox\"\n [attr.aria-expanded]=\"monthMenuOpen()\"\n (click)=\"toggleMonthMenu($event)\">\n {{ monthNames()[viewMonthIndex()] }}\n <ds-icon\n name=\"chevronDown\"\n [size]=\"12\" />\n </button>\n\n @if (monthMenuOpen()) {\n <!-- Popup container, not a focusable widget: it wraps real <button>s\n and closes on Escape; the click only stops light-dismiss bubbling. -->\n <!-- eslint-disable-next-line @angular-eslint/template/interactive-supports-focus -->\n <div\n class=\"picker-menu\"\n (click)=\"$event.stopPropagation()\"\n (keydown.escape)=\"closeMenus()\">\n <div\n class=\"picker-grid\"\n role=\"group\"\n aria-label=\"Select month\">\n @for (name of monthNames(); track $index) {\n <button\n type=\"button\"\n class=\"picker-cell\"\n [class.selected]=\"$index === viewMonthIndex()\"\n [attr.aria-label]=\"name\"\n [attr.aria-current]=\"\n $index === viewMonthIndex() ? 'true' : null\n \"\n (click)=\"selectMonth($index, $event)\">\n {{ name.slice(0, 3) }}\n </button>\n }\n </div>\n </div>\n }\n </span>\n\n <span class=\"period-item\">\n <button\n type=\"button\"\n class=\"period-trigger\"\n aria-haspopup=\"listbox\"\n [attr.aria-expanded]=\"yearMenuOpen()\"\n (click)=\"toggleYearMenu($event)\">\n {{ viewYear() }}\n <ds-icon\n name=\"chevronDown\"\n [size]=\"12\" />\n </button>\n\n @if (yearMenuOpen()) {\n <!-- Popup container, not a focusable widget: it wraps real <button>s\n and closes on Escape; the click only stops light-dismiss bubbling. -->\n <!-- eslint-disable-next-line @angular-eslint/template/interactive-supports-focus -->\n <div\n class=\"picker-menu\"\n (click)=\"$event.stopPropagation()\"\n (keydown.escape)=\"closeMenus()\">\n <div class=\"picker-head\">\n <button\n type=\"button\"\n class=\"picker-nav\"\n aria-label=\"Previous years\"\n [disabled]=\"!canPrevYearPage()\"\n (click)=\"prevYearPage($event)\">\n <ds-icon\n name=\"chevronLeft\"\n [size]=\"14\" />\n </button>\n\n <span class=\"picker-range\">\n {{ yearRangeLabel() }}\n </span>\n\n <button\n type=\"button\"\n class=\"picker-nav\"\n aria-label=\"Next years\"\n [disabled]=\"!canNextYearPage()\"\n (click)=\"nextYearPage($event)\">\n <ds-icon\n name=\"chevronRight\"\n [size]=\"14\" />\n </button>\n </div>\n\n <div\n class=\"picker-grid\"\n role=\"group\"\n aria-label=\"Select year\">\n @for (year of yearsOnPage(); track year) {\n <button\n type=\"button\"\n class=\"picker-cell year-cell\"\n [class.selected]=\"year === viewYear()\"\n [attr.aria-current]=\"year === viewYear() ? 'true' : null\"\n (click)=\"selectYear(year, $event)\">\n {{ year }}\n </button>\n }\n </div>\n </div>\n }\n </span>\n </span>\n\n <span class=\"nav\">\n <button\n type=\"button\"\n (click)=\"prevMonth()\">\n <ds-icon\n name=\"chevronLeft\"\n [size]=\"14\">\n </ds-icon>\n </button>\n\n <button\n type=\"button\"\n (click)=\"nextMonth()\">\n <ds-icon\n name=\"chevronRight\"\n [size]=\"14\">\n </ds-icon>\n </button>\n </span>\n </div>\n\n <div\n class=\"grid\"\n role=\"grid\"\n [attr.aria-labelledby]=\"captionId\">\n <div\n class=\"dow-row\"\n role=\"row\">\n @for (dow of weekdays(); track $index) {\n <span\n class=\"dow\"\n role=\"columnheader\"\n [attr.aria-label]=\"weekdaysFull()[$index]\">\n {{ dow }}\n </span>\n }\n </div>\n\n @for (week of weeksGrid(); track $index) {\n <div\n class=\"week\"\n role=\"row\">\n @for (cell of week; track $index) {\n <ds-calendar-day\n [muted]=\"!cell.inMonth\"\n [today]=\"cell.isToday\"\n [selected]=\"cell.isSelected\"\n [inRange]=\"cell.inRange\"\n [rangeStart]=\"cell.isRangeStart\"\n [rangeEnd]=\"cell.isRangeEnd\"\n [disabled]=\"cell.isDisabled\"\n [dataDay]=\"dayKey(cell.date)\"\n [tabIndex]=\"isFocusDay(cell) ? 0 : -1\"\n [ariaLabel]=\"dayLabel(cell)\"\n (daySelected)=\"selectDay(cell)\"\n (dayKeydown)=\"onGridKeydown($event, cell)\">\n {{ cell.day }}\n </ds-calendar-day>\n }\n </div>\n }\n </div>\n </div>\n\n @if (presets().length > 0) {\n <div class=\"presets\">\n @for (preset of presets(); track $index) {\n <button\n type=\"button\"\n class=\"preset-btn\"\n [disabled]=\"isPresetDisabled(preset)\"\n (click)=\"applyPreset(preset); $event.stopPropagation()\">\n {{ preset.label }}\n </button>\n }\n </div>\n }\n </div>\n</ng-template>\n", styles: ["@charset \"UTF-8\";:where(:focus-visible){outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:var(--focus-ring-offset);animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard)}@keyframes ds-focus-ring-in{0%{outline-color:transparent}}:root[data-focus=ring]{--ds-field-focus-shadow: var(--focus-ring);--ds-field-focus-shadow-error: var(--focus-ring-error)}:root[data-focus=edge]{--focus-ring-offset: 0px;--ds-field-focus-shadow: 0 0 0 var(--border-width-default) var(--primary);--ds-field-focus-shadow-error: 0 0 0 var(--border-width-default) var(--error)}[data-focus=inset]{--focus-ring-offset: calc(-1 * var(--focus-ring-width));--ds-field-focus-shadow: var(--focus-ring-inset);--ds-field-focus-shadow-error: var(--focus-ring-inset-error)}@media(forced-colors:active){:where(:focus-visible){outline:var(--focus-ring-width) solid CanvasText;outline-offset:var(--focus-ring-offset)}}:host{--_date-picker-focus-shadow: var(--ds-date-picker-focus-shadow, var(--ds-field-focus-shadow));--_date-picker-trigger-bg-color: var(--ds-date-picker-trigger-bg-color, var(--surface-default));--_date-picker-trigger-border-color: var(--ds-date-picker-trigger-border-color, var(--border-default));--_date-picker-trigger-label-color: var(--ds-date-picker-trigger-label-color, var(--text-primary));--_date-picker-required-color: var(--ds-date-picker-required-color, var(--error));--_date-picker-placeholder-color: var(--ds-date-picker-placeholder-color, var(--text-tertiary));--_date-picker-trigger-radius: var(--ds-date-picker-trigger-radius, var(--ds-radius-control));--_date-picker-trigger-pad-x: var(--ds-date-picker-trigger-pad-x, var(--field-pad-x));--_date-picker-value-font-family: var(--ds-date-picker-value-font-family, var(--font-mono));--_date-picker-value-font-size: var(--ds-date-picker-value-font-size, var(--font-size-s));--_date-picker-value-weight: var(--ds-date-picker-value-weight, var(--font-weight-regular));display:block;width:fit-content;max-width:100%}:host(.full-width){width:100%}:host(.full-width) .trigger{width:100%}:host(.full-width) .input-wrap{flex:1}:host(.full-width) .date-input{flex:1}.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}.field{display:flex;flex-direction:column;align-items:flex-start;gap:var(--field-label-gap);width:100%}.field .label{--_field-label-font-size: var(--ds-field-label-font-size, var(--font-size-xs));--_field-label-weight: var(--ds-field-label-weight, var(--font-weight-bold));--_field-label-color: var(--ds-field-label-color, var(--text-secondary));--_field-label-transform: var(--ds-field-label-transform, none);--_field-label-tracking: var(--ds-field-label-tracking, normal);display:flex;align-items:center;gap:var(--field-gap-req);font:var(--_field-label-weight) var(--_field-label-font-size)/var(--line-height-base) var(--font-sans);color:var(--_field-label-color);text-transform:var(--_field-label-transform);letter-spacing:var(--_field-label-tracking)}.field .label .req{color:var(--_date-picker-required-color);font-weight:var(--font-weight-semibold)}.field .label .optional-marker{color:var(--text-tertiary);font-weight:var(--font-weight-regular)}.trigger{display:inline-flex;align-items:center;gap:var(--space-1);background:var(--_date-picker-trigger-bg-color);border:var(--border-width-default) solid var(--_date-picker-trigger-border-color);border-radius:var(--_date-picker-trigger-radius);padding:0 var(--_date-picker-trigger-pad-x);--_field-box-height: var(--ds-field-height, var(--field-h-md));height:var(--_field-box-height);font:var(--font-weight-regular) var(--font-size-s)/var(--line-height-flat) var(--font-sans);color:var(--_date-picker-trigger-label-color);cursor:pointer;transition:border-color var(--duration-fast) var(--ease-standard)}.trigger:hover{border-color:var(--border-strong)}.trigger:focus-visible{box-shadow:none}@media not (forced-colors:active){.trigger .date-input:where(:focus-visible){outline:none}}@media not (forced-colors:active){.trigger .calendar-toggle:where(:focus-visible){outline:none}}@media not (forced-colors:active){.trigger:focus-within,.trigger.open{outline:none}}.trigger:focus-within,.trigger.open{box-shadow:var(--_date-picker-focus-shadow)}.trigger.sm{--_field-box-height: var(--ds-field-height, var(--field-h-sm));height:var(--_field-box-height);padding:0 var(--space-2);font-size:var(--font-size-xs)}.trigger.lg{--_field-box-height: var(--ds-field-height, var(--field-h-lg));height:var(--_field-box-height);padding:0 var(--space-4);font-size:var(--font-size-m)}.trigger.disabled,.trigger:disabled{background:var(--surface-disabled);border-color:var(--border-disabled);color:var(--text-disabled);cursor:not-allowed}.input-wrap{position:relative;display:inline-flex;align-self:stretch;align-items:stretch}.mask-ghost{display:flex;align-items:center;font:inherit;font-family:var(--_date-picker-value-font-family);font-size:var(--_date-picker-value-font-size);font-weight:var(--_date-picker-value-weight);font-variant-numeric:tabular-nums;white-space:pre;pointer-events:none;overflow:hidden}.mask-ghost .muted{color:var(--_date-picker-placeholder-color)}.date-input{width:auto;border:none;background:transparent;color:inherit;font:inherit;font-family:var(--_date-picker-value-font-family);font-size:var(--_date-picker-value-font-size);font-weight:var(--_date-picker-value-weight);font-variant-numeric:tabular-nums;padding:0}@media not (forced-colors:active){.date-input{outline:none}}.date-input.masked{position:absolute;inset:0;width:100%;color:transparent;caret-color:var(--_date-picker-trigger-label-color)}.date-input:read-only{cursor:pointer}.date-input:disabled{cursor:not-allowed}.calendar-toggle{display:inline-flex;align-items:center;border:none;background:transparent;color:var(--icon-default);padding:0;cursor:pointer}.calendar-toggle:disabled{cursor:not-allowed}.calendar{--_date-picker-bg-color: var(--ds-date-picker-bg-color, var(--surface-overlay));--_date-picker-border: var(--ds-date-picker-border, var(--border-default));--_date-picker-shadow: var(--ds-date-picker-shadow, var(--ds-elevation-overlay));--_date-picker-day-hover-bg-color: var(--ds-date-picker-day-hover-bg-color, var(--surface-secondary));--_date-picker-day-today-label-color: var(--ds-date-picker-day-today-label-color, var(--accent));--_date-picker-day-selected-bg-color: var(--ds-date-picker-day-selected-bg-color, var(--accent));--_date-picker-day-selected-bg-color-hover: var(--ds-date-picker-day-selected-bg-color-hover, var(--accent-hover));--_date-picker-day-selected-label-color: var(--ds-date-picker-day-selected-label-color, var(--accent-on));--_date-picker-day-range-bg-color: var(--ds-date-picker-day-range-bg-color, var(--accent-subtitle));--_date-picker-day-range-label-color: var(--ds-date-picker-day-range-label-color, var(--accent-strong));--_date-picker-day-disabled-label-color: var(--ds-date-picker-day-disabled-label-color, var(--text-disabled));--_date-picker-day-label-color: var(--ds-date-picker-day-label-color, var(--text-primary));--_date-picker-day-muted-label-color: var(--ds-date-picker-day-muted-label-color, var(--text-muted));--_date-picker-weekday-color: var(--ds-date-picker-weekday-color, var(--text-tertiary));--_date-picker-header-label-color: var(--ds-date-picker-header-label-color, var(--text-primary));--_date-picker-nav-icon-color: var(--ds-date-picker-nav-icon-color, var(--icon-default));--_date-picker-width: var(--ds-date-picker-width, var(--date-picker-w));--_date-picker-panel-radius: var(--ds-date-picker-panel-radius, var(--ds-radius-panel));--_date-picker-focus-shadow: var(--ds-date-picker-focus-shadow, var(--ds-field-focus-shadow));background-color:var(--_date-picker-bg-color);border:var(--border-width-default) solid var(--_date-picker-border);border-radius:var(--_date-picker-panel-radius);box-shadow:var(--_date-picker-shadow);padding:var(--space-3);width:var(--_date-picker-width)}.calendar .head{display:flex;align-items:center;justify-content:space-between;margin-bottom:var(--space-2)}.calendar .period{display:flex;gap:var(--space-1)}.calendar .period-item{position:relative}.calendar .period-trigger{display:inline-flex;align-items:center;gap:var(--space-1);border:0;background:transparent;padding:var(--space-1) var(--space-1-5);border-radius:var(--ds-radius-inner);font:var(--font-weight-bold) var(--font-size-s)/var(--line-height-flat) var(--font-sans);color:var(--_date-picker-header-label-color);cursor:pointer}.calendar .period-trigger:hover{background-color:var(--_date-picker-day-hover-bg-color)}.calendar .period-trigger:focus-visible{outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:var(--focus-ring-offset);animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard)}.calendar .picker-menu{position:absolute;top:calc(100% + var(--space-1));left:0;z-index:1;padding:var(--space-2);width:max-content;min-width:100%;background-color:var(--_date-picker-bg-color);border:var(--border-width-default) solid var(--_date-picker-border);border-radius:var(--radius-md);box-shadow:var(--_date-picker-shadow)}.calendar .picker-head{display:flex;align-items:center;justify-content:space-between;gap:var(--space-2);margin-bottom:var(--space-2)}.calendar .picker-head .picker-nav{width:var(--date-picker-nav-size);height:var(--date-picker-nav-size);border:0;background:transparent;display:grid;place-items:center;color:var(--_date-picker-nav-icon-color);cursor:pointer;border-radius:var(--ds-radius-inner)}.calendar .picker-head .picker-nav:hover:not(:disabled){background-color:var(--_date-picker-day-hover-bg-color)}.calendar .picker-head .picker-nav:disabled{opacity:var(--opacity-disabled);cursor:not-allowed}.calendar .picker-head .picker-range{font:var(--font-weight-bold) var(--font-size-s)/var(--line-height-flat) var(--font-sans);color:var(--_date-picker-header-label-color)}.calendar .picker-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:var(--space-1)}.calendar .picker-cell{border:0;background:transparent;padding:var(--space-1-5) var(--space-2);border-radius:var(--ds-radius-inner);font:var(--font-weight-medium) var(--font-size-s)/var(--line-height-flat) var(--font-sans);color:var(--text-primary);cursor:pointer;text-align:center;white-space:nowrap}.calendar .picker-cell:hover{background-color:var(--_date-picker-day-hover-bg-color)}.calendar .picker-cell:focus-visible{outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:var(--focus-ring-offset);animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard)}.calendar .picker-cell.selected{background-color:var(--_date-picker-day-selected-bg-color);color:var(--_date-picker-day-selected-label-color);font-weight:var(--font-weight-bold)}.calendar .nav{display:flex;gap:var(--space-1)}.calendar .nav button{width:var(--date-picker-nav-size);height:var(--date-picker-nav-size);border:0;background:transparent;display:grid;place-items:center;color:var(--_date-picker-nav-icon-color);cursor:pointer;border-radius:var(--ds-radius-inner)}.calendar .nav button:hover{background-color:var(--_date-picker-day-hover-bg-color)}.calendar .grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:var(--date-picker-cell-gap)}.calendar .dow-row,.calendar .week{display:contents}.calendar .dow{font:var(--font-weight-bold) var(--font-size-2xs)/var(--line-height-flat) var(--font-sans);text-align:center;padding:var(--space-1) 0;color:var(--_date-picker-weekday-color);text-transform:uppercase;letter-spacing:var(--letter-spacing-wider)}.calendar.has-presets{display:flex;flex-direction:row;gap:var(--space-3);width:auto}.calendar.has-presets .calendar-body{flex:0 0 var(--_date-picker-width);width:var(--_date-picker-width)}.calendar .calendar-body{display:flex;flex-direction:column}.calendar .presets{display:flex;flex-direction:column;gap:var(--space-1);border-left:var(--border-width-default) solid var(--_date-picker-border);padding-left:var(--space-3);min-width:8.5rem}.calendar .preset-btn{display:flex;align-items:center;width:100%;min-height:var(--hit-min);border:0;background:transparent;padding:var(--space-2) var(--space-3);border-radius:var(--ds-radius-inner);font:var(--font-weight-medium) var(--font-size-s)/var(--line-height-flat) var(--font-sans);color:var(--text-primary);cursor:pointer;text-align:left;white-space:nowrap}.calendar .preset-btn:hover:not(:disabled){background-color:var(--_date-picker-day-hover-bg-color)}.calendar .preset-btn:focus-visible{outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:var(--focus-ring-offset);animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard)}.calendar .preset-btn:disabled{color:var(--_date-picker-day-disabled-label-color);cursor:not-allowed}@media(width<640px){.calendar{max-width:calc(100vw - var(--space-4))}.calendar.has-presets{flex-direction:column;width:100%}.calendar.has-presets .calendar-body{flex:1 1 auto;width:100%}.calendar .presets{border-left:0;padding-left:0;border-top:var(--border-width-default) solid var(--_date-picker-border);padding-top:var(--space-3);min-width:0;width:100%}}:host(.in-group){width:auto;display:flex}:host(.in-group) .label,:host(.in-group) ds-field-message{display:none}:host(.in-group) .trigger{border:0;border-radius:0;background:transparent;flex:1;height:auto}:host(.in-group) .trigger:hover,:host(.in-group) .trigger:focus,:host(.in-group) .trigger:focus-visible,:host(.in-group) .trigger:focus-within{border:0;box-shadow:none}@media not (forced-colors:active){:host(.in-group) .trigger:hover,:host(.in-group) .trigger:focus,:host(.in-group) .trigger:focus-visible,:host(.in-group) .trigger:focus-within{outline:none}}:host([data-field-state=error]:not(.in-group)) .trigger:not(.disabled):not(:disabled){border-color:var(--error);background-color:var(--error-subtitle)}:host([data-field-state=error]:not(.in-group)) .trigger:not(.disabled):not(:disabled):focus-within,:host([data-field-state=error]:not(.in-group)) .trigger:not(.disabled):not(:disabled):focus-visible{box-shadow:var(--ds-field-focus-shadow-error)}:host([data-field-state=warning]:not(.in-group)) .trigger:not(.disabled):not(:disabled){border-color:var(--warning-text)}:host([data-field-state=success]:not(.in-group)) .trigger:not(.disabled):not(:disabled){border-color:var(--success)}\n"] }]
1231
- }], ctorParameters: () => [], propDecorators: { mode: [{ type: i0.Input, args: [{ isSignal: true, alias: "mode", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], fullWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "fullWidth", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], optional: [{ type: i0.Input, args: [{ isSignal: true, alias: "optional", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], success: [{ type: i0.Input, args: [{ isSignal: true, alias: "success", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], minYear: [{ type: i0.Input, args: [{ isSignal: true, alias: "minYear", required: false }] }], maxYear: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxYear", required: false }] }], minDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "minDate", required: false }] }], maxDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxDate", required: false }] }], disabledDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabledDate", required: false }] }], presets: [{ type: i0.Input, args: [{ isSignal: true, alias: "presets", required: false }] }], locale: [{ type: i0.Input, args: [{ isSignal: true, alias: "locale", required: false }] }], dateFormat: [{ type: i0.Input, args: [{ isSignal: true, alias: "dateFormat", required: false }] }], firstDayOfWeek: [{ type: i0.Input, args: [{ isSignal: true, alias: "firstDayOfWeek", required: false }] }], defaultDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "defaultDate", required: false }] }], allowInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "allowInput", required: false }] }], anchor: [{ type: i0.ViewChild, args: ['anchor', { isSignal: true }] }], inputEl: [{ type: i0.ViewChild, args: ['inputEl', { isSignal: true }] }], panelTpl: [{ type: i0.ViewChild, args: ['panel', { isSignal: true }] }] } });
1236
+ }], ctorParameters: () => [], propDecorators: { mode: [{ type: i0.Input, args: [{ isSignal: true, alias: "mode", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], fullWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "fullWidth", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], optional: [{ type: i0.Input, args: [{ isSignal: true, alias: "optional", required: false }] }], panelClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "panelClass", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], success: [{ type: i0.Input, args: [{ isSignal: true, alias: "success", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], minYear: [{ type: i0.Input, args: [{ isSignal: true, alias: "minYear", required: false }] }], maxYear: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxYear", required: false }] }], minDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "minDate", required: false }] }], maxDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxDate", required: false }] }], disabledDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabledDate", required: false }] }], presets: [{ type: i0.Input, args: [{ isSignal: true, alias: "presets", required: false }] }], locale: [{ type: i0.Input, args: [{ isSignal: true, alias: "locale", required: false }] }], dateFormat: [{ type: i0.Input, args: [{ isSignal: true, alias: "dateFormat", required: false }] }], firstDayOfWeek: [{ type: i0.Input, args: [{ isSignal: true, alias: "firstDayOfWeek", required: false }] }], defaultDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "defaultDate", required: false }] }], allowInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "allowInput", required: false }] }], anchor: [{ type: i0.ViewChild, args: ['anchor', { isSignal: true }] }], inputEl: [{ type: i0.ViewChild, args: ['inputEl', { isSignal: true }] }], panelTpl: [{ type: i0.ViewChild, args: ['panel', { isSignal: true }] }] } });
1232
1237
 
1233
1238
  /**
1234
1239
  * Generated bundle index. Do not edit.