@ids-group-ltd/ids-design-system 0.14.1 → 0.14.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 (126) hide show
  1. package/CHANGELOG.md +336 -0
  2. package/components.md +41 -38
  3. package/docs/agent/INDEX.md +3 -3
  4. package/docs/agent/charts/column-series-component.md +1 -1
  5. package/docs/agent/charts/ds-bar-chart.md +3 -3
  6. package/docs/agent/charts/ds-chart.md +1 -1
  7. package/docs/agent/charts/ds-column-chart.md +3 -3
  8. package/docs/agent/charts/ds-config.md +1 -1
  9. package/docs/agent/charts/ds-funnel-chart.md +3 -3
  10. package/docs/agent/charts/ds-heatmap-chart.md +1 -1
  11. package/docs/agent/charts/ds-line-chart.md +2 -2
  12. package/docs/agent/charts/ds-pie-chart.md +2 -2
  13. package/docs/agent/charts/ds-scatter-chart.md +1 -1
  14. package/docs/agent/charts/ds-waterfall-chart.md +1 -1
  15. package/docs/agent/charts/line-series-component.md +1 -1
  16. package/docs/agent/feedback/ds-description-list.md +3 -0
  17. package/docs/agent/forms/ds-color-picker.md +1 -1
  18. package/docs/agent/forms/ds-date-picker.md +1 -1
  19. package/docs/agent/forms/ds-select.md +1 -1
  20. package/docs/agent/forms/ds-textarea.md +1 -1
  21. package/docs/agent/forms/ds-time-picker.md +1 -1
  22. package/docs/agent/forms/the-picker-family-ds-select-ds-multi-select-ds-autocomplete.md +1 -1
  23. package/docs/agent/foundations/tokens.md +1 -1
  24. package/docs/agent/navigation/ds-pagination.md +1 -1
  25. package/docs/agent/navigation/ds-tabs.md +2 -1
  26. package/docs/agent/overlays/ds-bottom-sheet.md +1 -1
  27. package/docs/agent/overlays/ds-drawer.md +1 -1
  28. package/docs/agent/overlays/ds-modal.md +1 -1
  29. package/docs/agent/overlays/ds-popover.md +1 -1
  30. package/docs/agent/overlays/ds-tooltip.md +4 -4
  31. package/docs/agent/tables/ds-table.md +1 -1
  32. package/fesm2022/ids-group-ltd-ids-design-system-components-autocomplete.mjs +4 -2
  33. package/fesm2022/ids-group-ltd-ids-design-system-components-autocomplete.mjs.map +1 -1
  34. package/fesm2022/ids-group-ltd-ids-design-system-components-bar-chart.mjs +22 -16
  35. package/fesm2022/ids-group-ltd-ids-design-system-components-bar-chart.mjs.map +1 -1
  36. package/fesm2022/ids-group-ltd-ids-design-system-components-bottom-sheet.mjs +16 -4
  37. package/fesm2022/ids-group-ltd-ids-design-system-components-bottom-sheet.mjs.map +1 -1
  38. package/fesm2022/ids-group-ltd-ids-design-system-components-chart-legend.mjs +19 -7
  39. package/fesm2022/ids-group-ltd-ids-design-system-components-chart-legend.mjs.map +1 -1
  40. package/fesm2022/ids-group-ltd-ids-design-system-components-chart-tooltip.mjs +180 -19
  41. package/fesm2022/ids-group-ltd-ids-design-system-components-chart-tooltip.mjs.map +1 -1
  42. package/fesm2022/ids-group-ltd-ids-design-system-components-chart.mjs +175 -93
  43. package/fesm2022/ids-group-ltd-ids-design-system-components-chart.mjs.map +1 -1
  44. package/fesm2022/ids-group-ltd-ids-design-system-components-color-picker.mjs +25 -10
  45. package/fesm2022/ids-group-ltd-ids-design-system-components-color-picker.mjs.map +1 -1
  46. package/fesm2022/ids-group-ltd-ids-design-system-components-column-chart.mjs +10 -11
  47. package/fesm2022/ids-group-ltd-ids-design-system-components-column-chart.mjs.map +1 -1
  48. package/fesm2022/ids-group-ltd-ids-design-system-components-date-picker.mjs +28 -11
  49. package/fesm2022/ids-group-ltd-ids-design-system-components-date-picker.mjs.map +1 -1
  50. package/fesm2022/ids-group-ltd-ids-design-system-components-description-list.mjs +3 -3
  51. package/fesm2022/ids-group-ltd-ids-design-system-components-description-list.mjs.map +1 -1
  52. package/fesm2022/ids-group-ltd-ids-design-system-components-drawer.mjs +13 -4
  53. package/fesm2022/ids-group-ltd-ids-design-system-components-drawer.mjs.map +1 -1
  54. package/fesm2022/ids-group-ltd-ids-design-system-components-funnel-chart.mjs +32 -18
  55. package/fesm2022/ids-group-ltd-ids-design-system-components-funnel-chart.mjs.map +1 -1
  56. package/fesm2022/ids-group-ltd-ids-design-system-components-heatmap-chart.mjs +47 -7
  57. package/fesm2022/ids-group-ltd-ids-design-system-components-heatmap-chart.mjs.map +1 -1
  58. package/fesm2022/ids-group-ltd-ids-design-system-components-line-chart.mjs +11 -11
  59. package/fesm2022/ids-group-ltd-ids-design-system-components-line-chart.mjs.map +1 -1
  60. package/fesm2022/ids-group-ltd-ids-design-system-components-multi-select.mjs +5 -3
  61. package/fesm2022/ids-group-ltd-ids-design-system-components-multi-select.mjs.map +1 -1
  62. package/fesm2022/ids-group-ltd-ids-design-system-components-pagination.mjs +11 -5
  63. package/fesm2022/ids-group-ltd-ids-design-system-components-pagination.mjs.map +1 -1
  64. package/fesm2022/ids-group-ltd-ids-design-system-components-pie-chart.mjs +15 -13
  65. package/fesm2022/ids-group-ltd-ids-design-system-components-pie-chart.mjs.map +1 -1
  66. package/fesm2022/ids-group-ltd-ids-design-system-components-scatter-chart.mjs +35 -5
  67. package/fesm2022/ids-group-ltd-ids-design-system-components-scatter-chart.mjs.map +1 -1
  68. package/fesm2022/ids-group-ltd-ids-design-system-components-select.mjs +5 -4
  69. package/fesm2022/ids-group-ltd-ids-design-system-components-select.mjs.map +1 -1
  70. package/fesm2022/ids-group-ltd-ids-design-system-components-sidenav.mjs +1 -1
  71. package/fesm2022/ids-group-ltd-ids-design-system-components-sidenav.mjs.map +1 -1
  72. package/fesm2022/ids-group-ltd-ids-design-system-components-stat.mjs +1 -1
  73. package/fesm2022/ids-group-ltd-ids-design-system-components-stat.mjs.map +1 -1
  74. package/fesm2022/ids-group-ltd-ids-design-system-components-table.mjs +32 -7
  75. package/fesm2022/ids-group-ltd-ids-design-system-components-table.mjs.map +1 -1
  76. package/fesm2022/ids-group-ltd-ids-design-system-components-tabs.mjs +66 -6
  77. package/fesm2022/ids-group-ltd-ids-design-system-components-tabs.mjs.map +1 -1
  78. package/fesm2022/ids-group-ltd-ids-design-system-components-textarea.mjs +84 -10
  79. package/fesm2022/ids-group-ltd-ids-design-system-components-textarea.mjs.map +1 -1
  80. package/fesm2022/ids-group-ltd-ids-design-system-components-time-picker.mjs +16 -5
  81. package/fesm2022/ids-group-ltd-ids-design-system-components-time-picker.mjs.map +1 -1
  82. package/fesm2022/ids-group-ltd-ids-design-system-components-tooltip.mjs +138 -10
  83. package/fesm2022/ids-group-ltd-ids-design-system-components-tooltip.mjs.map +1 -1
  84. package/fesm2022/ids-group-ltd-ids-design-system-components-waterfall-chart.mjs +25 -9
  85. package/fesm2022/ids-group-ltd-ids-design-system-components-waterfall-chart.mjs.map +1 -1
  86. package/fesm2022/ids-group-ltd-ids-design-system-components.mjs +87 -11
  87. package/fesm2022/ids-group-ltd-ids-design-system-components.mjs.map +1 -1
  88. package/fesm2022/ids-group-ltd-ids-design-system-core.mjs +4 -1
  89. package/fesm2022/ids-group-ltd-ids-design-system-core.mjs.map +1 -1
  90. package/fesm2022/ids-group-ltd-ids-design-system.mjs.map +1 -1
  91. package/migrations/0.14.2.json +427 -0
  92. package/migrations/0.14.3.json +71 -0
  93. package/package.json +1 -1
  94. package/schematics/check-overrides/surface.json +36 -2
  95. package/styles/_chart-frame.scss +34 -12
  96. package/styles/_chart-interactive.scss +10 -9
  97. package/styles/_chart-motion.scss +139 -16
  98. package/styles/_overlay-motion.scss +6 -0
  99. package/styles/_tokens.scss +19 -4
  100. package/themes/_semantic.scss +1 -0
  101. package/themes/dark/_theme.scss +1 -0
  102. package/types/ids-group-ltd-ids-design-system-components-bar-chart.d.ts +24 -10
  103. package/types/ids-group-ltd-ids-design-system-components-bottom-sheet.d.ts +4 -1
  104. package/types/ids-group-ltd-ids-design-system-components-chart-legend.d.ts +6 -1
  105. package/types/ids-group-ltd-ids-design-system-components-chart-tooltip.d.ts +33 -2
  106. package/types/ids-group-ltd-ids-design-system-components-chart.d.ts +151 -103
  107. package/types/ids-group-ltd-ids-design-system-components-color-picker.d.ts +4 -2
  108. package/types/ids-group-ltd-ids-design-system-components-column-chart.d.ts +8 -9
  109. package/types/ids-group-ltd-ids-design-system-components-date-picker.d.ts +4 -2
  110. package/types/ids-group-ltd-ids-design-system-components-description-list.d.ts +1 -1
  111. package/types/ids-group-ltd-ids-design-system-components-drawer.d.ts +4 -1
  112. package/types/ids-group-ltd-ids-design-system-components-funnel-chart.d.ts +23 -11
  113. package/types/ids-group-ltd-ids-design-system-components-heatmap-chart.d.ts +29 -2
  114. package/types/ids-group-ltd-ids-design-system-components-line-chart.d.ts +8 -8
  115. package/types/ids-group-ltd-ids-design-system-components-pagination.d.ts +3 -1
  116. package/types/ids-group-ltd-ids-design-system-components-pie-chart.d.ts +17 -7
  117. package/types/ids-group-ltd-ids-design-system-components-scatter-chart.d.ts +20 -2
  118. package/types/ids-group-ltd-ids-design-system-components-table.d.ts +6 -2
  119. package/types/ids-group-ltd-ids-design-system-components-tabs.d.ts +13 -2
  120. package/types/ids-group-ltd-ids-design-system-components-textarea.d.ts +31 -5
  121. package/types/ids-group-ltd-ids-design-system-components-time-picker.d.ts +3 -2
  122. package/types/ids-group-ltd-ids-design-system-components-tooltip.d.ts +20 -2
  123. package/types/ids-group-ltd-ids-design-system-components-waterfall-chart.d.ts +11 -2
  124. package/types/ids-group-ltd-ids-design-system-components.d.ts +33 -6
  125. package/types/ids-group-ltd-ids-design-system-core.d.ts +14 -1
  126. package/types/ids-group-ltd-ids-design-system.d.ts +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"ids-group-ltd-ids-design-system-components-sidenav.mjs","sources":["../../../src/lib/components/sidenav/brand-name.directive.ts","../../../src/lib/components/sidenav/sidenav.token.ts","../../../src/lib/components/sidenav/sidenav.component.ts","../../../src/lib/components/sidenav/sidenav.component.html","../../../src/lib/components/sidenav/sidenav-group.component.ts","../../../src/lib/components/sidenav/sidenav-group.component.html","../../../src/lib/components/sidenav/sidenav-item.component.ts","../../../src/lib/components/sidenav/sidenav-item.component.html","../../../src/lib/components/sidenav/ids-group-ltd-ids-design-system-components-sidenav.ts"],"sourcesContent":["import { Directive } from '@angular/core';\n\n/**\n * Marks projected wordmark markup for `ds-sidenav`: when present, the sidenav\n * renders the projected content inside `.brand-name` instead of the plain\n * `brand` text (two-tone wordmarks, inline logos etc. stay consumer-side).\n *\n * Interplay: projecting `[dsBrandName]` is enough to render the brand row and\n * its wordmark even without a string `brand`, but it only supplies the\n * wordmark — the letter-mark tile still comes from `logoLetter` (or the first\n * letter of `brand`), so an empty `brand` + projection renders the wordmark\n * with no tile.\n */\n@Directive({\n selector: '[dsBrandName]',\n standalone: true,\n})\nexport class BrandNameDirective {}\n","import { InjectionToken } from '@angular/core';\n\n/** Contract that ds-sidenav-item reads from its parent ds-sidenav. */\nexport interface SidenavContract {\n readonly collapsed: () => boolean;\n /** Whether the active item draws its edge marker. Set once on the sidenav; an\n * item can still override it for itself. */\n readonly rail: () => boolean;\n}\n\nexport const SIDENAV = new InjectionToken<SidenavContract>('SIDENAV');\n","import {\n Component,\n ViewEncapsulation,\n booleanAttribute,\n computed,\n contentChild,\n input,\n} from '@angular/core';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { RouterLink } from '@angular/router';\nimport { BrandNameDirective } from './brand-name.directive';\nimport { resolveBrandValue } from '@ids-group-ltd/ids-design-system/components';\nimport { SIDENAV, type SidenavContract } from './sidenav.token';\n\n@Component({\n selector: 'ds-sidenav',\n standalone: true,\n imports: [NgTemplateOutlet, RouterLink],\n templateUrl: './sidenav.component.html',\n styleUrl: './sidenav.component.scss',\n encapsulation: ViewEncapsulation.Emulated,\n host: {\n '[class.sidenav]': 'true',\n '[class.collapsed]': 'collapsed()',\n },\n providers: [{ provide: SIDENAV, useExisting: SidenavComponent }],\n})\nexport class SidenavComponent implements SidenavContract {\n /** Collapses the rail to icon-only width; read by nested `ds-sidenav-item`/`ds-sidenav-group`. */\n readonly collapsed = input(false, { transform: booleanAttribute });\n /** Whether the ACTIVE item draws its edge marker, for the whole sidenav. Off\n * leaves the active state on the fill and the label alone — check that is still\n * distinguishable before turning it off. An individual `ds-sidenav-item` can\n * override this with its own `rail`. */\n readonly rail = input(true, { transform: booleanAttribute });\n /** Brand text at the top of the rail (auto letter-mark + name). For a custom\n * logo image/SVG, project it into the `[brand]` slot instead. Unset falls back\n * to `DS_CONFIG.brand.name`. Each field resolves on its own, so `brand=\"\"` drops\n * the wordmark while a `logoLetter` in the config still paints its tile. */\n readonly brand = input<string | null>(null);\n /** Letter-mark glyph when it differs from the brand's first letter (e.g. an\n * \"A\" tile beside the \"AppAdmin\" wordmark). Empty = first letter of `brand`;\n * unset falls back to `DS_CONFIG.brand.logoLetter`. */\n readonly logoLetter = input<string | null>(null);\n /** Route the brand row links to — typically the app's home. Unset leaves the row a\n * plain, non-interactive block. Router targets only, and `RouterLink` is\n * instantiated only once this is set, so an app with no router still renders. */\n readonly brandRoute = input<string | readonly unknown[] | null>(null);\n /** Accessible name for the brand link; unset names it \"<brand>, home\". Ignored\n * while `brandRoute` is unset. */\n readonly brandLinkLabel = input<string | null>(null);\n\n /** The template must read THIS, never the input beside it — that one is null\n * until bound, and the config default lives here. */\n readonly brandName = resolveBrandValue(this.brand, 'name');\n readonly letterGlyph = resolveBrandValue(this.logoLetter, 'logoLetter');\n\n /** Projected `[dsBrandName]` wordmark markup, when the consumer provides one. */\n protected readonly brandNameRef = contentChild(BrandNameDirective);\n protected readonly hasBrandName = computed(() => !!this.brandNameRef());\n\n /** Spread, not `charAt(0)`: the latter indexes UTF-16 code UNITS, so a brand\n * starting with an astral character (an emoji, a rarer CJK glyph) yields half\n * a surrogate pair and paints as tofu. */\n protected readonly markGlyph = computed(\n () => this.letterGlyph() || [...this.brandName()][0] || '',\n );\n\n protected readonly brandAriaLabel = computed(() => {\n const own = this.brandLinkLabel();\n if (own) {\n return own;\n }\n const name = this.brandName();\n\n return name ? `${name}, home` : 'Home';\n });\n}\n","@if (brandRoute()) {\n <a\n class=\"brand brand-link\"\n [routerLink]=\"brandRoute()\"\n [attr.aria-label]=\"brandAriaLabel()\">\n <ng-container [ngTemplateOutlet]=\"brandContent\" />\n </a>\n} @else {\n <div class=\"brand\">\n <ng-container [ngTemplateOutlet]=\"brandContent\" />\n </div>\n}\n\n<ng-template #brandContent>\n <ng-content select=\"[brand]\"></ng-content>\n\n @if (letterGlyph() || brandName()) {\n <span\n class=\"mark\"\n aria-hidden=\"true\">\n {{ markGlyph() }}\n </span>\n }\n\n @if (brandName() || hasBrandName()) {\n <span class=\"brand-name\">\n @if (hasBrandName()) {\n <ng-content select=\"[dsBrandName]\"></ng-content>\n } @else {\n {{ brandName() }}\n }\n </span>\n }\n</ng-template>\n\n<ng-content></ng-content>\n","import { dsAriaCurrent } 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 {\n Component,\n ViewEncapsulation,\n booleanAttribute,\n computed,\n inject,\n input,\n model,\n} from '@angular/core';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { RouterLink, RouterLinkActive } from '@angular/router';\nimport { IconComponent } from '@ids-group-ltd/ids-design-system/icons';\nimport { DS_INTL } from '@ids-group-ltd/ids-design-system/core';\nimport type { IconName } from '@ids-group-ltd/ids-design-system/core';\n\n@Component({\n selector: 'ds-sidenav-group',\n standalone: true,\n imports: [IconComponent, NgTemplateOutlet, RouterLink, RouterLinkActive],\n templateUrl: './sidenav-group.component.html',\n styleUrl: './sidenav-group.component.scss',\n encapsulation: ViewEncapsulation.Emulated,\n})\nexport class SidenavGroupComponent {\n protected readonly intl = inject(DS_INTL);\n\n /** Group heading text. */\n readonly label = input<string>('');\n /** Optional group icon; omit to project custom content via the `[icon]` slot instead. */\n readonly icon = input<IconName | null>(null);\n /** When true, the label/icon row becomes a clickable header that expands/collapses the group. */\n readonly expandable = input(false, { transform: booleanAttribute });\n /** Makes the group a destination of its own as well as a container: the header navigates here\n * and the caret becomes a separate control, because one control cannot both go somewhere and\n * stay to open something. Unset (the default) the whole header only expands — a heading that\n * navigates closes the page being read the moment someone reaches for the group beneath it. */\n readonly routerLink = input<DsRouterLink>(null);\n /** Overrides what the group header announces when it is itself a destination. Unset, the page\n * the reader is on announces `page` and the section containing it announces `true`. */\n readonly ariaCurrent = input<DsAriaCurrent | null | undefined>(undefined);\n /** Two-way bindable open state; defaults open so a non-expandable group always shows its items. */\n readonly expanded = model<boolean>(true);\n\n /** A header that navigates hands the caret its own button; one that does not is the button. */\n private readonly noModifiers = computed<DsLinkModifiers>(() => ({}));\n protected readonly ariaCurrentResolved = dsAriaCurrent(\n this.routerLink,\n this.noModifiers,\n this.ariaCurrent,\n );\n\n protected readonly headerNavigates = computed(\n () => this.expandable() && this.routerLink() !== null,\n );\n\n protected toggle(): void {\n if (!this.expandable()) {\n return;\n }\n this.expanded.update((value) => !value);\n }\n}\n","<!-- Single <ng-content> outside any @if blocks. Angular accepts only one\n default slot per component; duplicate <ng-content> elements caused\n children to silently drop when control flow chose a non-matching branch.\n The same holds for the named [ds-group-icon] slot, which is why the icon\n and title live in ONE template both header branches stamp out. -->\n<ng-template #headerContent>\n @if (icon()) {\n <ds-icon\n class=\"group-icon\"\n [name]=\"icon()!\"\n [size]=\"18\">\n </ds-icon>\n } @else {\n <!-- `[ds-group-icon]` is selector-distinct from `[icon]` slots used on\n sidenav-item children, so projected icons don't get swallowed when\n a consumer puts items inside the group. -->\n <span class=\"group-icon\">\n <ng-content select=\"[ds-group-icon]\"></ng-content>\n </span>\n }\n\n @if (label()) {\n <span class=\"group-title\">\n {{ label() }}\n </span>\n }\n</ng-template>\n\n@if (headerNavigates()) {\n <div class=\"group-header-row\">\n <a\n class=\"group-header\"\n routerLinkActive=\"active\"\n [routerLink]=\"routerLink()\"\n [ariaCurrentWhenActive]=\"ariaCurrentResolved()\">\n <ng-container [ngTemplateOutlet]=\"headerContent\" />\n </a>\n\n <button\n type=\"button\"\n class=\"group-caret-button\"\n [attr.aria-expanded]=\"expanded()\"\n [attr.aria-label]=\"\n expanded()\n ? intl().sidenav.collapseGroup(label())\n : intl().sidenav.expandGroup(label())\n \"\n (click)=\"toggle()\">\n <ds-icon\n class=\"group-caret\"\n name=\"chevronDown\"\n [class.open]=\"expanded()\"\n [size]=\"14\">\n </ds-icon>\n </button>\n </div>\n} @else if (expandable()) {\n <button\n type=\"button\"\n class=\"group-header\"\n [attr.aria-expanded]=\"expanded()\"\n (click)=\"toggle()\">\n <ng-container [ngTemplateOutlet]=\"headerContent\" />\n\n <ds-icon\n class=\"group-caret\"\n name=\"chevronDown\"\n [class.open]=\"expanded()\"\n [size]=\"14\">\n </ds-icon>\n </button>\n} @else if (label()) {\n <span class=\"group-label\">\n {{ label() }}\n </span>\n}\n\n<div\n class=\"group-body\"\n [class.hidden]=\"expandable() && !expanded()\"\n [attr.inert]=\"expandable() && !expanded() ? '' : null\">\n <ng-content></ng-content>\n</div>\n","import { dsAriaCurrent } 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 { NgTemplateOutlet } from '@angular/common';\nimport {\n Component,\n ViewEncapsulation,\n booleanAttribute,\n computed,\n inject,\n input,\n output,\n} from '@angular/core';\nimport { RouterLink, RouterLinkActive } from '@angular/router';\nimport { IconComponent } from '@ids-group-ltd/ids-design-system/icons';\nimport { TooltipDirective } from '@ids-group-ltd/ids-design-system/components/tooltip';\nimport type { IconName } from '@ids-group-ltd/ids-design-system/core';\nimport { SIDENAV } from './sidenav.token';\n\n@Component({\n selector: 'ds-sidenav-item',\n standalone: true,\n imports: [\n IconComponent,\n RouterLink,\n RouterLinkActive,\n NgTemplateOutlet,\n TooltipDirective,\n ],\n templateUrl: './sidenav-item.component.html',\n styleUrl: './sidenav-item.component.scss',\n encapsulation: ViewEncapsulation.Emulated,\n})\nexport class SidenavItemComponent {\n /** Icon shown before the label; omit to project a custom icon via the `[icon]` slot instead. */\n readonly icon = input<IconName | null>(null);\n /** Visible link text; also used as the tooltip/aria-label when the rail is collapsed. */\n readonly label = input.required<string>();\n /** Plain `href` target, used when `routerLink` is not set. */\n readonly href = input<string>('');\n /** Angular `RouterLink` target — string or array form for dynamic segments. */\n readonly routerLink = input<DsRouterLink>(null);\n /** Applies the active style; also drives `aria-current` when not using `routerLink`. */\n readonly active = input(false, { transform: booleanAttribute });\n /** Overrides what an active item announces. Unset, an exact match announces `page` and a prefix\n * match announces `true` — in a sidenav the prefix case is \"you are in this section\", which is\n * exactly what `true` means. */\n readonly ariaCurrent = input<DsAriaCurrent | null | undefined>(undefined);\n /** Numeric count shown at the end of the item. */\n readonly badge = input<number | null>(null);\n /** Shows an alert dot alongside the badge. */\n readonly hasAlert = input(false, { transform: booleanAttribute });\n /** Disables the item — non-navigable and styled as inactive. */\n readonly disabled = input(false, { transform: booleanAttribute });\n /** Emitted on click, carrying the `MouseEvent`. On an `href` item,\n * `preventDefault()` intercepts navigation (e.g. a docs sidebar driving\n * scroll-spy); a `routerLink` item navigates regardless — Angular's\n * RouterLink ignores `defaultPrevented` — so treat it as a click hook there. */\n readonly activate = output<MouseEvent>();\n\n /** Whether THIS item draws its edge marker when active. Unset follows the parent\n * `ds-sidenav`, then on — the same \"null means not deciding\" reading as the rest\n * of the library, so a sidenav-wide `[rail]=\"false\"` is not fought per item. */\n readonly rail = input<boolean | null, unknown>(null, {\n transform: (value) => (value == null ? null : booleanAttribute(value)),\n });\n\n private readonly sidenav = inject(SIDENAV, { optional: true });\n\n private readonly noModifiers = computed<DsLinkModifiers>(() => ({}));\n protected readonly ariaCurrentResolved = dsAriaCurrent(\n this.routerLink,\n this.noModifiers,\n this.ariaCurrent,\n );\n\n protected readonly railResolved = computed(\n () => this.rail() ?? this.sidenav?.rail() ?? true,\n );\n\n protected onActivate(event: MouseEvent): void {\n if (this.disabled()) {\n return;\n }\n this.activate.emit(event);\n }\n\n /** Tooltip text shown when collapsed; empty string suppresses the tooltip when expanded. */\n protected readonly collapsedTooltip = computed(() =>\n this.sidenav?.collapsed() ? this.label() : '',\n );\n\n // Only name the link via aria-label when collapsed (icon-only, the .item-label\n // is display:none). Expanded, the visible label names it and any aria-label\n // would override it — suppressing the badge count / alert dot from the name.\n protected readonly collapsedAriaLabel = computed(() =>\n this.sidenav?.collapsed() ? this.label() : null,\n );\n\n protected readonly linkClasses = computed(() => {\n const parts = ['item'];\n if (this.active()) {\n parts.push('active');\n }\n // The routerLink variant gets `active` from routerLinkActive, not from here,\n // so the rail opt-out has to be a class of its own rather than folded in.\n if (!this.railResolved()) {\n parts.push('no-rail');\n }\n if (this.disabled()) {\n parts.push('disabled');\n }\n\n return parts.join(' ');\n });\n}\n","<!-- Selector-scoped slots ([icon], [trailing]) coexist with no default\n <ng-content> here — projection goes via attributes only, so consumers\n can compose icon + label + arbitrary trailing content (status pill,\n status icon, etc.). The two <a> variants (routerLink vs href) share one\n #content template so the inner markup isn't duplicated. -->\n@if (routerLink()) {\n <a\n routerLinkActive=\"active\"\n dsTooltipPlacement=\"right\"\n [routerLink]=\"disabled() ? null : routerLink()\"\n [class]=\"linkClasses()\"\n [attr.aria-label]=\"collapsedAriaLabel()\"\n [ariaCurrentWhenActive]=\"ariaCurrentResolved()\"\n [attr.aria-disabled]=\"disabled() ? 'true' : null\"\n [attr.tabindex]=\"disabled() ? -1 : null\"\n [dsTooltip]=\"collapsedTooltip()\"\n (click)=\"onActivate($event)\">\n <ng-container [ngTemplateOutlet]=\"content\" />\n </a>\n} @else if (href()) {\n <a\n dsTooltipPlacement=\"right\"\n [href]=\"href()\"\n [class]=\"linkClasses()\"\n [attr.aria-label]=\"collapsedAriaLabel()\"\n [attr.aria-current]=\"active() ? 'page' : null\"\n [attr.aria-disabled]=\"disabled() ? 'true' : null\"\n [attr.tabindex]=\"disabled() ? -1 : null\"\n [dsTooltip]=\"collapsedTooltip()\"\n (click)=\"onActivate($event)\">\n <ng-container [ngTemplateOutlet]=\"content\" />\n </a>\n} @else {\n <!-- No destination, so not a link: an `href=\"#\"` navigates — it rewrites the URL\n and discards the scroll position on every click. An item that only emits\n `activate` is a button. -->\n <button\n type=\"button\"\n dsTooltipPlacement=\"right\"\n [class]=\"linkClasses()\"\n [attr.aria-label]=\"collapsedAriaLabel()\"\n [attr.aria-current]=\"active() ? 'page' : null\"\n [disabled]=\"disabled()\"\n [dsTooltip]=\"collapsedTooltip()\"\n (click)=\"onActivate($event)\">\n <ng-container [ngTemplateOutlet]=\"content\" />\n </button>\n}\n\n<ng-template #content>\n @if (icon()) {\n <ds-icon\n class=\"icon\"\n [name]=\"icon()!\"\n [size]=\"20\">\n </ds-icon>\n } @else {\n <span class=\"icon\">\n <ng-content select=\"[icon]\"></ng-content>\n </span>\n }\n\n @if (label()) {\n <span class=\"item-label\">\n {{ label() }}\n </span>\n }\n\n <span class=\"trailing\">\n <ng-content select=\"[trailing]\"></ng-content>\n </span>\n\n @if (badge() !== null) {\n <span class=\"count\">\n {{ badge() }}\n </span>\n }\n\n @if (hasAlert()) {\n <span class=\"alert\"></span>\n }\n</ng-template>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAEA;;;;;;;;;;AAUG;MAKU,kBAAkB,CAAA;wGAAlB,kBAAkB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;4FAAlB,kBAAkB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,eAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;4FAAlB,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAJ9B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,eAAe;AACzB,oBAAA,UAAU,EAAE,IAAI;AACjB,iBAAA;;;MCNY,OAAO,GAAG,IAAI,cAAc,CAAkB,SAAS;;MCiBvD,gBAAgB,CAAA;;IAElB,SAAS,GAAG,KAAK,CAAC,KAAK,iFAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;AAClE;;;AAGyC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gB;qBACjB,EAAA,aAAA,EAGc,iBAAiB,CAAC,QAAQ,EAAA,QAAA,EAAA,ihFAAA,EAAA,MAAA,EAAA,CAAA,6tJAAA,CAAA,EAAA;;;AElC3C;;AAEG;;;;"}
1
+ {"version":3,"file":"ids-group-ltd-ids-design-system-components-sidenav.mjs","sources":["../../../src/lib/components/sidenav/brand-name.directive.ts","../../../src/lib/components/sidenav/sidenav.token.ts","../../../src/lib/components/sidenav/sidenav.component.ts","../../../src/lib/components/sidenav/sidenav.component.html","../../../src/lib/components/sidenav/sidenav-group.component.ts","../../../src/lib/components/sidenav/sidenav-group.component.html","../../../src/lib/components/sidenav/sidenav-item.component.ts","../../../src/lib/components/sidenav/sidenav-item.component.html","../../../src/lib/components/sidenav/ids-group-ltd-ids-design-system-components-sidenav.ts"],"sourcesContent":["import { Directive } from '@angular/core';\n\n/**\n * Marks projected wordmark markup for `ds-sidenav`: when present, the sidenav\n * renders the projected content inside `.brand-name` instead of the plain\n * `brand` text (two-tone wordmarks, inline logos etc. stay consumer-side).\n *\n * Interplay: projecting `[dsBrandName]` is enough to render the brand row and\n * its wordmark even without a string `brand`, but it only supplies the\n * wordmark — the letter-mark tile still comes from `logoLetter` (or the first\n * letter of `brand`), so an empty `brand` + projection renders the wordmark\n * with no tile.\n */\n@Directive({\n selector: '[dsBrandName]',\n standalone: true,\n})\nexport class BrandNameDirective {}\n","import { InjectionToken } from '@angular/core';\n\n/** Contract that ds-sidenav-item reads from its parent ds-sidenav. */\nexport interface SidenavContract {\n readonly collapsed: () => boolean;\n /** Whether the active item draws its edge marker. Set once on the sidenav; an\n * item can still override it for itself. */\n readonly rail: () => boolean;\n}\n\nexport const SIDENAV = new InjectionToken<SidenavContract>('SIDENAV');\n","import {\n Component,\n ViewEncapsulation,\n booleanAttribute,\n computed,\n contentChild,\n input,\n} from '@angular/core';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { RouterLink } from '@angular/router';\nimport { BrandNameDirective } from './brand-name.directive';\nimport { resolveBrandValue } from '@ids-group-ltd/ids-design-system/components';\nimport { SIDENAV, type SidenavContract } from './sidenav.token';\n\n@Component({\n selector: 'ds-sidenav',\n standalone: true,\n imports: [NgTemplateOutlet, RouterLink],\n templateUrl: './sidenav.component.html',\n styleUrl: './sidenav.component.scss',\n encapsulation: ViewEncapsulation.Emulated,\n host: {\n '[class.sidenav]': 'true',\n '[class.collapsed]': 'collapsed()',\n },\n providers: [{ provide: SIDENAV, useExisting: SidenavComponent }],\n})\nexport class SidenavComponent implements SidenavContract {\n /** Collapses the rail to icon-only width; read by nested `ds-sidenav-item`/`ds-sidenav-group`. */\n readonly collapsed = input(false, { transform: booleanAttribute });\n /** Whether the ACTIVE item draws its edge marker, for the whole sidenav. Off\n * leaves the active state on the fill and the label alone — check that is still\n * distinguishable before turning it off. An individual `ds-sidenav-item` can\n * override this with its own `rail`. */\n readonly rail = input(true, { transform: booleanAttribute });\n /** Brand text at the top of the rail (auto letter-mark + name). For a custom\n * logo image/SVG, project it into the `[brand]` slot instead. Unset falls back\n * to `DS_CONFIG.brand.name`. Each field resolves on its own, so `brand=\"\"` drops\n * the wordmark while a `logoLetter` in the config still paints its tile. */\n readonly brand = input<string | null>(null);\n /** Letter-mark glyph when it differs from the brand's first letter (e.g. an\n * \"A\" tile beside the \"AppAdmin\" wordmark). Empty = first letter of `brand`;\n * unset falls back to `DS_CONFIG.brand.logoLetter`. */\n readonly logoLetter = input<string | null>(null);\n /** Route the brand row links to — typically the app's home. Unset leaves the row a\n * plain, non-interactive block. Router targets only, and `RouterLink` is\n * instantiated only once this is set, so an app with no router still renders. */\n readonly brandRoute = input<string | readonly unknown[] | null>(null);\n /** Accessible name for the brand link; unset names it \"<brand>, home\". Ignored\n * while `brandRoute` is unset. */\n readonly brandLinkLabel = input<string | null>(null);\n\n /** The template must read THIS, never the input beside it — that one is null\n * until bound, and the config default lives here. */\n readonly brandName = resolveBrandValue(this.brand, 'name');\n readonly letterGlyph = resolveBrandValue(this.logoLetter, 'logoLetter');\n\n /** Projected `[dsBrandName]` wordmark markup, when the consumer provides one. */\n protected readonly brandNameRef = contentChild(BrandNameDirective);\n protected readonly hasBrandName = computed(() => !!this.brandNameRef());\n\n /** Spread, not `charAt(0)`: the latter indexes UTF-16 code UNITS, so a brand\n * starting with an astral character (an emoji, a rarer CJK glyph) yields half\n * a surrogate pair and paints as tofu. */\n protected readonly markGlyph = computed(\n () => this.letterGlyph() || [...this.brandName()][0] || '',\n );\n\n protected readonly brandAriaLabel = computed(() => {\n const own = this.brandLinkLabel();\n if (own) {\n return own;\n }\n const name = this.brandName();\n\n return name ? `${name}, home` : 'Home';\n });\n}\n","@if (brandRoute()) {\n <a\n class=\"brand brand-link\"\n [routerLink]=\"brandRoute()\"\n [attr.aria-label]=\"brandAriaLabel()\">\n <ng-container [ngTemplateOutlet]=\"brandContent\" />\n </a>\n} @else {\n <div class=\"brand\">\n <ng-container [ngTemplateOutlet]=\"brandContent\" />\n </div>\n}\n\n<ng-template #brandContent>\n <ng-content select=\"[brand]\"></ng-content>\n\n @if (letterGlyph() || brandName()) {\n <span\n class=\"mark\"\n aria-hidden=\"true\">\n {{ markGlyph() }}\n </span>\n }\n\n @if (brandName() || hasBrandName()) {\n <span class=\"brand-name\">\n @if (hasBrandName()) {\n <ng-content select=\"[dsBrandName]\"></ng-content>\n } @else {\n {{ brandName() }}\n }\n </span>\n }\n</ng-template>\n\n<ng-content></ng-content>\n","import { dsAriaCurrent } 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 {\n Component,\n ViewEncapsulation,\n booleanAttribute,\n computed,\n inject,\n input,\n model,\n} from '@angular/core';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { RouterLink, RouterLinkActive } from '@angular/router';\nimport { IconComponent } from '@ids-group-ltd/ids-design-system/icons';\nimport { DS_INTL } from '@ids-group-ltd/ids-design-system/core';\nimport type { IconName } from '@ids-group-ltd/ids-design-system/core';\n\n@Component({\n selector: 'ds-sidenav-group',\n standalone: true,\n imports: [IconComponent, NgTemplateOutlet, RouterLink, RouterLinkActive],\n templateUrl: './sidenav-group.component.html',\n styleUrl: './sidenav-group.component.scss',\n encapsulation: ViewEncapsulation.Emulated,\n})\nexport class SidenavGroupComponent {\n protected readonly intl = inject(DS_INTL);\n\n /** Group heading text. */\n readonly label = input<string>('');\n /** Optional group icon; omit to project custom content via the `[icon]` slot instead. */\n readonly icon = input<IconName | null>(null);\n /** When true, the label/icon row becomes a clickable header that expands/collapses the group. */\n readonly expandable = input(false, { transform: booleanAttribute });\n /** Makes the group a destination of its own as well as a container: the header navigates here\n * and the caret becomes a separate control, because one control cannot both go somewhere and\n * stay to open something. Unset (the default) the whole header only expands — a heading that\n * navigates closes the page being read the moment someone reaches for the group beneath it. */\n readonly routerLink = input<DsRouterLink>(null);\n /** Overrides what the group header announces when it is itself a destination. Unset, the page\n * the reader is on announces `page` and the section containing it announces `true`. */\n readonly ariaCurrent = input<DsAriaCurrent | null | undefined>(undefined);\n /** Two-way bindable open state; defaults open so a non-expandable group always shows its items. */\n readonly expanded = model<boolean>(true);\n\n /** A header that navigates hands the caret its own button; one that does not is the button. */\n private readonly noModifiers = computed<DsLinkModifiers>(() => ({}));\n protected readonly ariaCurrentResolved = dsAriaCurrent(\n this.routerLink,\n this.noModifiers,\n this.ariaCurrent,\n );\n\n protected readonly headerNavigates = computed(\n () => this.expandable() && this.routerLink() !== null,\n );\n\n protected toggle(): void {\n if (!this.expandable()) {\n return;\n }\n this.expanded.update((value) => !value);\n }\n}\n","<!-- Single <ng-content> outside any @if blocks. Angular accepts only one\n default slot per component; duplicate <ng-content> elements caused\n children to silently drop when control flow chose a non-matching branch.\n The same holds for the named [ds-group-icon] slot, which is why the icon\n and title live in ONE template both header branches stamp out. -->\n<ng-template #headerContent>\n @if (icon()) {\n <ds-icon\n class=\"group-icon\"\n [name]=\"icon()!\"\n [size]=\"18\">\n </ds-icon>\n } @else {\n <!-- `[ds-group-icon]` is selector-distinct from `[icon]` slots used on\n sidenav-item children, so projected icons don't get swallowed when\n a consumer puts items inside the group. -->\n <span class=\"group-icon\">\n <ng-content select=\"[ds-group-icon]\"></ng-content>\n </span>\n }\n\n @if (label()) {\n <span class=\"group-title\">\n {{ label() }}\n </span>\n }\n</ng-template>\n\n@if (headerNavigates()) {\n <div class=\"group-header-row\">\n <a\n class=\"group-header\"\n routerLinkActive=\"active\"\n [routerLink]=\"routerLink()\"\n [ariaCurrentWhenActive]=\"ariaCurrentResolved()\">\n <ng-container [ngTemplateOutlet]=\"headerContent\" />\n </a>\n\n <button\n type=\"button\"\n class=\"group-caret-button\"\n [attr.aria-expanded]=\"expanded()\"\n [attr.aria-label]=\"\n expanded()\n ? intl().sidenav.collapseGroup(label())\n : intl().sidenav.expandGroup(label())\n \"\n (click)=\"toggle()\">\n <ds-icon\n class=\"group-caret\"\n name=\"chevronDown\"\n [class.open]=\"expanded()\"\n [size]=\"14\">\n </ds-icon>\n </button>\n </div>\n} @else if (expandable()) {\n <button\n type=\"button\"\n class=\"group-header\"\n [attr.aria-expanded]=\"expanded()\"\n (click)=\"toggle()\">\n <ng-container [ngTemplateOutlet]=\"headerContent\" />\n\n <ds-icon\n class=\"group-caret\"\n name=\"chevronDown\"\n [class.open]=\"expanded()\"\n [size]=\"14\">\n </ds-icon>\n </button>\n} @else if (label()) {\n <span class=\"group-label\">\n {{ label() }}\n </span>\n}\n\n<div\n class=\"group-body\"\n [class.hidden]=\"expandable() && !expanded()\"\n [attr.inert]=\"expandable() && !expanded() ? '' : null\">\n <ng-content></ng-content>\n</div>\n","import { dsAriaCurrent } 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 { NgTemplateOutlet } from '@angular/common';\nimport {\n Component,\n ViewEncapsulation,\n booleanAttribute,\n computed,\n inject,\n input,\n output,\n} from '@angular/core';\nimport { RouterLink, RouterLinkActive } from '@angular/router';\nimport { IconComponent } from '@ids-group-ltd/ids-design-system/icons';\nimport { TooltipDirective } from '@ids-group-ltd/ids-design-system/components/tooltip';\nimport type { IconName } from '@ids-group-ltd/ids-design-system/core';\nimport { SIDENAV } from './sidenav.token';\n\n@Component({\n selector: 'ds-sidenav-item',\n standalone: true,\n imports: [\n IconComponent,\n RouterLink,\n RouterLinkActive,\n NgTemplateOutlet,\n TooltipDirective,\n ],\n templateUrl: './sidenav-item.component.html',\n styleUrl: './sidenav-item.component.scss',\n encapsulation: ViewEncapsulation.Emulated,\n})\nexport class SidenavItemComponent {\n /** Icon shown before the label; omit to project a custom icon via the `[icon]` slot instead. */\n readonly icon = input<IconName | null>(null);\n /** Visible link text; also used as the tooltip/aria-label when the rail is collapsed. */\n readonly label = input.required<string>();\n /** Plain `href` target, used when `routerLink` is not set. */\n readonly href = input<string>('');\n /** Angular `RouterLink` target — string or array form for dynamic segments. */\n readonly routerLink = input<DsRouterLink>(null);\n /** Applies the active style; also drives `aria-current` when not using `routerLink`. */\n readonly active = input(false, { transform: booleanAttribute });\n /** Overrides what an active item announces. Unset, an exact match announces `page` and a prefix\n * match announces `true` — in a sidenav the prefix case is \"you are in this section\", which is\n * exactly what `true` means. */\n readonly ariaCurrent = input<DsAriaCurrent | null | undefined>(undefined);\n /** Numeric count shown at the end of the item. */\n readonly badge = input<number | null>(null);\n /** Shows an alert dot alongside the badge. */\n readonly hasAlert = input(false, { transform: booleanAttribute });\n /** Disables the item — non-navigable and styled as inactive. */\n readonly disabled = input(false, { transform: booleanAttribute });\n /** Emitted on click, carrying the `MouseEvent`. On an `href` item,\n * `preventDefault()` intercepts navigation (e.g. a docs sidebar driving\n * scroll-spy); a `routerLink` item navigates regardless — Angular's\n * RouterLink ignores `defaultPrevented` — so treat it as a click hook there. */\n readonly activate = output<MouseEvent>();\n\n /** Whether THIS item draws its edge marker when active. Unset follows the parent\n * `ds-sidenav`, then on — the same \"null means not deciding\" reading as the rest\n * of the library, so a sidenav-wide `[rail]=\"false\"` is not fought per item. */\n readonly rail = input<boolean | null, unknown>(null, {\n transform: (value) => (value == null ? null : booleanAttribute(value)),\n });\n\n private readonly sidenav = inject(SIDENAV, { optional: true });\n\n private readonly noModifiers = computed<DsLinkModifiers>(() => ({}));\n protected readonly ariaCurrentResolved = dsAriaCurrent(\n this.routerLink,\n this.noModifiers,\n this.ariaCurrent,\n );\n\n protected readonly railResolved = computed(\n () => this.rail() ?? this.sidenav?.rail() ?? true,\n );\n\n protected onActivate(event: MouseEvent): void {\n if (this.disabled()) {\n return;\n }\n this.activate.emit(event);\n }\n\n /** Tooltip text shown when collapsed; empty string suppresses the tooltip when expanded. */\n protected readonly collapsedTooltip = computed(() =>\n this.sidenav?.collapsed() ? this.label() : '',\n );\n\n // Only name the link via aria-label when collapsed (icon-only, the .item-label\n // is display:none). Expanded, the visible label names it and any aria-label\n // would override it — suppressing the badge count / alert dot from the name.\n protected readonly collapsedAriaLabel = computed(() =>\n this.sidenav?.collapsed() ? this.label() : null,\n );\n\n protected readonly linkClasses = computed(() => {\n const parts = ['item'];\n if (this.active()) {\n parts.push('active');\n }\n // The routerLink variant gets `active` from routerLinkActive, not from here,\n // so the rail opt-out has to be a class of its own rather than folded in.\n if (!this.railResolved()) {\n parts.push('no-rail');\n }\n if (this.disabled()) {\n parts.push('disabled');\n }\n\n return parts.join(' ');\n });\n}\n","<!-- Selector-scoped slots ([icon], [trailing]) coexist with no default\n <ng-content> here — projection goes via attributes only, so consumers\n can compose icon + label + arbitrary trailing content (status pill,\n status icon, etc.). The two <a> variants (routerLink vs href) share one\n #content template so the inner markup isn't duplicated. -->\n@if (routerLink()) {\n <a\n routerLinkActive=\"active\"\n dsTooltipPlacement=\"right\"\n [routerLink]=\"disabled() ? null : routerLink()\"\n [class]=\"linkClasses()\"\n [attr.aria-label]=\"collapsedAriaLabel()\"\n [ariaCurrentWhenActive]=\"ariaCurrentResolved()\"\n [attr.aria-disabled]=\"disabled() ? 'true' : null\"\n [attr.tabindex]=\"disabled() ? -1 : null\"\n [dsTooltip]=\"collapsedTooltip()\"\n (click)=\"onActivate($event)\">\n <ng-container [ngTemplateOutlet]=\"content\" />\n </a>\n} @else if (href()) {\n <a\n dsTooltipPlacement=\"right\"\n [href]=\"href()\"\n [class]=\"linkClasses()\"\n [attr.aria-label]=\"collapsedAriaLabel()\"\n [attr.aria-current]=\"active() ? 'page' : null\"\n [attr.aria-disabled]=\"disabled() ? 'true' : null\"\n [attr.tabindex]=\"disabled() ? -1 : null\"\n [dsTooltip]=\"collapsedTooltip()\"\n (click)=\"onActivate($event)\">\n <ng-container [ngTemplateOutlet]=\"content\" />\n </a>\n} @else {\n <!-- No destination, so not a link: an `href=\"#\"` navigates — it rewrites the URL\n and discards the scroll position on every click. An item that only emits\n `activate` is a button. -->\n <button\n type=\"button\"\n dsTooltipPlacement=\"right\"\n [class]=\"linkClasses()\"\n [attr.aria-label]=\"collapsedAriaLabel()\"\n [attr.aria-current]=\"active() ? 'page' : null\"\n [disabled]=\"disabled()\"\n [dsTooltip]=\"collapsedTooltip()\"\n (click)=\"onActivate($event)\">\n <ng-container [ngTemplateOutlet]=\"content\" />\n </button>\n}\n\n<ng-template #content>\n @if (icon()) {\n <ds-icon\n class=\"icon\"\n [name]=\"icon()!\"\n [size]=\"20\">\n </ds-icon>\n } @else {\n <span class=\"icon\">\n <ng-content select=\"[icon]\"></ng-content>\n </span>\n }\n\n @if (label()) {\n <span class=\"item-label\">\n {{ label() }}\n </span>\n }\n\n <span class=\"trailing\">\n <ng-content select=\"[trailing]\"></ng-content>\n </span>\n\n @if (badge() !== null) {\n <span class=\"count\">\n {{ badge() }}\n </span>\n }\n\n @if (hasAlert()) {\n <span class=\"alert\"></span>\n }\n</ng-template>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAEA;;;;;;;;;;AAUG;MAKU,kBAAkB,CAAA;wGAAlB,kBAAkB,EAAA,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A,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAChB,gBAAgB,EAAA,QAAA,EAAA,oBAAA,EAAA,MAAA,EAAA,CAAA,yBAAA,EAAA,kBAAA,EAAA,0BAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAChB,gBAAgB,EAAA,QAAA,EAAA,aAAA,EAAA,MAAA,EAAA,CAAA,WAAA,EAAA,oBAAA,EAAA,gBAAA,EAAA,sBAAA,EAAA,uBAAA,CAAA,EAAA,CAAA,EAAA,CAAA;;4FAMP,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBAdhC,SAAS;+BACE,iBAAiB,EAAA,UAAA,EACf,IAAI,EAAA,OAAA,EACP;wBACP,aAAa;wBACb,UAAU;wBACV,gBAAgB;wBAChB,gBAAgB;wBAChB,gBAAgB;qBACjB,EAAA,aAAA,EAGc,iBAAiB,CAAC,QAAQ,EAAA,QAAA,EAAA,ihFAAA,EAAA,MAAA,EAAA,CAAA,6tJAAA,CAAA,EAAA;;;AElC3C;;AAEG;;;;"}
@@ -81,7 +81,7 @@ class StatComponent {
81
81
  return `${magnitude}${suffix}`;
82
82
  }, ...(ngDevMode ? [{ debugName: "deltaText" }] : /* istanbul ignore next */ []));
83
83
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: StatComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
84
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: StatComponent, isStandalone: true, selector: "ds-stat", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: true, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, delta: { classPropertyName: "delta", publicName: "delta", isSignal: true, isRequired: false, transformFunction: null }, deltaLabel: { classPropertyName: "deltaLabel", publicName: "deltaLabel", isSignal: true, isRequired: false, transformFunction: null }, deltaTone: { classPropertyName: "deltaTone", publicName: "deltaTone", isSignal: true, isRequired: false, transformFunction: null }, caption: { classPropertyName: "caption", publicName: "caption", isSignal: true, isRequired: false, transformFunction: null }, unit: { classPropertyName: "unit", publicName: "unit", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.error": "variant() === 'error'", "class.size-sm": "size() === 'sm'", "class.size-lg": "size() === 'lg'" } }, ngImport: i0, template: "<div class=\"stat\">\n <div\n class=\"label\"\n dsTooltip\n dsTooltipWhenClipped>\n {{ label() }}\n </div>\n\n <div\n class=\"value\"\n dsTooltip\n dsTooltipWhenClipped>\n <ng-content select=\"[dsStatValue]\">{{ value() }}{{ unit() }}</ng-content>\n </div>\n\n @if (delta() !== null) {\n <div [class]=\"deltaClasses()\">\n @if (deltaIcon(); as icon) {\n <ds-icon\n [name]=\"icon\"\n [size]=\"12\">\n </ds-icon>\n }\n\n <ng-content select=\"[delta]\">{{ deltaText() }}</ng-content>\n </div>\n } @else if (caption()) {\n <div class=\"caption\">\n {{ caption() }}\n </div>\n }\n</div>\n", styles: ["@charset \"UTF-8\";:host{--_stat-bg-color: var(--ds-stat-bg-color, var(--surface-default));--_stat-border: var(--ds-stat-border, var(--border-divider));--_stat-radius: var(--ds-stat-radius, var(--ds-radius-panel));--_stat-padding: var(--ds-stat-padding, var(--ds-surface-padding));--_stat-label-color: var(--ds-stat-label-color, var(--text-tertiary));--_stat-value-color: var(--ds-stat-value-color, var(--text-primary));--_stat-value-font-size: var(--ds-stat-value-font-size, var(--font-size-h2));--_stat-value-white-space: var(--ds-stat-value-white-space, nowrap);--_stat-value-lines: var(--ds-stat-value-lines, none);--_stat-value-wrap: var(--ds-stat-value-wrap, normal);--_stat-up-color: var(--ds-stat-up-color, var(--success-text));--_stat-down-color: var(--ds-stat-down-color, var(--error-text));display:block}:host(.error){--_stat-value-color: var(--ds-stat-value-color, var(--error-text))}:host(.size-sm){--_stat-value-font-size: var(--ds-stat-value-font-size, var(--font-size-h4))}:host(.size-lg){--_stat-value-font-size: var(--ds-stat-value-font-size, var(--font-size-h1))}:host(.size-sm) .stat .label{font-size:var(--font-size-2xs);letter-spacing:var(--letter-spacing-wide)}:host(.size-lg) .stat .label{font-size:var(--font-size-s)}.stat{background-color:var(--_stat-bg-color);border:var(--border-width-default) solid var(--_stat-border);border-radius:var(--_stat-radius);padding:var(--_stat-padding);height:100%}.stat .label{overflow:clip;overflow-clip-margin:var(--space-1);text-overflow:ellipsis;white-space:nowrap;font:var(--font-weight-bold) var(--font-size-xs)/var(--line-height-base) var(--font-sans);letter-spacing:var(--letter-spacing-wider);text-transform:uppercase;color:var(--_stat-label-color);margin:0 0 var(--space-2)}.stat .value{overflow:clip;overflow-clip-margin:var(--space-1);text-overflow:ellipsis;white-space:nowrap;font:var(--font-weight-extrabold) var(--_stat-value-font-size)/var(--line-height-flat) var(--font-sans);letter-spacing:var(--letter-spacing-snug);color:var(--_stat-value-color);margin:0;white-space:var(--_stat-value-white-space);overflow-wrap:var(--_stat-value-wrap);display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:var(--_stat-value-lines)}.stat .delta{display:inline-flex;align-items:center;gap:var(--space-1);font:var(--font-weight-bold) var(--font-size-xs)/var(--line-height-base) var(--font-sans);margin-top:var(--space-2)}.stat .delta.up{color:var(--_stat-up-color)}.stat .delta.down{color:var(--_stat-down-color)}.stat .delta.neutral{color:var(--text-tertiary)}.stat .delta.secondary{color:var(--secondary-strong)}.stat .caption{font:var(--font-weight-regular) var(--font-size-xs)/var(--line-height-base) var(--font-sans);color:var(--text-tertiary);margin-top:var(--space-2)}\n"], dependencies: [{ kind: "component", type: IconComponent, selector: "ds-icon", inputs: ["name", "size", "stroke", "ariaLabel"] }, { kind: "directive", type: TooltipDirective, selector: "[dsTooltip]", inputs: ["dsTooltip", "dsTooltipPlacement", "dsTooltipDelay", "dsTooltipWhenClipped"] }] });
84
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: StatComponent, isStandalone: true, selector: "ds-stat", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: true, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, delta: { classPropertyName: "delta", publicName: "delta", isSignal: true, isRequired: false, transformFunction: null }, deltaLabel: { classPropertyName: "deltaLabel", publicName: "deltaLabel", isSignal: true, isRequired: false, transformFunction: null }, deltaTone: { classPropertyName: "deltaTone", publicName: "deltaTone", isSignal: true, isRequired: false, transformFunction: null }, caption: { classPropertyName: "caption", publicName: "caption", isSignal: true, isRequired: false, transformFunction: null }, unit: { classPropertyName: "unit", publicName: "unit", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.error": "variant() === 'error'", "class.size-sm": "size() === 'sm'", "class.size-lg": "size() === 'lg'" } }, ngImport: i0, template: "<div class=\"stat\">\n <div\n class=\"label\"\n dsTooltip\n dsTooltipWhenClipped>\n {{ label() }}\n </div>\n\n <div\n class=\"value\"\n dsTooltip\n dsTooltipWhenClipped>\n <ng-content select=\"[dsStatValue]\">{{ value() }}{{ unit() }}</ng-content>\n </div>\n\n @if (delta() !== null) {\n <div [class]=\"deltaClasses()\">\n @if (deltaIcon(); as icon) {\n <ds-icon\n [name]=\"icon\"\n [size]=\"12\">\n </ds-icon>\n }\n\n <ng-content select=\"[delta]\">{{ deltaText() }}</ng-content>\n </div>\n } @else if (caption()) {\n <div class=\"caption\">\n {{ caption() }}\n </div>\n }\n</div>\n", styles: ["@charset \"UTF-8\";:host{--_stat-bg-color: var(--ds-stat-bg-color, var(--surface-default));--_stat-border: var(--ds-stat-border, var(--border-divider));--_stat-radius: var(--ds-stat-radius, var(--ds-radius-panel));--_stat-padding: var(--ds-stat-padding, var(--ds-surface-padding));--_stat-label-color: var(--ds-stat-label-color, var(--text-tertiary));--_stat-value-color: var(--ds-stat-value-color, var(--text-primary));--_stat-value-font-size: var(--ds-stat-value-font-size, var(--font-size-h2));--_stat-value-white-space: var(--ds-stat-value-white-space, nowrap);--_stat-value-lines: var(--ds-stat-value-lines, none);--_stat-value-wrap: var(--ds-stat-value-wrap, normal);--_stat-up-color: var(--ds-stat-up-color, var(--success-text));--_stat-down-color: var(--ds-stat-down-color, var(--error-text));display:block}:host(.error){--_stat-value-color: var(--ds-stat-value-color, var(--error-text))}:host(.size-sm){--_stat-value-font-size: var(--ds-stat-value-font-size, var(--font-size-h4))}:host(.size-lg){--_stat-value-font-size: var(--ds-stat-value-font-size, var(--font-size-h1))}:host(.size-sm) .stat .label{font-size:var(--font-size-2xs);letter-spacing:var(--letter-spacing-wide)}:host(.size-lg) .stat .label{font-size:var(--font-size-s)}.stat{background-color:var(--_stat-bg-color);border:var(--border-width-default) solid var(--_stat-border);border-radius:var(--_stat-radius);padding:var(--_stat-padding);height:100%}.stat .label{overflow:clip;overflow-clip-margin:var(--space-1);text-overflow:ellipsis;white-space:nowrap;font:var(--font-weight-bold) var(--font-size-xs)/var(--line-height-base) var(--font-sans);letter-spacing:var(--letter-spacing-wider);text-transform:uppercase;color:var(--_stat-label-color);margin:0 0 var(--space-2)}.stat .value{overflow:clip;overflow-clip-margin:var(--space-1);text-overflow:ellipsis;white-space:nowrap;font:var(--font-weight-extrabold) var(--_stat-value-font-size)/var(--line-height-flat) var(--font-sans);letter-spacing:var(--letter-spacing-snug);color:var(--_stat-value-color);margin:0;white-space:var(--_stat-value-white-space);overflow-wrap:var(--_stat-value-wrap);display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:var(--_stat-value-lines)}.stat .delta{display:inline-flex;align-items:center;gap:var(--space-1);font:var(--font-weight-bold) var(--font-size-xs)/var(--line-height-base) var(--font-sans);margin-top:var(--space-2)}.stat .delta.up{color:var(--_stat-up-color)}.stat .delta.down{color:var(--_stat-down-color)}.stat .delta.neutral{color:var(--text-tertiary)}.stat .delta.secondary{color:var(--secondary-strong)}.stat .caption{font:var(--font-weight-regular) var(--font-size-xs)/var(--line-height-base) var(--font-sans);color:var(--text-tertiary);margin-top:var(--space-2)}\n"], dependencies: [{ kind: "component", type: IconComponent, selector: "ds-icon", inputs: ["name", "size", "stroke", "ariaLabel"] }, { kind: "directive", type: TooltipDirective, selector: "[dsTooltip]", inputs: ["dsTooltip", "dsTooltipPlacement", "dsTooltipDelay", "dsTooltipWhenClipped", "dsTooltipTextSelector"] }] });
85
85
  }
86
86
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: StatComponent, decorators: [{
87
87
  type: Component,
@@ -1 +1 @@
1
- {"version":3,"file":"ids-group-ltd-ids-design-system-components-stat.mjs","sources":["../../../src/lib/components/stat/stat.component.ts","../../../src/lib/components/stat/stat.component.html","../../../src/lib/components/stat/ids-group-ltd-ids-design-system-components-stat.ts"],"sourcesContent":["import { Component, ViewEncapsulation, computed, input } from '@angular/core';\nimport { devWarn } from '@ids-group-ltd/ids-design-system/core';\nimport { IconComponent } from '@ids-group-ltd/ids-design-system/icons';\nimport { TooltipDirective } from '@ids-group-ltd/ids-design-system/components/tooltip';\n\n@Component({\n selector: 'ds-stat',\n standalone: true,\n imports: [IconComponent, TooltipDirective],\n templateUrl: './stat.component.html',\n styleUrl: './stat.component.scss',\n encapsulation: ViewEncapsulation.Emulated,\n host: {\n '[class.error]': \"variant() === 'error'\",\n '[class.size-sm]': \"size() === 'sm'\",\n '[class.size-lg]': \"size() === 'lg'\",\n },\n})\nexport class StatComponent {\n constructor() {\n // `unit` concatenates onto the INPUT value, so a projected value silently\n // drops it — and \"kg\" quietly missing from a tile is the kind of thing that\n // reads as fine until someone checks the number against the source.\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n devWarn(() =>\n this.unit() && !this.value()\n ? `[ds-stat] unit=\"${this.unit()}\" is set but there is no \\`value\\` input — a projected [dsStatValue] owns the whole line, so the unit is not rendered. Put it inside the projected content, or drop the input.`\n : null,\n );\n }\n }\n\n /** Metric name shown above the value. */\n readonly label = input.required<string>();\n /** Headline metric; `unit` is appended directly after it.\n *\n * Optional because the value can be PROJECTED instead — `[dsStatValue]`\n * takes a badge, a status dot, anything a tile needs where a number would go.\n * The input is the fallback, the same shape `[delta]` already has.\n *\n * Namespaced, unlike `[delta]`: twenty components in this library have a\n * `value` input, so a bare `value` attribute used to slot one of them in\n * would also set that input to the empty string.\n *\n * Takes `null` so `[value]=\"count | number\"` typechecks: Angular's own\n * `number`/`date`/`percent` pipes are typed `string | null`, and without the null the\n * idiomatic form fails `strictTemplates` and pushes consumers to `toLocaleString()` in\n * the template — which hardcodes a locale instead of reading LOCALE_ID. Renders as\n * nothing, like the empty default. */\n readonly value = input<string | number | null>('');\n /** Change amount; sign drives the up/down arrow and color. */\n readonly delta = input<number | null>(null);\n /** Suffix appended after the delta's magnitude, e.g. \"vs last month\". */\n readonly deltaLabel = input<string>('');\n /** Overrides the automatic up/down coloring of the delta. */\n readonly deltaTone = input<'neutral' | 'secondary' | null>(null);\n /** Secondary text shown below the value when there's no `delta`. */\n readonly caption = input<string>('');\n /** Suffix appended directly after `value`, e.g. \"%\". */\n readonly unit = input<string>('');\n /** `error` applies the error color treatment. */\n readonly variant = input<'default' | 'error'>('default');\n /** Controls the stat's overall type scale. */\n readonly size = input<'sm' | 'md' | 'lg'>('md');\n\n protected readonly deltaClasses = computed(() => {\n const delta = this.delta();\n if (delta === null) {\n return '';\n }\n const tone = this.deltaTone();\n if (tone) {\n return `delta ${tone}`;\n }\n if (delta > 0) {\n return 'delta up';\n }\n if (delta < 0) {\n return 'delta down';\n }\n\n return 'delta';\n });\n\n protected readonly deltaIcon = computed<'arrowUp' | 'arrowDown' | null>(\n () => {\n const delta = this.delta();\n if (delta === null || delta === 0) {\n return null;\n }\n\n return delta > 0 ? 'arrowUp' : 'arrowDown';\n },\n );\n\n protected readonly deltaText = computed(() => {\n const delta = this.delta();\n if (delta === null) {\n return '';\n }\n const magnitude = Math.abs(delta);\n const suffix = this.deltaLabel() ? ` ${this.deltaLabel()}` : '';\n\n return `${magnitude}${suffix}`;\n });\n}\n","<div class=\"stat\">\n <div\n class=\"label\"\n dsTooltip\n dsTooltipWhenClipped>\n {{ label() }}\n </div>\n\n <div\n class=\"value\"\n dsTooltip\n dsTooltipWhenClipped>\n <ng-content select=\"[dsStatValue]\">{{ value() }}{{ unit() }}</ng-content>\n </div>\n\n @if (delta() !== null) {\n <div [class]=\"deltaClasses()\">\n @if (deltaIcon(); as icon) {\n <ds-icon\n [name]=\"icon\"\n [size]=\"12\">\n </ds-icon>\n }\n\n <ng-content select=\"[delta]\">{{ deltaText() }}</ng-content>\n </div>\n } @else if (caption()) {\n <div class=\"caption\">\n {{ caption() }}\n </div>\n }\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;MAkBa,aAAa,CAAA;AACxB,IAAA,WAAA,GAAA;;;;AAIE,QAAA,IAAI,OAAO,SAAS,KAAK,WAAW,IAAI,SAAS,EAAE;AACjD,YAAA,OAAO,CAAC,MACN,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,KAAK;AACxB,kBAAE,CAAA,gBAAA,EAAmB,IAAI,CAAC,IAAI,EAAE,CAAA,8KAAA;kBAC9B,IAAI,CACT;QACH;IACF;;AAGS,IAAA,KAAK,GAAG,KAAK,CAAC,QAAQ,2EAAU;AACzC;;;;;;;;;;;;;;AAcuC;AAC9B,IAAA,KAAK,GAAG,KAAK,CAAyB,EAAE,4EAAC;;AAEzC,IAAA,KAAK,GAAG,KAAK,CAAgB,IAAI,4EAAC;;AAElC,IAAA,UAAU,GAAG,KAAK,CAAS,EAAE,iFAAC;;AAE9B,IAAA,SAAS,GAAG,KAAK,CAAiC,IAAI,g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,wBAAA,eAAe,EAAE,uBAAuB;AACxC,wBAAA,iBAAiB,EAAE,iBAAiB;AACpC,wBAAA,iBAAiB,EAAE,iBAAiB;AACrC,qBAAA,EAAA,QAAA,EAAA,wqBAAA,EAAA,MAAA,EAAA,CAAA,gsFAAA,CAAA,EAAA;;;AEhBH;;AAEG;;;;"}
1
+ {"version":3,"file":"ids-group-ltd-ids-design-system-components-stat.mjs","sources":["../../../src/lib/components/stat/stat.component.ts","../../../src/lib/components/stat/stat.component.html","../../../src/lib/components/stat/ids-group-ltd-ids-design-system-components-stat.ts"],"sourcesContent":["import { Component, ViewEncapsulation, computed, input } from '@angular/core';\nimport { devWarn } from '@ids-group-ltd/ids-design-system/core';\nimport { IconComponent } from '@ids-group-ltd/ids-design-system/icons';\nimport { TooltipDirective } from '@ids-group-ltd/ids-design-system/components/tooltip';\n\n@Component({\n selector: 'ds-stat',\n standalone: true,\n imports: [IconComponent, TooltipDirective],\n templateUrl: './stat.component.html',\n styleUrl: './stat.component.scss',\n encapsulation: ViewEncapsulation.Emulated,\n host: {\n '[class.error]': \"variant() === 'error'\",\n '[class.size-sm]': \"size() === 'sm'\",\n '[class.size-lg]': \"size() === 'lg'\",\n },\n})\nexport class StatComponent {\n constructor() {\n // `unit` concatenates onto the INPUT value, so a projected value silently\n // drops it — and \"kg\" quietly missing from a tile is the kind of thing that\n // reads as fine until someone checks the number against the source.\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n devWarn(() =>\n this.unit() && !this.value()\n ? `[ds-stat] unit=\"${this.unit()}\" is set but there is no \\`value\\` input — a projected [dsStatValue] owns the whole line, so the unit is not rendered. Put it inside the projected content, or drop the input.`\n : null,\n );\n }\n }\n\n /** Metric name shown above the value. */\n readonly label = input.required<string>();\n /** Headline metric; `unit` is appended directly after it.\n *\n * Optional because the value can be PROJECTED instead — `[dsStatValue]`\n * takes a badge, a status dot, anything a tile needs where a number would go.\n * The input is the fallback, the same shape `[delta]` already has.\n *\n * Namespaced, unlike `[delta]`: twenty components in this library have a\n * `value` input, so a bare `value` attribute used to slot one of them in\n * would also set that input to the empty string.\n *\n * Takes `null` so `[value]=\"count | number\"` typechecks: Angular's own\n * `number`/`date`/`percent` pipes are typed `string | null`, and without the null the\n * idiomatic form fails `strictTemplates` and pushes consumers to `toLocaleString()` in\n * the template — which hardcodes a locale instead of reading LOCALE_ID. Renders as\n * nothing, like the empty default. */\n readonly value = input<string | number | null>('');\n /** Change amount; sign drives the up/down arrow and color. */\n readonly delta = input<number | null>(null);\n /** Suffix appended after the delta's magnitude, e.g. \"vs last month\". */\n readonly deltaLabel = input<string>('');\n /** Overrides the automatic up/down coloring of the delta. */\n readonly deltaTone = input<'neutral' | 'secondary' | null>(null);\n /** Secondary text shown below the value when there's no `delta`. */\n readonly caption = input<string>('');\n /** Suffix appended directly after `value`, e.g. \"%\". */\n readonly unit = input<string>('');\n /** `error` applies the error color treatment. */\n readonly variant = input<'default' | 'error'>('default');\n /** Controls the stat's overall type scale. */\n readonly size = input<'sm' | 'md' | 'lg'>('md');\n\n protected readonly deltaClasses = computed(() => {\n const delta = this.delta();\n if (delta === null) {\n return '';\n }\n const tone = this.deltaTone();\n if (tone) {\n return `delta ${tone}`;\n }\n if (delta > 0) {\n return 'delta up';\n }\n if (delta < 0) {\n return 'delta down';\n }\n\n return 'delta';\n });\n\n protected readonly deltaIcon = computed<'arrowUp' | 'arrowDown' | null>(\n () => {\n const delta = this.delta();\n if (delta === null || delta === 0) {\n return null;\n }\n\n return delta > 0 ? 'arrowUp' : 'arrowDown';\n },\n );\n\n protected readonly deltaText = computed(() => {\n const delta = this.delta();\n if (delta === null) {\n return '';\n }\n const magnitude = Math.abs(delta);\n const suffix = this.deltaLabel() ? ` ${this.deltaLabel()}` : '';\n\n return `${magnitude}${suffix}`;\n });\n}\n","<div class=\"stat\">\n <div\n class=\"label\"\n dsTooltip\n dsTooltipWhenClipped>\n {{ label() }}\n </div>\n\n <div\n class=\"value\"\n dsTooltip\n dsTooltipWhenClipped>\n <ng-content select=\"[dsStatValue]\">{{ value() }}{{ unit() }}</ng-content>\n </div>\n\n @if (delta() !== null) {\n <div [class]=\"deltaClasses()\">\n @if (deltaIcon(); as icon) {\n <ds-icon\n [name]=\"icon\"\n [size]=\"12\">\n </ds-icon>\n }\n\n <ng-content select=\"[delta]\">{{ deltaText() }}</ng-content>\n </div>\n } @else if (caption()) {\n <div class=\"caption\">\n {{ caption() }}\n </div>\n }\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;MAkBa,aAAa,CAAA;AACxB,IAAA,WAAA,GAAA;;;;AAIE,QAAA,IAAI,OAAO,SAAS,KAAK,WAAW,IAAI,SAAS,EAAE;AACjD,YAAA,OAAO,CAAC,MACN,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,KAAK;AACxB,kBAAE,CAAA,gBAAA,EAAmB,IAAI,CAAC,IAAI,EAAE,CAAA,8KAAA;kBAC9B,IAAI,CACT;QACH;IACF;;AAGS,IAAA,KAAK,GAAG,KAAK,CAAC,QAAQ,2EAAU;AACzC;;;;;;;;;;;;;;AAcuC;AAC9B,IAAA,KAAK,GAAG,KAAK,CAAyB,EAAE,4EAAC;;AAEzC,IAAA,KAAK,GAAG,KAAK,CAAgB,IAAI,4EAAC;;AAElC,IAAA,UAAU,GAAG,KAAK,CAAS,EAAE,iFAAC;;AAE9B,IAAA,SAAS,GAAG,KAAK,CAAiC,IAAI,gFAAC;;AAEvD,IAAA,OAAO,GAAG,KAAK,CAAS,EAAE,8EAAC;;AAE3B,IAAA,IAAI,GAAG,KAAK,CAAS,EAAE,2EAAC;;AAExB,IAAA,OAAO,GAAG,KAAK,CAAsB,SAAS,8EAAC;;AAE/C,IAAA,IAAI,GAAG,KAAK,CAAqB,IAAI,2EAAC;AAE5B,IAAA,YAAY,GAAG,QAAQ,CAAC,MAAK;AAC9C,QAAA,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,EAAE;AAC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