@ids-group-ltd/ids-design-system 0.14.6-beta.0 → 0.14.6

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 (164) hide show
  1. package/CHANGELOG.md +138 -4
  2. package/components.md +20 -18
  3. package/design-system.md +1 -1
  4. package/docs/agent/charts/ds-bar-chart.md +1 -0
  5. package/docs/agent/charts/ds-column-chart.md +1 -0
  6. package/docs/agent/charts/ds-line-chart.md +1 -1
  7. package/docs/agent/forms/ds-autocomplete.md +1 -1
  8. package/docs/agent/forms/ds-input.md +1 -1
  9. package/docs/agent/forms/ds-multi-select.md +1 -1
  10. package/docs/agent/forms/ds-select.md +1 -1
  11. package/docs/agent/forms/ds-textarea.md +1 -1
  12. package/docs/agent/forms/filter-item-directive.md +1 -1
  13. package/docs/agent/forms/the-picker-family-ds-select-ds-multi-select-ds-autocomplete.md +1 -1
  14. package/docs/agent/foundations/global-helper-classes.md +2 -2
  15. package/docs/agent/foundations/grid.md +8 -8
  16. package/fesm2022/ids-group-ltd-ids-design-system-components-accordion.mjs +2 -2
  17. package/fesm2022/ids-group-ltd-ids-design-system-components-accordion.mjs.map +1 -1
  18. package/fesm2022/ids-group-ltd-ids-design-system-components-alert.mjs +2 -2
  19. package/fesm2022/ids-group-ltd-ids-design-system-components-alert.mjs.map +1 -1
  20. package/fesm2022/ids-group-ltd-ids-design-system-components-app-layout.mjs +6 -4
  21. package/fesm2022/ids-group-ltd-ids-design-system-components-app-layout.mjs.map +1 -1
  22. package/fesm2022/ids-group-ltd-ids-design-system-components-autocomplete.mjs +2 -2
  23. package/fesm2022/ids-group-ltd-ids-design-system-components-autocomplete.mjs.map +1 -1
  24. package/fesm2022/ids-group-ltd-ids-design-system-components-banner.mjs +2 -2
  25. package/fesm2022/ids-group-ltd-ids-design-system-components-banner.mjs.map +1 -1
  26. package/fesm2022/ids-group-ltd-ids-design-system-components-bar-chart.mjs +4 -3
  27. package/fesm2022/ids-group-ltd-ids-design-system-components-bar-chart.mjs.map +1 -1
  28. package/fesm2022/ids-group-ltd-ids-design-system-components-breadcrumbs.mjs +2 -2
  29. package/fesm2022/ids-group-ltd-ids-design-system-components-breadcrumbs.mjs.map +1 -1
  30. package/fesm2022/ids-group-ltd-ids-design-system-components-button.mjs +2 -2
  31. package/fesm2022/ids-group-ltd-ids-design-system-components-button.mjs.map +1 -1
  32. package/fesm2022/ids-group-ltd-ids-design-system-components-calendar-day.mjs +2 -2
  33. package/fesm2022/ids-group-ltd-ids-design-system-components-calendar-day.mjs.map +1 -1
  34. package/fesm2022/ids-group-ltd-ids-design-system-components-card.mjs +2 -2
  35. package/fesm2022/ids-group-ltd-ids-design-system-components-card.mjs.map +1 -1
  36. package/fesm2022/ids-group-ltd-ids-design-system-components-chart-legend.mjs +2 -2
  37. package/fesm2022/ids-group-ltd-ids-design-system-components-chart-legend.mjs.map +1 -1
  38. package/fesm2022/ids-group-ltd-ids-design-system-components-chart-tooltip.mjs +169 -3
  39. package/fesm2022/ids-group-ltd-ids-design-system-components-chart-tooltip.mjs.map +1 -1
  40. package/fesm2022/ids-group-ltd-ids-design-system-components-chart.mjs +261 -16
  41. package/fesm2022/ids-group-ltd-ids-design-system-components-chart.mjs.map +1 -1
  42. package/fesm2022/ids-group-ltd-ids-design-system-components-checkbox.mjs +3 -3
  43. package/fesm2022/ids-group-ltd-ids-design-system-components-checkbox.mjs.map +1 -1
  44. package/fesm2022/ids-group-ltd-ids-design-system-components-color-picker.mjs +2 -2
  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 +16 -13
  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 +2 -2
  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 +2 -2
  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 +2 -2
  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-dropzone.mjs +5 -3
  55. package/fesm2022/ids-group-ltd-ids-design-system-components-dropzone.mjs.map +1 -1
  56. package/fesm2022/ids-group-ltd-ids-design-system-components-filter-bar.mjs +1 -1
  57. package/fesm2022/ids-group-ltd-ids-design-system-components-filter-bar.mjs.map +1 -1
  58. package/fesm2022/ids-group-ltd-ids-design-system-components-funnel-chart.mjs +4 -3
  59. package/fesm2022/ids-group-ltd-ids-design-system-components-funnel-chart.mjs.map +1 -1
  60. package/fesm2022/ids-group-ltd-ids-design-system-components-heatmap-chart.mjs +4 -3
  61. package/fesm2022/ids-group-ltd-ids-design-system-components-heatmap-chart.mjs.map +1 -1
  62. package/fesm2022/ids-group-ltd-ids-design-system-components-icon-button.mjs +2 -2
  63. package/fesm2022/ids-group-ltd-ids-design-system-components-icon-button.mjs.map +1 -1
  64. package/fesm2022/ids-group-ltd-ids-design-system-components-input.mjs +2 -2
  65. package/fesm2022/ids-group-ltd-ids-design-system-components-input.mjs.map +1 -1
  66. package/fesm2022/ids-group-ltd-ids-design-system-components-layout.mjs +2 -2
  67. package/fesm2022/ids-group-ltd-ids-design-system-components-layout.mjs.map +1 -1
  68. package/fesm2022/ids-group-ltd-ids-design-system-components-line-chart.mjs +22 -19
  69. package/fesm2022/ids-group-ltd-ids-design-system-components-line-chart.mjs.map +1 -1
  70. package/fesm2022/ids-group-ltd-ids-design-system-components-list.mjs +2 -2
  71. package/fesm2022/ids-group-ltd-ids-design-system-components-list.mjs.map +1 -1
  72. package/fesm2022/ids-group-ltd-ids-design-system-components-menu.mjs +2 -2
  73. package/fesm2022/ids-group-ltd-ids-design-system-components-menu.mjs.map +1 -1
  74. package/fesm2022/ids-group-ltd-ids-design-system-components-modal.mjs +6 -6
  75. package/fesm2022/ids-group-ltd-ids-design-system-components-modal.mjs.map +1 -1
  76. package/fesm2022/ids-group-ltd-ids-design-system-components-multi-select.mjs +2 -3
  77. package/fesm2022/ids-group-ltd-ids-design-system-components-multi-select.mjs.map +1 -1
  78. package/fesm2022/ids-group-ltd-ids-design-system-components-number-stepper.mjs +9 -11
  79. package/fesm2022/ids-group-ltd-ids-design-system-components-number-stepper.mjs.map +1 -1
  80. package/fesm2022/ids-group-ltd-ids-design-system-components-otp-input.mjs +2 -2
  81. package/fesm2022/ids-group-ltd-ids-design-system-components-otp-input.mjs.map +1 -1
  82. package/fesm2022/ids-group-ltd-ids-design-system-components-page-header.mjs +1 -1
  83. package/fesm2022/ids-group-ltd-ids-design-system-components-page-header.mjs.map +1 -1
  84. package/fesm2022/ids-group-ltd-ids-design-system-components-pagination.mjs +2 -2
  85. package/fesm2022/ids-group-ltd-ids-design-system-components-pagination.mjs.map +1 -1
  86. package/fesm2022/ids-group-ltd-ids-design-system-components-pie-chart.mjs +4 -3
  87. package/fesm2022/ids-group-ltd-ids-design-system-components-pie-chart.mjs.map +1 -1
  88. package/fesm2022/ids-group-ltd-ids-design-system-components-radio-group.mjs +2 -2
  89. package/fesm2022/ids-group-ltd-ids-design-system-components-radio-group.mjs.map +1 -1
  90. package/fesm2022/ids-group-ltd-ids-design-system-components-scatter-chart.mjs +4 -3
  91. package/fesm2022/ids-group-ltd-ids-design-system-components-scatter-chart.mjs.map +1 -1
  92. package/fesm2022/ids-group-ltd-ids-design-system-components-search.mjs +2 -2
  93. package/fesm2022/ids-group-ltd-ids-design-system-components-search.mjs.map +1 -1
  94. package/fesm2022/ids-group-ltd-ids-design-system-components-segmented.mjs +2 -2
  95. package/fesm2022/ids-group-ltd-ids-design-system-components-segmented.mjs.map +1 -1
  96. package/fesm2022/ids-group-ltd-ids-design-system-components-select.mjs +2 -2
  97. package/fesm2022/ids-group-ltd-ids-design-system-components-select.mjs.map +1 -1
  98. package/fesm2022/ids-group-ltd-ids-design-system-components-sidenav-footer.mjs +2 -2
  99. package/fesm2022/ids-group-ltd-ids-design-system-components-sidenav-footer.mjs.map +1 -1
  100. package/fesm2022/ids-group-ltd-ids-design-system-components-sidenav.mjs +7 -7
  101. package/fesm2022/ids-group-ltd-ids-design-system-components-sidenav.mjs.map +1 -1
  102. package/fesm2022/ids-group-ltd-ids-design-system-components-slider.mjs +2 -2
  103. package/fesm2022/ids-group-ltd-ids-design-system-components-slider.mjs.map +1 -1
  104. package/fesm2022/ids-group-ltd-ids-design-system-components-sparkline.mjs +2 -2
  105. package/fesm2022/ids-group-ltd-ids-design-system-components-sparkline.mjs.map +1 -1
  106. package/fesm2022/ids-group-ltd-ids-design-system-components-split-button.mjs +2 -2
  107. package/fesm2022/ids-group-ltd-ids-design-system-components-split-button.mjs.map +1 -1
  108. package/fesm2022/ids-group-ltd-ids-design-system-components-stepper.mjs +2 -2
  109. package/fesm2022/ids-group-ltd-ids-design-system-components-stepper.mjs.map +1 -1
  110. package/fesm2022/ids-group-ltd-ids-design-system-components-switch.mjs +2 -2
  111. package/fesm2022/ids-group-ltd-ids-design-system-components-switch.mjs.map +1 -1
  112. package/fesm2022/ids-group-ltd-ids-design-system-components-table-columns.mjs +4 -4
  113. package/fesm2022/ids-group-ltd-ids-design-system-components-table-columns.mjs.map +1 -1
  114. package/fesm2022/ids-group-ltd-ids-design-system-components-table.mjs +2 -2
  115. package/fesm2022/ids-group-ltd-ids-design-system-components-table.mjs.map +1 -1
  116. package/fesm2022/ids-group-ltd-ids-design-system-components-tabs.mjs +3 -3
  117. package/fesm2022/ids-group-ltd-ids-design-system-components-tabs.mjs.map +1 -1
  118. package/fesm2022/ids-group-ltd-ids-design-system-components-tag.mjs +16 -3
  119. package/fesm2022/ids-group-ltd-ids-design-system-components-tag.mjs.map +1 -1
  120. package/fesm2022/ids-group-ltd-ids-design-system-components-textarea.mjs +2 -2
  121. package/fesm2022/ids-group-ltd-ids-design-system-components-textarea.mjs.map +1 -1
  122. package/fesm2022/ids-group-ltd-ids-design-system-components-time-picker.mjs +4 -4
  123. package/fesm2022/ids-group-ltd-ids-design-system-components-time-picker.mjs.map +1 -1
  124. package/fesm2022/ids-group-ltd-ids-design-system-components-toast.mjs +2 -2
  125. package/fesm2022/ids-group-ltd-ids-design-system-components-toast.mjs.map +1 -1
  126. package/fesm2022/ids-group-ltd-ids-design-system-components-toggle-button.mjs +2 -2
  127. package/fesm2022/ids-group-ltd-ids-design-system-components-toggle-button.mjs.map +1 -1
  128. package/fesm2022/ids-group-ltd-ids-design-system-components-tree.mjs +2 -2
  129. package/fesm2022/ids-group-ltd-ids-design-system-components-tree.mjs.map +1 -1
  130. package/fesm2022/ids-group-ltd-ids-design-system-components-w3w.mjs +4 -4
  131. package/fesm2022/ids-group-ltd-ids-design-system-components-w3w.mjs.map +1 -1
  132. package/fesm2022/ids-group-ltd-ids-design-system-components-waterfall-chart.mjs +4 -2
  133. package/fesm2022/ids-group-ltd-ids-design-system-components-waterfall-chart.mjs.map +1 -1
  134. package/fesm2022/ids-group-ltd-ids-design-system-components.mjs +16 -2
  135. package/fesm2022/ids-group-ltd-ids-design-system-components.mjs.map +1 -1
  136. package/fesm2022/ids-group-ltd-ids-design-system-core.mjs +2 -0
  137. package/fesm2022/ids-group-ltd-ids-design-system-core.mjs.map +1 -1
  138. package/migrations/0.14.6.json +176 -0
  139. package/package.json +1 -1
  140. package/schematics/check-overrides/surface.json +26 -16
  141. package/styles/_chart-frame.scss +1 -50
  142. package/styles/_field-state.scss +13 -1
  143. package/styles/_focus.scss +45 -33
  144. package/styles/_link.scss +12 -0
  145. package/styles/_press.scss +1 -1
  146. package/styles/_tokens-charts.scss +1 -1
  147. package/styles/_tokens.scss +2 -0
  148. package/styles/ds.scss +2 -0
  149. package/types/ids-group-ltd-ids-design-system-components-app-layout.d.ts +4 -2
  150. package/types/ids-group-ltd-ids-design-system-components-button.d.ts +2 -2
  151. package/types/ids-group-ltd-ids-design-system-components-chart-tooltip.d.ts +64 -3
  152. package/types/ids-group-ltd-ids-design-system-components-chart.d.ts +35 -2
  153. package/types/ids-group-ltd-ids-design-system-components-checkbox.d.ts +1 -1
  154. package/types/ids-group-ltd-ids-design-system-components-column-chart.d.ts +2 -3
  155. package/types/ids-group-ltd-ids-design-system-components-filter-bar.d.ts +1 -1
  156. package/types/ids-group-ltd-ids-design-system-components-line-chart.d.ts +4 -4
  157. package/types/ids-group-ltd-ids-design-system-components-page-header.d.ts +1 -1
  158. package/types/ids-group-ltd-ids-design-system-components-pie-chart.d.ts +1 -1
  159. package/types/ids-group-ltd-ids-design-system-components-sidenav.d.ts +1 -1
  160. package/types/ids-group-ltd-ids-design-system-components-tabs.d.ts +1 -1
  161. package/types/ids-group-ltd-ids-design-system-components-tag.d.ts +2 -1
  162. package/types/ids-group-ltd-ids-design-system-components.d.ts +6 -1
  163. package/types/ids-group-ltd-ids-design-system-core.d.ts +2 -0
  164. package/migrations/0.14.6-beta.0.json +0 -9
@@ -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.\n *\n * It renders the brand row even without a string `brand`, but the letter-mark\n * tile still comes from `logoLetter` (or the first letter of `brand`), so an\n * empty `brand` + projection renders the wordmark 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; an item can override it. */\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. An individual\n * `ds-sidenav-item` can override it with its own `rail`. */\n readonly rail = input(true, { transform: booleanAttribute });\n /** Brand text at the top of the rail (auto letter-mark + name). Unset falls back to\n * `DS_CONFIG.brand.name`. Each field resolves on its own: `brand=\"\"` drops the\n * wordmark while a configured `logoLetter` still paints its tile. */\n readonly brand = input<string | null>(null);\n /** Letter-mark glyph when it differs from the brand's first letter. 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. Unset leaves the row non-interactive. `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 /** Read these, not the inputs: 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)`: that splits an astral character's surrogate pair. */\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 as well as a container: the header navigates here and the\n * caret becomes a separate control. Unset, the whole header only expands. */\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: duplicates silently drop children on a non-matching branch.\n Same for [ds-group-icon], so both header branches stamp out ONE template. -->\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]` differs from the `[icon]` slots of child sidenav-items so their icons aren't swallowed. -->\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` (\"you are in this section\"). */\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, `preventDefault()`\n * intercepts navigation; a `routerLink` item navigates regardless (RouterLink ignores\n * `defaultPrevented`). */\n readonly activate = output<MouseEvent>();\n\n /** Whether THIS item draws its edge marker when active. Unset follows the parent `ds-sidenav`, then on. */\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 when collapsed: expanded, it would override the visible label and drop the badge count / alert dot.\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, so the opt-out needs its own class.\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","<!-- Projection is by attribute only ([icon], [trailing]); no default <ng-content>.\n The two <a> variants share one #content template. -->\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 a button: `href=\"#\"` would rewrite the URL and discard the scroll position. -->\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;;;;;;;;AAQG;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;;;MCLY,OAAO,GAA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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,0sEAAA,EAAA,MAAA,EAAA,CAAA,0sJAAA,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.\n *\n * It renders the brand row even without a string `brand`, but the letter-mark\n * tile still comes from `logoLetter` (or the first letter of `brand`), so an\n * empty `brand` + projection renders the wordmark 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; an item can override it. */\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. An individual\n * `ds-sidenav-item` can override it with its own `rail`. */\n readonly rail = input(true, { transform: booleanAttribute });\n /** Brand text at the top of the rail (auto letter-mark + name). Unset falls back to\n * `DS_CONFIG.brand.name`. Each field resolves on its own: `brand=\"\"` drops the\n * wordmark while a configured `logoLetter` still paints its tile. */\n readonly brand = input<string | null>(null);\n /** Letter-mark glyph when it differs from the brand's first letter. 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. Unset leaves the row non-interactive. `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 /** Read these, not the inputs: 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)`: that splits an astral character's surrogate pair. */\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 `[ds-group-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 as well as a container: the header navigates here and the\n * caret becomes a separate control. Unset, the whole header only expands. */\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: duplicates silently drop children on a non-matching branch.\n Same for [ds-group-icon], so both header branches stamp out ONE template. -->\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]` differs from the `[icon]` slots of child sidenav-items so their icons aren't swallowed. -->\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` (\"you are in this section\"). */\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, `preventDefault()`\n * intercepts navigation; a `routerLink` item navigates regardless (RouterLink ignores\n * `defaultPrevented`). */\n readonly activate = output<MouseEvent>();\n\n /** Whether THIS item draws its edge marker when active. Unset follows the parent `ds-sidenav`, then on. */\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 when collapsed: expanded, it would override the visible label and drop the badge count / alert dot.\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, so the opt-out needs its own class.\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","<!-- Projection is by attribute only ([icon], [trailing]); no default <ng-content>.\n The two <a> variants share one #content template. -->\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 a button: `href=\"#\"` would rewrite the URL and discard the scroll position. -->\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;;;;;;;;AAQG;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;;;MCLY,OAAO,GAAG,IAAI,cAAc,CAAkB,SAAS;;MCkBvD,gBAAgB,CAAA;;IAElB,SAAS,GAAG,KAAK,CAAC,KAAK,iFAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;AAClE;AAC6D;IACpD,IAAI,GAAG,KAAK,CAAC,IAAI,4EAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;AAC5D;;AAEsE;AAC7D,IAAA,KAAK,GAAG,KAAK,CAAgB,IAAI,4EAAC;AAC3C;AACwD;AAC/C,IAAA,UAAU,GAAG,KAAK,CAAgB,IAAI,iFAAC;AAChD;AACkF;AACzE,IAAA,UAA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EAAA,IAAA,EACb,UAAU,EAAA,QAAA,EAAA,cAAA,EAAA,MAAA,EAAA,CAAA,QAAA,EAAA,aAAA,EAAA,UAAA,EAAA,qBAAA,EAAA,OAAA,EAAA,MAAA,EAAA,YAAA,EAAA,kBAAA,EAAA,oBAAA,EAAA,YAAA,EAAA,YAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EACV,gBAAgB,EAAA,QAAA,EAAA,oBAAA,EAAA,MAAA,EAAA,CAAA,yBAAA,EAAA,uBAAA,EAAA,kBAAA,CAAA,EAAA,OAAA,EAAA,CAAA,gBAAA,CAAA,EAAA,QAAA,EAAA,CAAA,kBAAA,CAAA,EAAA,EAAA,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,qCAAA,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,0sEAAA,EAAA,MAAA,EAAA,CAAA,q2HAAA,CAAA,EAAA;;;AElC3C;;AAEG;;;;"}
@@ -180,7 +180,7 @@ class SliderComponent extends DsControlValueAccessor {
180
180
  useExisting: forwardRef(() => SliderComponent),
181
181
  multi: true,
182
182
  },
183
- ], viewQueries: [{ propertyName: "track", first: true, predicate: ["track"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div\n #track\n class=\"track\"\n (pointerdown)=\"onTrackPointerDown($event)\"\n (pointermove)=\"onTrackPointerMove($event)\"\n (pointerup)=\"onTrackPointerUp($event)\"\n (pointercancel)=\"onTrackPointerUp($event)\">\n <span\n class=\"fill\"\n [style.left.%]=\"fill().left\"\n [style.width.%]=\"fill().width\">\n </span>\n\n @for (thumbValue of thumbValues(); track $index; let i = $index) {\n <span\n class=\"thumb\"\n role=\"slider\"\n [attr.tabindex]=\"isDisabled() ? -1 : 0\"\n [style.left.%]=\"percent(thumbValue)\"\n [attr.aria-valuemin]=\"thumbMin(i)\"\n [attr.aria-valuemax]=\"thumbMax(i)\"\n [attr.aria-valuenow]=\"thumbValue\"\n [attr.aria-orientation]=\"'horizontal'\"\n [attr.aria-label]=\"thumbAriaLabel(i)\"\n [attr.aria-disabled]=\"isDisabled() ? 'true' : null\"\n [attr.aria-invalid]=\"invalidResolved() ? 'true' : null\"\n [attr.aria-describedby]=\"hintId()\"\n (keydown)=\"onThumbKeydown($event, i)\">\n </span>\n }\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", styles: [":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{--_slider-track-height: var(--ds-slider-track-height, var(--slider-track-h));--_slider-thumb-size: var(--ds-slider-thumb-size, var(--slider-thumb-size));--_slider-thumb-border-width: var(--ds-slider-thumb-border-width, var(--slider-thumb-border-width));--_slider-fill-color: var(--ds-slider-fill-color, var(--accent));--_slider-track-color: var(--ds-slider-track-color, var(--surface-muted));--_slider-thumb-color: var(--ds-slider-thumb-color, var(--surface-default));--_slider-thumb-border-color: var(--ds-slider-thumb-border-color, var(--accent));display:flex;flex-direction:column;padding-block:calc((var(--_slider-thumb-size) - var(--_slider-track-height)) / 2);gap:calc((var(--_slider-thumb-size) - var(--_slider-track-height)) / 2 + var(--space-1-5))}.track{position:relative;height:var(--_slider-track-height);background-color:var(--_slider-track-color);border-radius:var(--radius-pill);cursor:pointer;touch-action:none}.fill{position:absolute;top:0;height:100%;background-color:var(--_slider-fill-color);border-radius:var(--radius-pill)}.thumb{position:absolute;top:50%;transform:translate(-50%,-50%);width:var(--_slider-thumb-size);height:var(--_slider-thumb-size);border-radius:var(--radius-pill);background-color:var(--_slider-thumb-color);border:var(--_slider-thumb-border-width) solid var(--_slider-thumb-border-color);box-shadow:var(--shadow-card);cursor:grab;touch-action:none}.thumb: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)}.thumb:active{cursor:grabbing}:host(.disabled) .track{cursor:not-allowed}:host(.disabled) .fill{background-color:var(--border-strong)}:host(.disabled) .thumb{border-color:var(--border-strong);cursor:not-allowed}:host(.invalid) .fill{background-color:var(--error)}:host(.invalid) .thumb{border-color:var(--error)}\n"], dependencies: [{ kind: "component", type: FieldMessageComponent, selector: "ds-field-message", inputs: ["text", "state", "messageId", "icon", "reserve"] }] });
183
+ ], viewQueries: [{ propertyName: "track", first: true, predicate: ["track"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div\n #track\n class=\"track\"\n (pointerdown)=\"onTrackPointerDown($event)\"\n (pointermove)=\"onTrackPointerMove($event)\"\n (pointerup)=\"onTrackPointerUp($event)\"\n (pointercancel)=\"onTrackPointerUp($event)\">\n <span\n class=\"fill\"\n [style.left.%]=\"fill().left\"\n [style.width.%]=\"fill().width\">\n </span>\n\n @for (thumbValue of thumbValues(); track $index; let i = $index) {\n <span\n class=\"thumb\"\n role=\"slider\"\n [attr.tabindex]=\"isDisabled() ? -1 : 0\"\n [style.left.%]=\"percent(thumbValue)\"\n [attr.aria-valuemin]=\"thumbMin(i)\"\n [attr.aria-valuemax]=\"thumbMax(i)\"\n [attr.aria-valuenow]=\"thumbValue\"\n [attr.aria-orientation]=\"'horizontal'\"\n [attr.aria-label]=\"thumbAriaLabel(i)\"\n [attr.aria-disabled]=\"isDisabled() ? 'true' : null\"\n [attr.aria-invalid]=\"invalidResolved() ? 'true' : null\"\n [attr.aria-describedby]=\"hintId()\"\n (keydown)=\"onThumbKeydown($event, i)\">\n </span>\n }\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", styles: [":host{--_slider-track-height: var(--ds-slider-track-height, var(--slider-track-h));--_slider-thumb-size: var(--ds-slider-thumb-size, var(--slider-thumb-size));--_slider-thumb-border-width: var(--ds-slider-thumb-border-width, var(--slider-thumb-border-width));--_slider-fill-color: var(--ds-slider-fill-color, var(--accent));--_slider-track-color: var(--ds-slider-track-color, var(--surface-muted));--_slider-thumb-color: var(--ds-slider-thumb-color, var(--surface-default));--_slider-thumb-border-color: var(--ds-slider-thumb-border-color, var(--accent));display:flex;flex-direction:column;padding-block:calc((var(--_slider-thumb-size) - var(--_slider-track-height)) / 2);gap:calc((var(--_slider-thumb-size) - var(--_slider-track-height)) / 2 + var(--space-1-5))}.track{position:relative;height:var(--_slider-track-height);background-color:var(--_slider-track-color);border-radius:var(--radius-pill);cursor:pointer;touch-action:none}.fill{position:absolute;top:0;height:100%;background-color:var(--_slider-fill-color);border-radius:var(--radius-pill)}.thumb{position:absolute;top:50%;transform:translate(-50%,-50%);width:var(--_slider-thumb-size);height:var(--_slider-thumb-size);border-radius:var(--radius-pill);background-color:var(--_slider-thumb-color);border:var(--_slider-thumb-border-width) solid var(--_slider-thumb-border-color);box-shadow:var(--shadow-card);cursor:grab;touch-action:none}.thumb: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)}.thumb:active{cursor:grabbing}:host(.disabled) .track{cursor:not-allowed}:host(.disabled) .fill{background-color:var(--border-strong)}:host(.disabled) .thumb{border-color:var(--border-strong);cursor:not-allowed}:host(.invalid) .fill{background-color:var(--error)}:host(.invalid) .thumb{border-color:var(--error)}\n"], dependencies: [{ kind: "component", type: FieldMessageComponent, selector: "ds-field-message", inputs: ["text", "state", "messageId", "icon", "reserve"] }] });
184
184
  }
185
185
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: SliderComponent, decorators: [{
186
186
  type: Component,
@@ -194,7 +194,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
194
194
  '[class.range]': 'range()',
195
195
  '[class.disabled]': 'isDisabled()',
196
196
  '[class.invalid]': 'invalidResolved()',
197
- }, template: "<div\n #track\n class=\"track\"\n (pointerdown)=\"onTrackPointerDown($event)\"\n (pointermove)=\"onTrackPointerMove($event)\"\n (pointerup)=\"onTrackPointerUp($event)\"\n (pointercancel)=\"onTrackPointerUp($event)\">\n <span\n class=\"fill\"\n [style.left.%]=\"fill().left\"\n [style.width.%]=\"fill().width\">\n </span>\n\n @for (thumbValue of thumbValues(); track $index; let i = $index) {\n <span\n class=\"thumb\"\n role=\"slider\"\n [attr.tabindex]=\"isDisabled() ? -1 : 0\"\n [style.left.%]=\"percent(thumbValue)\"\n [attr.aria-valuemin]=\"thumbMin(i)\"\n [attr.aria-valuemax]=\"thumbMax(i)\"\n [attr.aria-valuenow]=\"thumbValue\"\n [attr.aria-orientation]=\"'horizontal'\"\n [attr.aria-label]=\"thumbAriaLabel(i)\"\n [attr.aria-disabled]=\"isDisabled() ? 'true' : null\"\n [attr.aria-invalid]=\"invalidResolved() ? 'true' : null\"\n [attr.aria-describedby]=\"hintId()\"\n (keydown)=\"onThumbKeydown($event, i)\">\n </span>\n }\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", styles: [":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{--_slider-track-height: var(--ds-slider-track-height, var(--slider-track-h));--_slider-thumb-size: var(--ds-slider-thumb-size, var(--slider-thumb-size));--_slider-thumb-border-width: var(--ds-slider-thumb-border-width, var(--slider-thumb-border-width));--_slider-fill-color: var(--ds-slider-fill-color, var(--accent));--_slider-track-color: var(--ds-slider-track-color, var(--surface-muted));--_slider-thumb-color: var(--ds-slider-thumb-color, var(--surface-default));--_slider-thumb-border-color: var(--ds-slider-thumb-border-color, var(--accent));display:flex;flex-direction:column;padding-block:calc((var(--_slider-thumb-size) - var(--_slider-track-height)) / 2);gap:calc((var(--_slider-thumb-size) - var(--_slider-track-height)) / 2 + var(--space-1-5))}.track{position:relative;height:var(--_slider-track-height);background-color:var(--_slider-track-color);border-radius:var(--radius-pill);cursor:pointer;touch-action:none}.fill{position:absolute;top:0;height:100%;background-color:var(--_slider-fill-color);border-radius:var(--radius-pill)}.thumb{position:absolute;top:50%;transform:translate(-50%,-50%);width:var(--_slider-thumb-size);height:var(--_slider-thumb-size);border-radius:var(--radius-pill);background-color:var(--_slider-thumb-color);border:var(--_slider-thumb-border-width) solid var(--_slider-thumb-border-color);box-shadow:var(--shadow-card);cursor:grab;touch-action:none}.thumb: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)}.thumb:active{cursor:grabbing}:host(.disabled) .track{cursor:not-allowed}:host(.disabled) .fill{background-color:var(--border-strong)}:host(.disabled) .thumb{border-color:var(--border-strong);cursor:not-allowed}:host(.invalid) .fill{background-color:var(--error)}:host(.invalid) .thumb{border-color:var(--error)}\n"] }]
197
+ }, template: "<div\n #track\n class=\"track\"\n (pointerdown)=\"onTrackPointerDown($event)\"\n (pointermove)=\"onTrackPointerMove($event)\"\n (pointerup)=\"onTrackPointerUp($event)\"\n (pointercancel)=\"onTrackPointerUp($event)\">\n <span\n class=\"fill\"\n [style.left.%]=\"fill().left\"\n [style.width.%]=\"fill().width\">\n </span>\n\n @for (thumbValue of thumbValues(); track $index; let i = $index) {\n <span\n class=\"thumb\"\n role=\"slider\"\n [attr.tabindex]=\"isDisabled() ? -1 : 0\"\n [style.left.%]=\"percent(thumbValue)\"\n [attr.aria-valuemin]=\"thumbMin(i)\"\n [attr.aria-valuemax]=\"thumbMax(i)\"\n [attr.aria-valuenow]=\"thumbValue\"\n [attr.aria-orientation]=\"'horizontal'\"\n [attr.aria-label]=\"thumbAriaLabel(i)\"\n [attr.aria-disabled]=\"isDisabled() ? 'true' : null\"\n [attr.aria-invalid]=\"invalidResolved() ? 'true' : null\"\n [attr.aria-describedby]=\"hintId()\"\n (keydown)=\"onThumbKeydown($event, i)\">\n </span>\n }\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", styles: [":host{--_slider-track-height: var(--ds-slider-track-height, var(--slider-track-h));--_slider-thumb-size: var(--ds-slider-thumb-size, var(--slider-thumb-size));--_slider-thumb-border-width: var(--ds-slider-thumb-border-width, var(--slider-thumb-border-width));--_slider-fill-color: var(--ds-slider-fill-color, var(--accent));--_slider-track-color: var(--ds-slider-track-color, var(--surface-muted));--_slider-thumb-color: var(--ds-slider-thumb-color, var(--surface-default));--_slider-thumb-border-color: var(--ds-slider-thumb-border-color, var(--accent));display:flex;flex-direction:column;padding-block:calc((var(--_slider-thumb-size) - var(--_slider-track-height)) / 2);gap:calc((var(--_slider-thumb-size) - var(--_slider-track-height)) / 2 + var(--space-1-5))}.track{position:relative;height:var(--_slider-track-height);background-color:var(--_slider-track-color);border-radius:var(--radius-pill);cursor:pointer;touch-action:none}.fill{position:absolute;top:0;height:100%;background-color:var(--_slider-fill-color);border-radius:var(--radius-pill)}.thumb{position:absolute;top:50%;transform:translate(-50%,-50%);width:var(--_slider-thumb-size);height:var(--_slider-thumb-size);border-radius:var(--radius-pill);background-color:var(--_slider-thumb-color);border:var(--_slider-thumb-border-width) solid var(--_slider-thumb-border-color);box-shadow:var(--shadow-card);cursor:grab;touch-action:none}.thumb: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)}.thumb:active{cursor:grabbing}:host(.disabled) .track{cursor:not-allowed}:host(.disabled) .fill{background-color:var(--border-strong)}:host(.disabled) .thumb{border-color:var(--border-strong);cursor:not-allowed}:host(.invalid) .fill{background-color:var(--error)}:host(.invalid) .thumb{border-color:var(--error)}\n"] }]
198
198
  }], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], min: [{ type: i0.Input, args: [{ isSignal: true, alias: "min", required: false }] }], max: [{ type: i0.Input, args: [{ isSignal: true, alias: "max", required: false }] }], step: [{ type: i0.Input, args: [{ isSignal: true, alias: "step", required: false }] }], range: [{ type: i0.Input, args: [{ isSignal: true, alias: "range", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], track: [{ type: i0.ViewChild, args: ['track', { isSignal: true }] }] } });
199
199
 
200
200
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"ids-group-ltd-ids-design-system-components-slider.mjs","sources":["../../../src/lib/components/slider/slider.component.ts","../../../src/lib/components/slider/slider.component.html","../../../src/lib/components/slider/ids-group-ltd-ids-design-system-components-slider.ts"],"sourcesContent":["import {\n Component,\n ElementRef,\n ViewEncapsulation,\n booleanAttribute,\n computed,\n forwardRef,\n inject,\n input,\n model,\n numberAttribute,\n viewChild,\n} from '@angular/core';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { DS_INTL } from '@ids-group-ltd/ids-design-system/core';\nimport { DsControlValueAccessor } from '@ids-group-ltd/ids-design-system/components';\nimport { FieldMessageComponent } from '@ids-group-ltd/ids-design-system/components/field-message';\nimport { resolveFieldMessage } from '@ids-group-ltd/ids-design-system/components';\nimport { nextControlId } from '@ids-group-ltd/ids-design-system/components';\n\ntype SliderValue = number | readonly [number, number];\n\n@Component({\n selector: 'ds-slider',\n standalone: true,\n imports: [FieldMessageComponent],\n templateUrl: './slider.component.html',\n styleUrl: './slider.component.scss',\n encapsulation: ViewEncapsulation.Emulated,\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => SliderComponent),\n multi: true,\n },\n ],\n host: {\n '[class.range]': 'range()',\n '[class.disabled]': 'isDisabled()',\n '[class.invalid]': 'invalidResolved()',\n },\n})\nexport class SliderComponent extends DsControlValueAccessor<SliderValue> {\n protected readonly intl = inject(DS_INTL);\n /** Current value, or `[low, high]` when `range`. */\n readonly value = model<SliderValue>(0);\n /** Minimum selectable value. */\n readonly min = input(0, { transform: numberAttribute });\n /** Maximum selectable value. */\n readonly max = input(100, { transform: numberAttribute });\n /** Snap increment for dragging and arrow keys. */\n readonly step = input(1, { transform: numberAttribute });\n /** Two-thumb mode: `value` becomes a `[low, high]` tuple. */\n readonly range = input(false, { transform: booleanAttribute });\n /** Disables the slider and blocks all interaction. */\n readonly disabled = input(false, { transform: booleanAttribute });\n /** Accessible name of the thumb(s); suffixed \"minimum\"/\"maximum\" in `range` mode. */\n readonly ariaLabel = input<string | null>(null);\n\n private readonly track = viewChild.required<ElementRef<HTMLElement>>('track');\n private dragging = -1;\n\n protected readonly uid = nextControlId('ds-slider');\n protected readonly hintId = computed(() =>\n this.message().text ? `${this.uid}-hint` : null,\n );\n private readonly fieldMessage = resolveFieldMessage({\n disabled: () => this.isDisabled(),\n hint: this.hint,\n warning: this.warning,\n error: this.error,\n errors: this.errors,\n invalid: this.invalid,\n touchedSelf: this.touchedSelf,\n touched: this.touched,\n });\n protected readonly message = this.fieldMessage.message;\n protected readonly invalidResolved = this.fieldMessage.invalid;\n\n protected readonly isDisabled = computed(\n () => this.disabled() || this.formDisabled(),\n );\n\n protected readonly thumbValues = computed<number[]>(() => {\n const value = this.value();\n if (this.range()) {\n const [low, high] = value as readonly [number, number];\n\n return [low, high];\n }\n\n return [value as number];\n });\n\n protected readonly fill = computed<{ left: number; width: number }>(() => {\n const values = this.thumbValues();\n if (this.range()) {\n const low = this.percent(values[0]);\n const high = this.percent(values[1]);\n\n return { left: low, width: high - low };\n }\n\n return { left: 0, width: this.percent(values[0]) };\n });\n\n protected percent(value: number): number {\n const min = this.min();\n const max = this.max();\n\n return max === min ? 0 : ((value - min) / (max - min)) * 100;\n }\n\n protected thumbMin(index: number): number {\n return this.range() && index === 1 ? this.thumbValues()[0] : this.min();\n }\n\n protected thumbMax(index: number): number {\n return this.range() && index === 0 ? this.thumbValues()[1] : this.max();\n }\n\n protected onTrackPointerDown(event: PointerEvent): void {\n if (this.isDisabled()) {\n return;\n }\n const track = this.track().nativeElement;\n track.setPointerCapture(event.pointerId);\n this.dragging = this.nearestThumb(event.clientX);\n this.updateFromClientX(event.clientX);\n track.querySelectorAll<HTMLElement>('.thumb')[this.dragging]?.focus();\n }\n\n protected onTrackPointerMove(event: PointerEvent): void {\n if (this.dragging < 0) {\n return;\n }\n this.updateFromClientX(event.clientX);\n }\n\n // Bound to pointerup and pointercancel: touch interventions fire pointercancel, and without it\n // the drag state leaks and keeps moving the thumb with no pointer down.\n protected onTrackPointerUp(event: PointerEvent): void {\n if (this.dragging < 0) {\n return;\n }\n const track = this.track().nativeElement;\n if (track.hasPointerCapture(event.pointerId)) {\n track.releasePointerCapture(event.pointerId);\n }\n this.dragging = -1;\n this.markTouched();\n }\n\n protected thumbAriaLabel(index: number): string | null {\n const base = this.ariaLabel();\n if (!this.range()) {\n return base;\n }\n\n return index === 0\n ? this.intl().slider.rangeStart(base ?? '')\n : this.intl().slider.rangeEnd(base ?? '');\n }\n\n protected onThumbKeydown(event: KeyboardEvent, index: number): void {\n if (this.isDisabled()) {\n return;\n }\n const step = this.step() || 1;\n let delta = 0;\n let absolute: number | null = null;\n switch (event.key) {\n case 'ArrowRight':\n case 'ArrowUp':\n delta = step;\n break;\n case 'ArrowLeft':\n case 'ArrowDown':\n delta = -step;\n break;\n case 'PageUp':\n delta = step * 10;\n break;\n case 'PageDown':\n delta = -step * 10;\n break;\n case 'Home':\n absolute = this.thumbMin(index);\n break;\n case 'End':\n absolute = this.thumbMax(index);\n break;\n default:\n return;\n }\n event.preventDefault();\n const current = this.thumbValues()[index];\n this.setThumb(index, absolute ?? this.snap(current + delta));\n }\n\n private nearestThumb(clientX: number): number {\n if (!this.range()) {\n return 0;\n }\n const value = this.valueFromClientX(clientX);\n const [low, high] = this.thumbValues();\n\n return Math.abs(value - low) <= Math.abs(value - high) ? 0 : 1;\n }\n\n private updateFromClientX(clientX: number): void {\n this.setThumb(this.dragging, this.snap(this.valueFromClientX(clientX)));\n }\n\n private valueFromClientX(clientX: number): number {\n const rect = this.track().nativeElement.getBoundingClientRect();\n if (rect.width === 0) {\n return this.min();\n }\n const ratio = Math.min(1, Math.max(0, (clientX - rect.left) / rect.width));\n\n return this.min() + ratio * (this.max() - this.min());\n }\n\n private setThumb(index: number, next: number): void {\n if (this.range()) {\n const [low, high] = this.thumbValues();\n this.value.set(\n index === 0 ? [Math.min(next, high), high] : [low, Math.max(next, low)],\n );\n } else {\n this.value.set(next);\n }\n }\n\n private snap(raw: number): number {\n const step = this.step() || 1;\n const min = this.min();\n const snapped = Math.round((raw - min) / step) * step + min;\n\n return Math.min(this.max(), Math.max(min, snapped));\n }\n}\n","<div\n #track\n class=\"track\"\n (pointerdown)=\"onTrackPointerDown($event)\"\n (pointermove)=\"onTrackPointerMove($event)\"\n (pointerup)=\"onTrackPointerUp($event)\"\n (pointercancel)=\"onTrackPointerUp($event)\">\n <span\n class=\"fill\"\n [style.left.%]=\"fill().left\"\n [style.width.%]=\"fill().width\">\n </span>\n\n @for (thumbValue of thumbValues(); track $index; let i = $index) {\n <span\n class=\"thumb\"\n role=\"slider\"\n [attr.tabindex]=\"isDisabled() ? -1 : 0\"\n [style.left.%]=\"percent(thumbValue)\"\n [attr.aria-valuemin]=\"thumbMin(i)\"\n [attr.aria-valuemax]=\"thumbMax(i)\"\n [attr.aria-valuenow]=\"thumbValue\"\n [attr.aria-orientation]=\"'horizontal'\"\n [attr.aria-label]=\"thumbAriaLabel(i)\"\n [attr.aria-disabled]=\"isDisabled() ? 'true' : null\"\n [attr.aria-invalid]=\"invalidResolved() ? 'true' : null\"\n [attr.aria-describedby]=\"hintId()\"\n (keydown)=\"onThumbKeydown($event, i)\">\n </span>\n }\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","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AA0CM,MAAO,eAAgB,SAAQ,sBAAmC,CAAA;AACnD,IAAA,IAAI,GAAG,MAAM,CAAC,OAAO,CAAC;;AAEhC,IAAA,KAAK,GAAG,KAAK,CAAc,CAAC,4EAAC;;IAE7B,GAAG,GAAG,KAAK,CAAC,CAAC,2EAAI,SAAS,EAAE,eAAe,EAAA,CAAG;;IAE9C,GAAG,GAAG,KAAK,CAAC,GAAG,2EAAI,SAAS,EAAE,eAAe,EAAA,CAAG;;IAEhD,IAAI,GAAG,KAAK,CAAC,CAAC,4EAAI,SAAS,EAAE,eAAe,EAAA,CAAG;;IAE/C,KAAK,GAAG,KAAK,CAAC,KAAK,6EAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;;IAErD,QAAQ,GAAG,KAAK,CAAC,KAAK,gFAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;;AAExD,IAAA,SAAS,GAAG,KAAK,CAAgB,IAAI,gFAAC;AAE9B,IAAA,KAAK,GAAG,SAAS,CAAC,QAAQ,CAA0B,OAAO,CAAC;IACrE,QAAQ,GAAG,CAAC,CAAC;AAEF,IAAA,GAAG,GAAG,aAAa,CAAC,WAAW,CAAC;IAChC,MAAM,GAAG,QAAQ,CAAC,MACnC,IAAI,CAAC,OAAO,EAAE,CAAC,IAAI,GAAG,CAAA,EAAG,IAAI,CAAC,GAAG,CAAA,KAAA,CAAO,GAAG,IAAI,EAAA,IAAA,SAAA,GAAA,CAAA,EAAA,SAAA,EAAA,QAAA,EAAA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;+BACE,WAAW,EAAA,UAAA,EACT,IAAI,EAAA,OAAA,EACP,CAAC,qBAAqB,CAAC,EAAA,aAAA,EAGjB,iBAAiB,CAAC,QAAQ,EAAA,SAAA,EAC9B;AACT,wBAAA;AACE,4BAAA,OAAO,EAAE,iBAAiB;AAC1B,4BAAA,WAAW,EAAE,UAAU,CAAC,qBAAqB,CAAC;AAC9C,4BAAA,KAAK,EAAE,IAAI;AACZ,yBAAA;qBACF,EAAA,IAAA,EACK;AACJ,wBAAA,eAAe,EAAE,SAAS;AAC1B,wBAAA,kBAAkB,EAAE,cAAc;AAClC,wBAAA,iBAAiB,EAAE,mBAAmB;AACvC,qBAAA,EAAA,QAAA,EAAA,isCAAA,EAAA,MAAA,EAAA,CAAA,svFAAA,CAAA,EAAA;yuBAmBoE,OAAO,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AE3D9E;;AAEG;;;;"}
1
+ {"version":3,"file":"ids-group-ltd-ids-design-system-components-slider.mjs","sources":["../../../src/lib/components/slider/slider.component.ts","../../../src/lib/components/slider/slider.component.html","../../../src/lib/components/slider/ids-group-ltd-ids-design-system-components-slider.ts"],"sourcesContent":["import {\n Component,\n ElementRef,\n ViewEncapsulation,\n booleanAttribute,\n computed,\n forwardRef,\n inject,\n input,\n model,\n numberAttribute,\n viewChild,\n} from '@angular/core';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { DS_INTL } from '@ids-group-ltd/ids-design-system/core';\nimport { DsControlValueAccessor } from '@ids-group-ltd/ids-design-system/components';\nimport { FieldMessageComponent } from '@ids-group-ltd/ids-design-system/components/field-message';\nimport { resolveFieldMessage } from '@ids-group-ltd/ids-design-system/components';\nimport { nextControlId } from '@ids-group-ltd/ids-design-system/components';\n\ntype SliderValue = number | readonly [number, number];\n\n@Component({\n selector: 'ds-slider',\n standalone: true,\n imports: [FieldMessageComponent],\n templateUrl: './slider.component.html',\n styleUrl: './slider.component.scss',\n encapsulation: ViewEncapsulation.Emulated,\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => SliderComponent),\n multi: true,\n },\n ],\n host: {\n '[class.range]': 'range()',\n '[class.disabled]': 'isDisabled()',\n '[class.invalid]': 'invalidResolved()',\n },\n})\nexport class SliderComponent extends DsControlValueAccessor<SliderValue> {\n protected readonly intl = inject(DS_INTL);\n /** Current value, or `[low, high]` when `range`. */\n readonly value = model<SliderValue>(0);\n /** Minimum selectable value. */\n readonly min = input(0, { transform: numberAttribute });\n /** Maximum selectable value. */\n readonly max = input(100, { transform: numberAttribute });\n /** Snap increment for dragging and arrow keys. */\n readonly step = input(1, { transform: numberAttribute });\n /** Two-thumb mode: `value` becomes a `[low, high]` tuple. */\n readonly range = input(false, { transform: booleanAttribute });\n /** Disables the slider and blocks all interaction. */\n readonly disabled = input(false, { transform: booleanAttribute });\n /** Accessible name of the thumb(s); suffixed \"minimum\"/\"maximum\" in `range` mode. */\n readonly ariaLabel = input<string | null>(null);\n\n private readonly track = viewChild.required<ElementRef<HTMLElement>>('track');\n private dragging = -1;\n\n protected readonly uid = nextControlId('ds-slider');\n protected readonly hintId = computed(() =>\n this.message().text ? `${this.uid}-hint` : null,\n );\n private readonly fieldMessage = resolveFieldMessage({\n disabled: () => this.isDisabled(),\n hint: this.hint,\n warning: this.warning,\n error: this.error,\n errors: this.errors,\n invalid: this.invalid,\n touchedSelf: this.touchedSelf,\n touched: this.touched,\n });\n protected readonly message = this.fieldMessage.message;\n protected readonly invalidResolved = this.fieldMessage.invalid;\n\n protected readonly isDisabled = computed(\n () => this.disabled() || this.formDisabled(),\n );\n\n protected readonly thumbValues = computed<number[]>(() => {\n const value = this.value();\n if (this.range()) {\n const [low, high] = value as readonly [number, number];\n\n return [low, high];\n }\n\n return [value as number];\n });\n\n protected readonly fill = computed<{ left: number; width: number }>(() => {\n const values = this.thumbValues();\n if (this.range()) {\n const low = this.percent(values[0]);\n const high = this.percent(values[1]);\n\n return { left: low, width: high - low };\n }\n\n return { left: 0, width: this.percent(values[0]) };\n });\n\n protected percent(value: number): number {\n const min = this.min();\n const max = this.max();\n\n return max === min ? 0 : ((value - min) / (max - min)) * 100;\n }\n\n protected thumbMin(index: number): number {\n return this.range() && index === 1 ? this.thumbValues()[0] : this.min();\n }\n\n protected thumbMax(index: number): number {\n return this.range() && index === 0 ? this.thumbValues()[1] : this.max();\n }\n\n protected onTrackPointerDown(event: PointerEvent): void {\n if (this.isDisabled()) {\n return;\n }\n const track = this.track().nativeElement;\n track.setPointerCapture(event.pointerId);\n this.dragging = this.nearestThumb(event.clientX);\n this.updateFromClientX(event.clientX);\n track.querySelectorAll<HTMLElement>('.thumb')[this.dragging]?.focus();\n }\n\n protected onTrackPointerMove(event: PointerEvent): void {\n if (this.dragging < 0) {\n return;\n }\n this.updateFromClientX(event.clientX);\n }\n\n // Bound to pointerup and pointercancel: touch interventions fire pointercancel, and without it\n // the drag state leaks and keeps moving the thumb with no pointer down.\n protected onTrackPointerUp(event: PointerEvent): void {\n if (this.dragging < 0) {\n return;\n }\n const track = this.track().nativeElement;\n if (track.hasPointerCapture(event.pointerId)) {\n track.releasePointerCapture(event.pointerId);\n }\n this.dragging = -1;\n this.markTouched();\n }\n\n protected thumbAriaLabel(index: number): string | null {\n const base = this.ariaLabel();\n if (!this.range()) {\n return base;\n }\n\n return index === 0\n ? this.intl().slider.rangeStart(base ?? '')\n : this.intl().slider.rangeEnd(base ?? '');\n }\n\n protected onThumbKeydown(event: KeyboardEvent, index: number): void {\n if (this.isDisabled()) {\n return;\n }\n const step = this.step() || 1;\n let delta = 0;\n let absolute: number | null = null;\n switch (event.key) {\n case 'ArrowRight':\n case 'ArrowUp':\n delta = step;\n break;\n case 'ArrowLeft':\n case 'ArrowDown':\n delta = -step;\n break;\n case 'PageUp':\n delta = step * 10;\n break;\n case 'PageDown':\n delta = -step * 10;\n break;\n case 'Home':\n absolute = this.thumbMin(index);\n break;\n case 'End':\n absolute = this.thumbMax(index);\n break;\n default:\n return;\n }\n event.preventDefault();\n const current = this.thumbValues()[index];\n this.setThumb(index, absolute ?? this.snap(current + delta));\n }\n\n private nearestThumb(clientX: number): number {\n if (!this.range()) {\n return 0;\n }\n const value = this.valueFromClientX(clientX);\n const [low, high] = this.thumbValues();\n\n return Math.abs(value - low) <= Math.abs(value - high) ? 0 : 1;\n }\n\n private updateFromClientX(clientX: number): void {\n this.setThumb(this.dragging, this.snap(this.valueFromClientX(clientX)));\n }\n\n private valueFromClientX(clientX: number): number {\n const rect = this.track().nativeElement.getBoundingClientRect();\n if (rect.width === 0) {\n return this.min();\n }\n const ratio = Math.min(1, Math.max(0, (clientX - rect.left) / rect.width));\n\n return this.min() + ratio * (this.max() - this.min());\n }\n\n private setThumb(index: number, next: number): void {\n if (this.range()) {\n const [low, high] = this.thumbValues();\n this.value.set(\n index === 0 ? [Math.min(next, high), high] : [low, Math.max(next, low)],\n );\n } else {\n this.value.set(next);\n }\n }\n\n private snap(raw: number): number {\n const step = this.step() || 1;\n const min = this.min();\n const snapped = Math.round((raw - min) / step) * step + min;\n\n return Math.min(this.max(), Math.max(min, snapped));\n }\n}\n","<div\n #track\n class=\"track\"\n (pointerdown)=\"onTrackPointerDown($event)\"\n (pointermove)=\"onTrackPointerMove($event)\"\n (pointerup)=\"onTrackPointerUp($event)\"\n (pointercancel)=\"onTrackPointerUp($event)\">\n <span\n class=\"fill\"\n [style.left.%]=\"fill().left\"\n [style.width.%]=\"fill().width\">\n </span>\n\n @for (thumbValue of thumbValues(); track $index; let i = $index) {\n <span\n class=\"thumb\"\n role=\"slider\"\n [attr.tabindex]=\"isDisabled() ? -1 : 0\"\n [style.left.%]=\"percent(thumbValue)\"\n [attr.aria-valuemin]=\"thumbMin(i)\"\n [attr.aria-valuemax]=\"thumbMax(i)\"\n [attr.aria-valuenow]=\"thumbValue\"\n [attr.aria-orientation]=\"'horizontal'\"\n [attr.aria-label]=\"thumbAriaLabel(i)\"\n [attr.aria-disabled]=\"isDisabled() ? 'true' : null\"\n [attr.aria-invalid]=\"invalidResolved() ? 'true' : null\"\n [attr.aria-describedby]=\"hintId()\"\n (keydown)=\"onThumbKeydown($event, i)\">\n </span>\n }\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","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AA0CM,MAAO,eAAgB,SAAQ,sBAAmC,CAAA;AACnD,IAAA,IAAI,GAAG,MAAM,CAAC,OAAO,CAAC;;AAEhC,IAAA,KAAK,GAAG,KAAK,CAAc,CAAC,4EAAC;;IAE7B,GAAG,GAAG,KAAK,CAAC,CAAC,2EAAI,SAAS,EAAE,eAAe,EAAA,CAAG;;IAE9C,GAAG,GAAG,KAAK,CAAC,GAAG,2EAAI,SAAS,EAAE,eAAe,EAAA,CAAG;;IAEhD,IAAI,GAAG,KAAK,CAAC,CAAC,4EAAI,SAAS,EAAE,eAAe,EAAA,CAAG;;IAE/C,KAAK,GAAG,KAAK,CAAC,KAAK,6EAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;;IAErD,QAAQ,GAAG,KAAK,CAAC,KAAK,gFAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;;AAExD,IAAA,SAAS,GAAG,KAAK,CAAgB,IAAI,gFAAC;AAE9B,IAAA,KAAK,GAAG,SAAS,CAAC,QAAQ,CAA0B,OAAO,CAAC;IACrE,QAAQ,GAAG,CAAC,CAAC;AAEF,IAAA,GAAG,GAAG,aAAa,CAAC,WAAW,CAAC;IAChC,MAAM,GAAG,QAAQ,CAAC,MACnC,IAAI,CAAC,OAAO,EAAE,CAAC,IAAI,GAAG,CAAA,EAAG,IAAI,CAAC,GAAG,CAAA,KAAA,CAAO,GAAG,IAAI,EAAA,IAAA,SAAA,GAAA,CAAA,EAAA,SAAA,EAAA,QAAA,EAAA,CAAA,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AAW,EAAA,UAAA,EACT,IAAI,EAAA,OAAA,EACP,CAAC,qBAAqB,CAAC,EAAA,aAAA,EAGjB,iBAAiB,CAAC,QAAQ,EAAA,SAAA,EAC9B;AACT,wBAAA;AACE,4BAAA,OAAO,EAAE,iBAAiB;AAC1B,4BAAA,WAAW,EAAE,UAAU,CAAC,qBAAqB,CAAC;AAC9C,4BAAA,KAAK,EAAE,IAAI;AACZ,yBAAA;qBACF,EAAA,IAAA,EACK;AACJ,wBAAA,eAAe,EAAE,SAAS;AAC1B,wBAAA,kBAAkB,EAAE,cAAc;AAClC,wBAAA,iBAAiB,EAAE,mBAAmB;AACvC,qBAAA,EAAA,QAAA,EAAA,isCAAA,EAAA,MAAA,EAAA,CAAA,k3DAAA,CAAA,EAAA;yuBAmBoE,OAAO,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AE3D9E;;AAEG;;;;"}
@@ -140,7 +140,7 @@ class SparklineComponent {
140
140
  });
141
141
  }
142
142
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: SparklineComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
143
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: SparklineComponent, isStandalone: true, selector: "ds-sparkline", inputs: { area: { classPropertyName: "area", publicName: "area", isSignal: true, isRequired: false, transformFunction: null }, data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null }, categories: { classPropertyName: "categories", publicName: "categories", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, scale: { classPropertyName: "scale", publicName: "scale", isSignal: true, isRequired: false, transformFunction: null }, tooltip: { classPropertyName: "tooltip", publicName: "tooltip", isSignal: true, isRequired: false, transformFunction: null }, valueFormat: { classPropertyName: "valueFormat", publicName: "valueFormat", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "focus": "onFocus()", "blur": "clearActive()", "keydown": "onKeydown($event)" }, properties: { "attr.role": "label() ? 'img' : null", "attr.aria-label": "label()", "attr.aria-hidden": "label() ? null : 'true'", "attr.tabindex": "focusable() ? 0 : null" } }, viewQueries: [{ propertyName: "canvas", first: true, predicate: ["canvas"], descendants: true, isSignal: true }], ngImport: i0, template: "<svg\n #canvas\n class=\"sparkline\"\n aria-hidden=\"true\"\n [dsChartTooltip]=\"tooltipContext()\"\n [dsChartTooltipOrigin]=\"tooltipOrigin()\"\n (pointermove)=\"onPointerMove($event)\"\n (pointerleave)=\"clearActive()\">\n <svg\n viewBox=\"0 0 100 100\"\n preserveAspectRatio=\"none\"\n width=\"100%\"\n height=\"100%\"\n overflow=\"visible\">\n @if (area()) {\n <path\n class=\"area\"\n [attr.d]=\"geometry().areaPath\" />\n }\n\n <path\n class=\"line\"\n [attr.d]=\"geometry().path\" />\n </svg>\n\n @if (shownPoint(); as point) {\n <circle\n class=\"dot\"\n [attr.cx]=\"point.x + '%'\"\n [attr.cy]=\"point.y + '%'\" />\n }\n</svg>\n", styles: [":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{--_sparkline-width: var(--ds-sparkline-width, 80px);--_sparkline-height: var(--ds-sparkline-height, 24px);--_sparkline-line-color: var(--ds-sparkline-line-color, var(--ds-chart-series-1-color));--_sparkline-line-width: var(--ds-sparkline-line-width, 1.5px);--_sparkline-dot-radius: var(--ds-sparkline-dot-radius, 2.5px);--_sparkline-area-color: var(--ds-sparkline-area-color, var(--_sparkline-line-color));--_sparkline-area-opacity: var(--ds-sparkline-area-opacity, var(--ds-chart-area-opacity));display:inline-block;inline-size:var(--_sparkline-width);block-size:var(--_sparkline-height);vertical-align:middle}:host(: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)}.sparkline{display:block;inline-size:100%;block-size:100%;overflow:visible}.area{fill:var(--_sparkline-area-color);fill-opacity:var(--_sparkline-area-opacity)}.line{fill:none;stroke:var(--_sparkline-line-color);stroke-width:var(--_sparkline-line-width);stroke-linecap:round;stroke-linejoin:round;vector-effect:non-scaling-stroke}.dot{r:var(--_sparkline-dot-radius);fill:var(--_sparkline-line-color)}@media(forced-colors:active){.line{stroke:CanvasText}.dot{fill:CanvasText}}\n"], dependencies: [{ kind: "directive", type: ChartTooltipDirective, selector: "[dsChartTooltip]", inputs: ["dsChartTooltip", "dsChartTooltipOrigin", "dsChartTooltipTemplate", "dsChartTooltipExtraGap", "dsChartTooltipPinned", "dsChartTooltipSwatches"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
143
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: SparklineComponent, isStandalone: true, selector: "ds-sparkline", inputs: { area: { classPropertyName: "area", publicName: "area", isSignal: true, isRequired: false, transformFunction: null }, data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null }, categories: { classPropertyName: "categories", publicName: "categories", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, scale: { classPropertyName: "scale", publicName: "scale", isSignal: true, isRequired: false, transformFunction: null }, tooltip: { classPropertyName: "tooltip", publicName: "tooltip", isSignal: true, isRequired: false, transformFunction: null }, valueFormat: { classPropertyName: "valueFormat", publicName: "valueFormat", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "focus": "onFocus()", "blur": "clearActive()", "keydown": "onKeydown($event)" }, properties: { "attr.role": "label() ? 'img' : null", "attr.aria-label": "label()", "attr.aria-hidden": "label() ? null : 'true'", "attr.tabindex": "focusable() ? 0 : null" } }, viewQueries: [{ propertyName: "canvas", first: true, predicate: ["canvas"], descendants: true, isSignal: true }], ngImport: i0, template: "<svg\n #canvas\n class=\"sparkline\"\n aria-hidden=\"true\"\n [dsChartTooltip]=\"tooltipContext()\"\n [dsChartTooltipOrigin]=\"tooltipOrigin()\"\n (pointermove)=\"onPointerMove($event)\"\n (pointerleave)=\"clearActive()\">\n <svg\n viewBox=\"0 0 100 100\"\n preserveAspectRatio=\"none\"\n width=\"100%\"\n height=\"100%\"\n overflow=\"visible\">\n @if (area()) {\n <path\n class=\"area\"\n [attr.d]=\"geometry().areaPath\" />\n }\n\n <path\n class=\"line\"\n [attr.d]=\"geometry().path\" />\n </svg>\n\n @if (shownPoint(); as point) {\n <circle\n class=\"dot\"\n [attr.cx]=\"point.x + '%'\"\n [attr.cy]=\"point.y + '%'\" />\n }\n</svg>\n", styles: [":host{--_sparkline-width: var(--ds-sparkline-width, 80px);--_sparkline-height: var(--ds-sparkline-height, 24px);--_sparkline-line-color: var(--ds-sparkline-line-color, var(--ds-chart-series-1-color));--_sparkline-line-width: var(--ds-sparkline-line-width, 1.5px);--_sparkline-dot-radius: var(--ds-sparkline-dot-radius, 2.5px);--_sparkline-area-color: var(--ds-sparkline-area-color, var(--_sparkline-line-color));--_sparkline-area-opacity: var(--ds-sparkline-area-opacity, var(--ds-chart-area-opacity));display:inline-block;inline-size:var(--_sparkline-width);block-size:var(--_sparkline-height);vertical-align:middle}:host(: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)}.sparkline{display:block;inline-size:100%;block-size:100%;overflow:visible}.area{fill:var(--_sparkline-area-color);fill-opacity:var(--_sparkline-area-opacity)}.line{fill:none;stroke:var(--_sparkline-line-color);stroke-width:var(--_sparkline-line-width);stroke-linecap:round;stroke-linejoin:round;vector-effect:non-scaling-stroke}.dot{r:var(--_sparkline-dot-radius);fill:var(--_sparkline-line-color)}@media(forced-colors:active){.line{stroke:CanvasText}.dot{fill:CanvasText}}\n"], dependencies: [{ kind: "directive", type: ChartTooltipDirective, selector: "[dsChartTooltip]", inputs: ["dsChartTooltip", "dsChartTooltipOrigin", "dsChartTooltipTemplate", "dsChartTooltipExtraGap", "dsChartTooltipPinned", "dsChartTooltipSwatches"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
144
144
  }
145
145
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: SparklineComponent, decorators: [{
146
146
  type: Component,
@@ -152,7 +152,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
152
152
  '(focus)': 'onFocus()',
153
153
  '(blur)': 'clearActive()',
154
154
  '(keydown)': 'onKeydown($event)',
155
- }, encapsulation: ViewEncapsulation.Emulated, changeDetection: ChangeDetectionStrategy.OnPush, template: "<svg\n #canvas\n class=\"sparkline\"\n aria-hidden=\"true\"\n [dsChartTooltip]=\"tooltipContext()\"\n [dsChartTooltipOrigin]=\"tooltipOrigin()\"\n (pointermove)=\"onPointerMove($event)\"\n (pointerleave)=\"clearActive()\">\n <svg\n viewBox=\"0 0 100 100\"\n preserveAspectRatio=\"none\"\n width=\"100%\"\n height=\"100%\"\n overflow=\"visible\">\n @if (area()) {\n <path\n class=\"area\"\n [attr.d]=\"geometry().areaPath\" />\n }\n\n <path\n class=\"line\"\n [attr.d]=\"geometry().path\" />\n </svg>\n\n @if (shownPoint(); as point) {\n <circle\n class=\"dot\"\n [attr.cx]=\"point.x + '%'\"\n [attr.cy]=\"point.y + '%'\" />\n }\n</svg>\n", styles: [":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{--_sparkline-width: var(--ds-sparkline-width, 80px);--_sparkline-height: var(--ds-sparkline-height, 24px);--_sparkline-line-color: var(--ds-sparkline-line-color, var(--ds-chart-series-1-color));--_sparkline-line-width: var(--ds-sparkline-line-width, 1.5px);--_sparkline-dot-radius: var(--ds-sparkline-dot-radius, 2.5px);--_sparkline-area-color: var(--ds-sparkline-area-color, var(--_sparkline-line-color));--_sparkline-area-opacity: var(--ds-sparkline-area-opacity, var(--ds-chart-area-opacity));display:inline-block;inline-size:var(--_sparkline-width);block-size:var(--_sparkline-height);vertical-align:middle}:host(: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)}.sparkline{display:block;inline-size:100%;block-size:100%;overflow:visible}.area{fill:var(--_sparkline-area-color);fill-opacity:var(--_sparkline-area-opacity)}.line{fill:none;stroke:var(--_sparkline-line-color);stroke-width:var(--_sparkline-line-width);stroke-linecap:round;stroke-linejoin:round;vector-effect:non-scaling-stroke}.dot{r:var(--_sparkline-dot-radius);fill:var(--_sparkline-line-color)}@media(forced-colors:active){.line{stroke:CanvasText}.dot{fill:CanvasText}}\n"] }]
155
+ }, encapsulation: ViewEncapsulation.Emulated, changeDetection: ChangeDetectionStrategy.OnPush, template: "<svg\n #canvas\n class=\"sparkline\"\n aria-hidden=\"true\"\n [dsChartTooltip]=\"tooltipContext()\"\n [dsChartTooltipOrigin]=\"tooltipOrigin()\"\n (pointermove)=\"onPointerMove($event)\"\n (pointerleave)=\"clearActive()\">\n <svg\n viewBox=\"0 0 100 100\"\n preserveAspectRatio=\"none\"\n width=\"100%\"\n height=\"100%\"\n overflow=\"visible\">\n @if (area()) {\n <path\n class=\"area\"\n [attr.d]=\"geometry().areaPath\" />\n }\n\n <path\n class=\"line\"\n [attr.d]=\"geometry().path\" />\n </svg>\n\n @if (shownPoint(); as point) {\n <circle\n class=\"dot\"\n [attr.cx]=\"point.x + '%'\"\n [attr.cy]=\"point.y + '%'\" />\n }\n</svg>\n", styles: [":host{--_sparkline-width: var(--ds-sparkline-width, 80px);--_sparkline-height: var(--ds-sparkline-height, 24px);--_sparkline-line-color: var(--ds-sparkline-line-color, var(--ds-chart-series-1-color));--_sparkline-line-width: var(--ds-sparkline-line-width, 1.5px);--_sparkline-dot-radius: var(--ds-sparkline-dot-radius, 2.5px);--_sparkline-area-color: var(--ds-sparkline-area-color, var(--_sparkline-line-color));--_sparkline-area-opacity: var(--ds-sparkline-area-opacity, var(--ds-chart-area-opacity));display:inline-block;inline-size:var(--_sparkline-width);block-size:var(--_sparkline-height);vertical-align:middle}:host(: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)}.sparkline{display:block;inline-size:100%;block-size:100%;overflow:visible}.area{fill:var(--_sparkline-area-color);fill-opacity:var(--_sparkline-area-opacity)}.line{fill:none;stroke:var(--_sparkline-line-color);stroke-width:var(--_sparkline-line-width);stroke-linecap:round;stroke-linejoin:round;vector-effect:non-scaling-stroke}.dot{r:var(--_sparkline-dot-radius);fill:var(--_sparkline-line-color)}@media(forced-colors:active){.line{stroke:CanvasText}.dot{fill:CanvasText}}\n"] }]
156
156
  }], propDecorators: { area: [{ type: i0.Input, args: [{ isSignal: true, alias: "area", required: false }] }], data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: false }] }], categories: [{ type: i0.Input, args: [{ isSignal: true, alias: "categories", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], scale: [{ type: i0.Input, args: [{ isSignal: true, alias: "scale", required: false }] }], tooltip: [{ type: i0.Input, args: [{ isSignal: true, alias: "tooltip", required: false }] }], valueFormat: [{ type: i0.Input, args: [{ isSignal: true, alias: "valueFormat", required: false }] }], canvas: [{ type: i0.ViewChild, args: ['canvas', { isSignal: true }] }] } });
157
157
 
158
158
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"ids-group-ltd-ids-design-system-components-sparkline.mjs","sources":["../../../src/lib/components/sparkline/sparkline.math.ts","../../../src/lib/components/sparkline/sparkline.component.ts","../../../src/lib/components/sparkline/sparkline.component.html","../../../src/lib/components/sparkline/ids-group-ltd-ids-design-system-components-sparkline.ts"],"sourcesContent":["import type { SparklineScale } from './sparkline.types';\n\nexport interface SparklinePoint {\n readonly index: number;\n readonly x: number;\n readonly y: number;\n}\n\nexport interface SparklineGeometry {\n readonly path: string;\n /** Each unbroken run of the line closed down to the baseline: zero on the `'zero'` scale, the\n * foot of the box on `'data'`. */\n readonly areaPath: string;\n readonly points: readonly SparklinePoint[];\n}\n\n/** Positions in percent of the box, x across the readings and y down from the top of the scale.\n * A flat series on the `'data'` scale draws through the middle. A `null` breaks the line. */\nexport function sparklineGeometry(\n data: readonly (number | null)[],\n scale: SparklineScale,\n): SparklineGeometry {\n const finite = data.filter(\n (value): value is number => value !== null && Number.isFinite(value),\n );\n if (finite.length === 0) {\n return { path: '', areaPath: '', points: [] };\n }\n const floor = scale === 'zero' ? Math.min(0, ...finite) : Math.min(...finite);\n const ceiling =\n scale === 'zero' ? Math.max(0, ...finite) : Math.max(...finite);\n const span = ceiling - floor;\n const lastIndex = data.length - 1;\n const baseline = scale === 'zero' && span > 0 ? (ceiling / span) * 100 : 100;\n const points: SparklinePoint[] = [];\n const runs: SparklinePoint[][] = [];\n let path = '';\n let penDown = false;\n data.forEach((value, index) => {\n if (value === null || !Number.isFinite(value)) {\n penDown = false;\n\n return;\n }\n const x = lastIndex === 0 ? 50 : (index / lastIndex) * 100;\n const y = span === 0 ? 50 : ((ceiling - value) / span) * 100;\n const point = { index, x, y };\n points.push(point);\n if (penDown) {\n runs[runs.length - 1].push(point);\n } else {\n runs.push([point]);\n }\n path += `${penDown ? 'L' : 'M'}${x} ${y}`;\n penDown = true;\n });\n const areaPath = runs\n .map(\n (run) =>\n `M${run[0].x} ${baseline}` +\n run.map((point) => `L${point.x} ${point.y}`).join('') +\n `L${run[run.length - 1].x} ${baseline}Z`,\n )\n .join('');\n\n return { path, areaPath, points };\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n LOCALE_ID,\n ViewEncapsulation,\n booleanAttribute,\n computed,\n inject,\n input,\n signal,\n viewChild,\n} from '@angular/core';\nimport { ChartTooltipDirective } from '@ids-group-ltd/ids-design-system/components/chart-tooltip';\nimport type {\n ChartTooltipContext,\n ChartTooltipOrigin,\n} from '@ids-group-ltd/ids-design-system/components/chart-tooltip';\nimport { sparklineGeometry } from './sparkline.math';\nimport type { SparklinePoint } from './sparkline.math';\nimport type { SparklineScale } from './sparkline.types';\n\n/** A word-sized trend line: no axes, legend or frame, a dot on the last reading, and a tooltip.\n * Sized by `--ds-sparkline-width` and `--ds-sparkline-height`. */\n@Component({\n selector: 'ds-sparkline',\n standalone: true,\n imports: [ChartTooltipDirective],\n templateUrl: './sparkline.component.html',\n styleUrl: './sparkline.component.scss',\n host: {\n '[attr.role]': \"label() ? 'img' : null\",\n '[attr.aria-label]': 'label()',\n '[attr.aria-hidden]': \"label() ? null : 'true'\",\n '[attr.tabindex]': 'focusable() ? 0 : null',\n '(focus)': 'onFocus()',\n '(blur)': 'clearActive()',\n '(keydown)': 'onKeydown($event)',\n },\n encapsulation: ViewEncapsulation.Emulated,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class SparklineComponent {\n /** Fills the band under the line down to the baseline. The colour is\n * `--ds-sparkline-area-color`, the line's own by default, at `--ds-sparkline-area-opacity`. */\n readonly area = input(false, { transform: booleanAttribute });\n\n /** One reading per step, oldest first. `null` breaks the line. */\n readonly data = input<readonly (number | null)[]>([]);\n\n /** What each reading is, for the tooltip. Left out, the tooltip prints the value alone. */\n readonly categories = input<readonly string[]>([]);\n\n /** Accessible name, and the series name in the tooltip. Left out, the sparkline is decorative\n * and hidden from assistive technology. */\n readonly label = input<string | null>(null);\n\n readonly scale = input<SparklineScale>('data');\n\n /** Shows the reading under the pointer, and under the keyboard where `label` makes the sparkline\n * focusable: focus opens the last reading; arrows, Home and End move. */\n readonly tooltip = input(true, { transform: booleanAttribute });\n\n /** Formats the value the tooltip prints. Unset, the locale's plain number format. */\n readonly valueFormat = input<((value: number) => string) | null>(null);\n\n private readonly locale = inject(LOCALE_ID);\n\n private readonly canvas =\n viewChild.required<ElementRef<SVGSVGElement>>('canvas');\n\n protected readonly focusable = computed(\n () => this.tooltip() && this.label() !== null,\n );\n\n protected readonly geometry = computed(() =>\n sparklineGeometry(this.data(), this.scale()),\n );\n\n protected readonly activePoint = signal<SparklinePoint | null>(null);\n\n protected readonly shownPoint = computed(\n () => this.activePoint() ?? this.geometry().points.at(-1) ?? null,\n );\n\n protected readonly tooltipOrigin = signal<ChartTooltipOrigin | null>(null);\n\n protected readonly tooltipContext = computed<ChartTooltipContext | null>(\n () => {\n const point = this.activePoint();\n const value = point ? this.data()[point.index] : null;\n if (!point || value == null || !this.tooltip()) {\n return null;\n }\n const format =\n this.valueFormat() ??\n ((reading: number) => reading.toLocaleString(this.locale));\n\n return {\n category: this.categories()[point.index] ?? '',\n entries: [\n {\n label: this.label() ?? '',\n value,\n formatted: format(value),\n color:\n 'var(--ds-sparkline-line-color, var(--ds-chart-series-1-color))',\n },\n ],\n };\n },\n );\n\n protected onPointerMove(event: PointerEvent): void {\n const points = this.geometry().points;\n if (!this.tooltip() || points.length === 0) {\n return;\n }\n const box = this.canvas().nativeElement.getBoundingClientRect();\n const across = ((event.clientX - box.left) / box.width) * 100;\n this.activate(\n points.reduce((best, point) =>\n Math.abs(point.x - across) < Math.abs(best.x - across) ? point : best,\n ),\n );\n }\n\n protected onFocus(): void {\n const last = this.geometry().points.at(-1);\n if (this.focusable() && last) {\n this.activate(last);\n }\n }\n\n protected onKeydown(event: KeyboardEvent): void {\n const points = this.geometry().points;\n const current = this.activePoint();\n if (!this.focusable() || !current) {\n return;\n }\n const position = points.indexOf(current);\n const target = {\n ArrowLeft: position - 1,\n ArrowRight: position + 1,\n Home: 0,\n End: points.length - 1,\n }[event.key];\n if (target === undefined) {\n return;\n }\n event.preventDefault();\n this.activate(points[Math.min(Math.max(target, 0), points.length - 1)]);\n }\n\n protected clearActive(): void {\n this.activePoint.set(null);\n this.tooltipOrigin.set(null);\n }\n\n private activate(point: SparklinePoint): void {\n if (point === this.activePoint()) {\n return;\n }\n const box = this.canvas().nativeElement.getBoundingClientRect();\n this.activePoint.set(point);\n this.tooltipOrigin.set({\n x: box.left + (point.x / 100) * box.width,\n y: box.top + (point.y / 100) * box.height,\n });\n }\n}\n","<svg\n #canvas\n class=\"sparkline\"\n aria-hidden=\"true\"\n [dsChartTooltip]=\"tooltipContext()\"\n [dsChartTooltipOrigin]=\"tooltipOrigin()\"\n (pointermove)=\"onPointerMove($event)\"\n (pointerleave)=\"clearActive()\">\n <svg\n viewBox=\"0 0 100 100\"\n preserveAspectRatio=\"none\"\n width=\"100%\"\n height=\"100%\"\n overflow=\"visible\">\n @if (area()) {\n <path\n class=\"area\"\n [attr.d]=\"geometry().areaPath\" />\n }\n\n <path\n class=\"line\"\n [attr.d]=\"geometry().path\" />\n </svg>\n\n @if (shownPoint(); as point) {\n <circle\n class=\"dot\"\n [attr.cx]=\"point.x + '%'\"\n [attr.cy]=\"point.y + '%'\" />\n }\n</svg>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;AAgBA;AAC8F;AACxF,SAAU,iBAAiB,CAC/B,IAAgC,EAChC,KAAqB,EAAA;IAErB,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CACxB,CAAC,KAAK,KAAsB,KAAK,KAAK,IAAI,IAAI,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,CACrE;AACD,IAAA,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE;AACvB,QAAA,OAAO,EAAE,IAAI,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE;IAC/C;IACA,MAAM,KAAK,GAAG,KAAK,KAAK,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,GAAG,MAAM,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC;IAC7E,MAAM,OAAO,GACX,KAAK,KAAK,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,GAAG,MAAM,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC;AACjE,IAAA,MAAM,IAAI,GAAG,OAAO,GAAG,KAAK;AAC5B,IAAA,MAAM,SAAS,GAAG,IAAI,CAAC,MAAM,GAAG,CAAC;IACjC,MAAM,QAAQ,GAAG,KAAK,KAAK,MAAM,IAAI,IAAI,GAAG,CAAC,GAAG,CAAC,OAAO,GAAG,IAAI,IAAI,GAAG,GAAG,GAAG;IAC5E,MAAM,MAAM,GAAqB,EAAE;IACnC,MAAM,IAAI,GAAuB,EAAE;IACnC,IAAI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AAA,QAAA,CAAA,EAAA,WAAA,EAAA,IAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EC1C/B,itBAgCA,EAAA,MAAA,EAAA,CAAA,4oEAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EDLY,qBAAqB,EAAA,QAAA,EAAA,kBAAA,EAAA,MAAA,EAAA,CAAA,gBAAA,EAAA,sBAAA,EAAA,wBAAA,EAAA,wBAAA,EAAA,sBAAA,EAAA,wBAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;4FAepB,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAlB9B,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,cAAc,cACZ,IAAI,EAAA,OAAA,EACP,CAAC,qBAAqB,CAAC,EAAA,IAAA,EAG1B;AACJ,wBAAA,aAAa,EAAE,wBAAwB;AACvC,wBAAA,mBAAmB,EAAE,SAAS;AAC9B,wBAAA,oBAAoB,EAAE,yBAAyB;AAC/C,wBAAA,iBAAiB,EAAE,wBAAwB;AAC3C,wBAAA,SAAS,EAAE,WAAW;AACtB,wBAAA,QAAQ,EAAE,eAAe;AACzB,wBAAA,WAAW,EAAE,mBAAmB;AACjC,qBAAA,EAAA,aAAA,EACc,iBAAiB,CAAC,QAAQ,EAAA,eAAA,EACxB,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,itBAAA,EAAA,MAAA,EAAA,CAAA,4oEAAA,CAAA,EAAA;gtBA6BC,QAAQ,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AErE1D;;AAEG;;;;"}
1
+ {"version":3,"file":"ids-group-ltd-ids-design-system-components-sparkline.mjs","sources":["../../../src/lib/components/sparkline/sparkline.math.ts","../../../src/lib/components/sparkline/sparkline.component.ts","../../../src/lib/components/sparkline/sparkline.component.html","../../../src/lib/components/sparkline/ids-group-ltd-ids-design-system-components-sparkline.ts"],"sourcesContent":["import type { SparklineScale } from './sparkline.types';\n\nexport interface SparklinePoint {\n readonly index: number;\n readonly x: number;\n readonly y: number;\n}\n\nexport interface SparklineGeometry {\n readonly path: string;\n /** Each unbroken run of the line closed down to the baseline: zero on the `'zero'` scale, the\n * foot of the box on `'data'`. */\n readonly areaPath: string;\n readonly points: readonly SparklinePoint[];\n}\n\n/** Positions in percent of the box, x across the readings and y down from the top of the scale.\n * A flat series on the `'data'` scale draws through the middle. A `null` breaks the line. */\nexport function sparklineGeometry(\n data: readonly (number | null)[],\n scale: SparklineScale,\n): SparklineGeometry {\n const finite = data.filter(\n (value): value is number => value !== null && Number.isFinite(value),\n );\n if (finite.length === 0) {\n return { path: '', areaPath: '', points: [] };\n }\n const floor = scale === 'zero' ? Math.min(0, ...finite) : Math.min(...finite);\n const ceiling =\n scale === 'zero' ? Math.max(0, ...finite) : Math.max(...finite);\n const span = ceiling - floor;\n const lastIndex = data.length - 1;\n const baseline = scale === 'zero' && span > 0 ? (ceiling / span) * 100 : 100;\n const points: SparklinePoint[] = [];\n const runs: SparklinePoint[][] = [];\n let path = '';\n let penDown = false;\n data.forEach((value, index) => {\n if (value === null || !Number.isFinite(value)) {\n penDown = false;\n\n return;\n }\n const x = lastIndex === 0 ? 50 : (index / lastIndex) * 100;\n const y = span === 0 ? 50 : ((ceiling - value) / span) * 100;\n const point = { index, x, y };\n points.push(point);\n if (penDown) {\n runs[runs.length - 1].push(point);\n } else {\n runs.push([point]);\n }\n path += `${penDown ? 'L' : 'M'}${x} ${y}`;\n penDown = true;\n });\n const areaPath = runs\n .map(\n (run) =>\n `M${run[0].x} ${baseline}` +\n run.map((point) => `L${point.x} ${point.y}`).join('') +\n `L${run[run.length - 1].x} ${baseline}Z`,\n )\n .join('');\n\n return { path, areaPath, points };\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n LOCALE_ID,\n ViewEncapsulation,\n booleanAttribute,\n computed,\n inject,\n input,\n signal,\n viewChild,\n} from '@angular/core';\nimport { ChartTooltipDirective } from '@ids-group-ltd/ids-design-system/components/chart-tooltip';\nimport type {\n ChartTooltipContext,\n ChartTooltipOrigin,\n} from '@ids-group-ltd/ids-design-system/components/chart-tooltip';\nimport { sparklineGeometry } from './sparkline.math';\nimport type { SparklinePoint } from './sparkline.math';\nimport type { SparklineScale } from './sparkline.types';\n\n/** A word-sized trend line: no axes, legend or frame, a dot on the last reading, and a tooltip.\n * Sized by `--ds-sparkline-width` and `--ds-sparkline-height`. */\n@Component({\n selector: 'ds-sparkline',\n standalone: true,\n imports: [ChartTooltipDirective],\n templateUrl: './sparkline.component.html',\n styleUrl: './sparkline.component.scss',\n host: {\n '[attr.role]': \"label() ? 'img' : null\",\n '[attr.aria-label]': 'label()',\n '[attr.aria-hidden]': \"label() ? null : 'true'\",\n '[attr.tabindex]': 'focusable() ? 0 : null',\n '(focus)': 'onFocus()',\n '(blur)': 'clearActive()',\n '(keydown)': 'onKeydown($event)',\n },\n encapsulation: ViewEncapsulation.Emulated,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class SparklineComponent {\n /** Fills the band under the line down to the baseline. The colour is\n * `--ds-sparkline-area-color`, the line's own by default, at `--ds-sparkline-area-opacity`. */\n readonly area = input(false, { transform: booleanAttribute });\n\n /** One reading per step, oldest first. `null` breaks the line. */\n readonly data = input<readonly (number | null)[]>([]);\n\n /** What each reading is, for the tooltip. Left out, the tooltip prints the value alone. */\n readonly categories = input<readonly string[]>([]);\n\n /** Accessible name, and the series name in the tooltip. Left out, the sparkline is decorative\n * and hidden from assistive technology. */\n readonly label = input<string | null>(null);\n\n readonly scale = input<SparklineScale>('data');\n\n /** Shows the reading under the pointer, and under the keyboard where `label` makes the sparkline\n * focusable: focus opens the last reading; arrows, Home and End move. */\n readonly tooltip = input(true, { transform: booleanAttribute });\n\n /** Formats the value the tooltip prints. Unset, the locale's plain number format. */\n readonly valueFormat = input<((value: number) => string) | null>(null);\n\n private readonly locale = inject(LOCALE_ID);\n\n private readonly canvas =\n viewChild.required<ElementRef<SVGSVGElement>>('canvas');\n\n protected readonly focusable = computed(\n () => this.tooltip() && this.label() !== null,\n );\n\n protected readonly geometry = computed(() =>\n sparklineGeometry(this.data(), this.scale()),\n );\n\n protected readonly activePoint = signal<SparklinePoint | null>(null);\n\n protected readonly shownPoint = computed(\n () => this.activePoint() ?? this.geometry().points.at(-1) ?? null,\n );\n\n protected readonly tooltipOrigin = signal<ChartTooltipOrigin | null>(null);\n\n protected readonly tooltipContext = computed<ChartTooltipContext | null>(\n () => {\n const point = this.activePoint();\n const value = point ? this.data()[point.index] : null;\n if (!point || value == null || !this.tooltip()) {\n return null;\n }\n const format =\n this.valueFormat() ??\n ((reading: number) => reading.toLocaleString(this.locale));\n\n return {\n category: this.categories()[point.index] ?? '',\n entries: [\n {\n label: this.label() ?? '',\n value,\n formatted: format(value),\n color:\n 'var(--ds-sparkline-line-color, var(--ds-chart-series-1-color))',\n },\n ],\n };\n },\n );\n\n protected onPointerMove(event: PointerEvent): void {\n const points = this.geometry().points;\n if (!this.tooltip() || points.length === 0) {\n return;\n }\n const box = this.canvas().nativeElement.getBoundingClientRect();\n const across = ((event.clientX - box.left) / box.width) * 100;\n this.activate(\n points.reduce((best, point) =>\n Math.abs(point.x - across) < Math.abs(best.x - across) ? point : best,\n ),\n );\n }\n\n protected onFocus(): void {\n const last = this.geometry().points.at(-1);\n if (this.focusable() && last) {\n this.activate(last);\n }\n }\n\n protected onKeydown(event: KeyboardEvent): void {\n const points = this.geometry().points;\n const current = this.activePoint();\n if (!this.focusable() || !current) {\n return;\n }\n const position = points.indexOf(current);\n const target = {\n ArrowLeft: position - 1,\n ArrowRight: position + 1,\n Home: 0,\n End: points.length - 1,\n }[event.key];\n if (target === undefined) {\n return;\n }\n event.preventDefault();\n this.activate(points[Math.min(Math.max(target, 0), points.length - 1)]);\n }\n\n protected clearActive(): void {\n this.activePoint.set(null);\n this.tooltipOrigin.set(null);\n }\n\n private activate(point: SparklinePoint): void {\n if (point === this.activePoint()) {\n return;\n }\n const box = this.canvas().nativeElement.getBoundingClientRect();\n this.activePoint.set(point);\n this.tooltipOrigin.set({\n x: box.left + (point.x / 100) * box.width,\n y: box.top + (point.y / 100) * box.height,\n });\n }\n}\n","<svg\n #canvas\n class=\"sparkline\"\n aria-hidden=\"true\"\n [dsChartTooltip]=\"tooltipContext()\"\n [dsChartTooltipOrigin]=\"tooltipOrigin()\"\n (pointermove)=\"onPointerMove($event)\"\n (pointerleave)=\"clearActive()\">\n <svg\n viewBox=\"0 0 100 100\"\n preserveAspectRatio=\"none\"\n width=\"100%\"\n height=\"100%\"\n overflow=\"visible\">\n @if (area()) {\n <path\n class=\"area\"\n [attr.d]=\"geometry().areaPath\" />\n }\n\n <path\n class=\"line\"\n [attr.d]=\"geometry().path\" />\n </svg>\n\n @if (shownPoint(); as point) {\n <circle\n class=\"dot\"\n [attr.cx]=\"point.x + '%'\"\n [attr.cy]=\"point.y + '%'\" />\n }\n</svg>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;AAgBA;AAC8F;AACxF,SAAU,iBAAiB,CAC/B,IAAgC,EAChC,KAAqB,EAAA;IAErB,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CACxB,CAAC,KAAK,KAAsB,KAAK,KAAK,IAAI,IAAI,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,CACrE;AACD,IAAA,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE;AACvB,QAAA,OAAO,EAAE,IAAI,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE;IAC/C;IACA,MAAM,KAAK,GAAG,KAAK,KAAK,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,GAAG,MAAM,CAAC,GAAG,I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wBAAA,iBAAiB,EAAE,wBAAwB;AAC3C,wBAAA,SAAS,EAAE,WAAW;AACtB,wBAAA,QAAQ,EAAE,eAAe;AACzB,wBAAA,WAAW,EAAE,mBAAmB;AACjC,qBAAA,EAAA,aAAA,EACc,iBAAiB,CAAC,QAAQ,EAAA,eAAA,EACxB,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,itBAAA,EAAA,MAAA,EAAA,CAAA,wwCAAA,CAAA,EAAA;gtBA6BC,QAAQ,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AErE1D;;AAEG;;;;"}
@@ -47,14 +47,14 @@ class SplitButtonComponent {
47
47
  }
48
48
  }
49
49
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: SplitButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
50
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: SplitButtonComponent, isStandalone: true, selector: "ds-split-button", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, menuItems: { classPropertyName: "menuItems", publicName: "menuItems", isSignal: true, isRequired: false, transformFunction: null }, menuLabel: { classPropertyName: "menuLabel", publicName: "menuLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { pressed: "pressed", itemSelected: "itemSelected" }, host: { properties: { "class.primary": "variant() === 'primary'", "class.outline": "variant() === 'outline'" } }, ngImport: i0, template: "<button\n type=\"button\"\n class=\"main\"\n [disabled]=\"disabled()\"\n (click)=\"pressed.emit($event)\">\n @if (icon(); as name) {\n <ds-icon\n [name]=\"name\"\n [size]=\"18\" />\n }\n\n @if (label()) {\n <span class=\"label\">\n {{ label() }}\n </span>\n }\n\n <ng-content></ng-content>\n</button>\n\n<button\n #trigger\n type=\"button\"\n class=\"toggle\"\n aria-haspopup=\"menu\"\n [class.open]=\"pop.opened()\"\n [attr.aria-expanded]=\"pop.opened()\"\n [attr.aria-label]=\"menuLabelResolved()\"\n [disabled]=\"disabled() || !menuItems().length\"\n (click)=\"pop.toggle(trigger)\"\n (keydown)=\"onTriggerKeydown($event, pop, trigger)\">\n <ds-icon\n class=\"chevron\"\n name=\"chevronDown\"\n [size]=\"18\" />\n</button>\n\n<ds-popover\n #pop\n align=\"end\"\n panelRole=\"presentation\">\n <ds-menu>\n @for (item of menuItems(); track item) {\n <ds-menu-item\n [icon]=\"item.icon ?? null\"\n [disabled]=\"item.disabled ?? false\"\n [error]=\"item.error ?? false\"\n (pressed)=\"onItemSelect(item)\">\n {{ item.label }}\n </ds-menu-item>\n }\n </ds-menu>\n</ds-popover>\n", styles: [":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{display:inline-flex;--_split-button-bg-color: var(--ds-split-button-bg-color, var(--accent));--_split-button-text-color: var(--ds-split-button-text-color, var(--accent-on));--_split-button-bg-color-hover: var(--ds-split-button-bg-color-hover, var(--accent-hover));--_split-button-divider-color: var(--ds-split-button-divider-color, var(--btn-split-divider));--_split-button-outline-bg-color: var(--ds-split-button-outline-bg-color, transparent);--_split-button-outline-border-color: var(--ds-split-button-outline-border-color, var(--border-default));--_split-button-bg-color-active: var(--ds-split-button-bg-color-active, color-mix(in srgb, var(--_split-button-bg-color) 76%, black));--_split-button-outline-bg-color-active: var(--ds-split-button-outline-bg-color-active, var(--surface-muted));--_split-button-press-scale: var(--ds-split-button-press-scale, .98);--_split-button-pressed-shadow: var(--ds-split-button-pressed-shadow, none)}.main,.toggle{display:inline-flex;align-items:center;justify-content:center;gap:var(--space-2);--_field-height: var(--ds-field-height, var(--field-h-md));height:var(--_field-height);border:var(--border-width-default) solid transparent;background:transparent;font:var(--font-weight-semibold) var(--font-size-s)/var(--line-height-flat) var(--font-sans);cursor:pointer;position:relative;transition:background-color var(--duration-fast) var(--ease-standard),border-color var(--duration-fast) var(--ease-standard),transform var(--duration-instant) var(--ease-standard)}.main:active:not(:disabled),.toggle:active:not(:disabled){box-shadow:var(--_split-button-pressed-shadow);transform:scale(var(--_split-button-press-scale))}.main:focus-visible,.toggle: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);z-index:var(--btn-group-focus-z)}.main:disabled,.toggle:disabled{background:var(--surface-muted);border-color:var(--border-divider);color:var(--text-disabled);cursor:not-allowed}.main{padding:0 var(--space-4);border-top-left-radius:var(--radius-md);border-bottom-left-radius:var(--radius-md);transform-origin:right center}.toggle{padding:0 var(--space-2);margin-left:var(--btn-group-overlap);border-top-right-radius:var(--radius-md);border-bottom-right-radius:var(--radius-md);transform-origin:left center}.chevron{transition:transform var(--duration-fast) var(--ease-standard)}.toggle.open .chevron{transform:rotate(180deg)}:host(.primary) .main:not(:disabled),:host(.primary) .toggle:not(:disabled){background:var(--_split-button-bg-color);color:var(--_split-button-text-color)}:host(.primary) .main:not(:disabled):hover,:host(.primary) .toggle:not(:disabled):hover{background:var(--_split-button-bg-color-hover)}:host(.primary) .main:not(:disabled):active,:host(.primary) .toggle:not(:disabled):active{background:var(--_split-button-bg-color-active)}:host(.primary) .toggle:not(:disabled){border-left:var(--border-width-default) solid var(--_split-button-divider-color)}:host(.outline) .main:not(:disabled),:host(.outline) .toggle:not(:disabled){background:var(--_split-button-outline-bg-color);border-color:var(--_split-button-outline-border-color);color:var(--text-primary)}:host(.outline) .main:not(:disabled):hover,:host(.outline) .toggle:not(:disabled):hover{background:var(--surface-secondary)}:host(.outline) .main:not(:disabled):active,:host(.outline) .toggle:not(:disabled):active{background:var(--_split-button-outline-bg-color-active)}\n"], dependencies: [{ kind: "component", type: IconComponent, selector: "ds-icon", inputs: ["name", "size", "stroke", "ariaLabel"] }, { kind: "component", type: MenuComponent, selector: "ds-menu" }, { kind: "component", type: MenuItemComponent, selector: "ds-menu-item", inputs: ["icon", "disabled", "error", "quiet", "description", "submenu"], outputs: ["pressed"] }, { kind: "component", type: PopoverComponent, selector: "ds-popover", inputs: ["align", "placement", "arrow", "panelRole", "panelLabel"] }] });
50
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: SplitButtonComponent, isStandalone: true, selector: "ds-split-button", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, menuItems: { classPropertyName: "menuItems", publicName: "menuItems", isSignal: true, isRequired: false, transformFunction: null }, menuLabel: { classPropertyName: "menuLabel", publicName: "menuLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { pressed: "pressed", itemSelected: "itemSelected" }, host: { properties: { "class.primary": "variant() === 'primary'", "class.outline": "variant() === 'outline'" } }, ngImport: i0, template: "<button\n type=\"button\"\n class=\"main\"\n [disabled]=\"disabled()\"\n (click)=\"pressed.emit($event)\">\n @if (icon(); as name) {\n <ds-icon\n [name]=\"name\"\n [size]=\"18\" />\n }\n\n @if (label()) {\n <span class=\"label\">\n {{ label() }}\n </span>\n }\n\n <ng-content></ng-content>\n</button>\n\n<button\n #trigger\n type=\"button\"\n class=\"toggle\"\n aria-haspopup=\"menu\"\n [class.open]=\"pop.opened()\"\n [attr.aria-expanded]=\"pop.opened()\"\n [attr.aria-label]=\"menuLabelResolved()\"\n [disabled]=\"disabled() || !menuItems().length\"\n (click)=\"pop.toggle(trigger)\"\n (keydown)=\"onTriggerKeydown($event, pop, trigger)\">\n <ds-icon\n class=\"chevron\"\n name=\"chevronDown\"\n [size]=\"18\" />\n</button>\n\n<ds-popover\n #pop\n align=\"end\"\n panelRole=\"presentation\">\n <ds-menu>\n @for (item of menuItems(); track item) {\n <ds-menu-item\n [icon]=\"item.icon ?? null\"\n [disabled]=\"item.disabled ?? false\"\n [error]=\"item.error ?? false\"\n (pressed)=\"onItemSelect(item)\">\n {{ item.label }}\n </ds-menu-item>\n }\n </ds-menu>\n</ds-popover>\n", styles: [":host{display:inline-flex;--_split-button-bg-color: var(--ds-split-button-bg-color, var(--accent));--_split-button-text-color: var(--ds-split-button-text-color, var(--accent-on));--_split-button-bg-color-hover: var(--ds-split-button-bg-color-hover, var(--accent-hover));--_split-button-divider-color: var(--ds-split-button-divider-color, var(--btn-split-divider));--_split-button-outline-bg-color: var(--ds-split-button-outline-bg-color, transparent);--_split-button-outline-border-color: var(--ds-split-button-outline-border-color, var(--border-default));--_split-button-bg-color-active: var(--ds-split-button-bg-color-active, color-mix(in srgb, var(--_split-button-bg-color) 76%, black));--_split-button-outline-bg-color-active: var(--ds-split-button-outline-bg-color-active, var(--surface-muted));--_split-button-press-scale: var(--ds-split-button-press-scale, .98);--_split-button-pressed-shadow: var(--ds-split-button-pressed-shadow, none)}.main,.toggle{display:inline-flex;align-items:center;justify-content:center;gap:var(--space-2);--_field-height: var(--ds-field-height, var(--field-h-md));height:var(--_field-height);border:var(--border-width-default) solid transparent;background:transparent;font:var(--font-weight-semibold) var(--font-size-s)/var(--line-height-flat) var(--font-sans);cursor:pointer;position:relative;transition:background-color var(--duration-fast) var(--ease-standard),border-color var(--duration-fast) var(--ease-standard),transform var(--duration-instant) var(--ease-standard)}.main:active:not(:disabled),.toggle:active:not(:disabled){box-shadow:var(--_split-button-pressed-shadow);transform:scale(var(--_split-button-press-scale))}.main:focus-visible,.toggle: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);z-index:var(--btn-group-focus-z)}.main:disabled,.toggle:disabled{background:var(--surface-muted);border-color:var(--border-divider);color:var(--text-disabled);cursor:not-allowed}.main{padding:0 var(--space-4);border-top-left-radius:var(--radius-md);border-bottom-left-radius:var(--radius-md);transform-origin:right center}.toggle{padding:0 var(--space-2);margin-left:var(--btn-group-overlap);border-top-right-radius:var(--radius-md);border-bottom-right-radius:var(--radius-md);transform-origin:left center}.chevron{transition:transform var(--duration-fast) var(--ease-standard)}.toggle.open .chevron{transform:rotate(180deg)}:host(.primary) .main:not(:disabled),:host(.primary) .toggle:not(:disabled){background:var(--_split-button-bg-color);color:var(--_split-button-text-color)}:host(.primary) .main:not(:disabled):hover,:host(.primary) .toggle:not(:disabled):hover{background:var(--_split-button-bg-color-hover)}:host(.primary) .main:not(:disabled):active,:host(.primary) .toggle:not(:disabled):active{background:var(--_split-button-bg-color-active)}:host(.primary) .toggle:not(:disabled){border-left:var(--border-width-default) solid var(--_split-button-divider-color)}:host(.outline) .main:not(:disabled),:host(.outline) .toggle:not(:disabled){background:var(--_split-button-outline-bg-color);border-color:var(--_split-button-outline-border-color);color:var(--text-primary)}:host(.outline) .main:not(:disabled):hover,:host(.outline) .toggle:not(:disabled):hover{background:var(--surface-secondary)}:host(.outline) .main:not(:disabled):active,:host(.outline) .toggle:not(:disabled):active{background:var(--_split-button-outline-bg-color-active)}\n"], dependencies: [{ kind: "component", type: IconComponent, selector: "ds-icon", inputs: ["name", "size", "stroke", "ariaLabel"] }, { kind: "component", type: MenuComponent, selector: "ds-menu" }, { kind: "component", type: MenuItemComponent, selector: "ds-menu-item", inputs: ["icon", "disabled", "error", "quiet", "description", "submenu"], outputs: ["pressed"] }, { kind: "component", type: PopoverComponent, selector: "ds-popover", inputs: ["align", "placement", "arrow", "panelRole", "panelLabel"] }] });
51
51
  }
52
52
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: SplitButtonComponent, decorators: [{
53
53
  type: Component,
54
54
  args: [{ selector: 'ds-split-button', standalone: true, imports: [IconComponent, MenuComponent, MenuItemComponent, PopoverComponent], encapsulation: ViewEncapsulation.Emulated, host: {
55
55
  '[class.primary]': "variant() === 'primary'",
56
56
  '[class.outline]': "variant() === 'outline'",
57
- }, template: "<button\n type=\"button\"\n class=\"main\"\n [disabled]=\"disabled()\"\n (click)=\"pressed.emit($event)\">\n @if (icon(); as name) {\n <ds-icon\n [name]=\"name\"\n [size]=\"18\" />\n }\n\n @if (label()) {\n <span class=\"label\">\n {{ label() }}\n </span>\n }\n\n <ng-content></ng-content>\n</button>\n\n<button\n #trigger\n type=\"button\"\n class=\"toggle\"\n aria-haspopup=\"menu\"\n [class.open]=\"pop.opened()\"\n [attr.aria-expanded]=\"pop.opened()\"\n [attr.aria-label]=\"menuLabelResolved()\"\n [disabled]=\"disabled() || !menuItems().length\"\n (click)=\"pop.toggle(trigger)\"\n (keydown)=\"onTriggerKeydown($event, pop, trigger)\">\n <ds-icon\n class=\"chevron\"\n name=\"chevronDown\"\n [size]=\"18\" />\n</button>\n\n<ds-popover\n #pop\n align=\"end\"\n panelRole=\"presentation\">\n <ds-menu>\n @for (item of menuItems(); track item) {\n <ds-menu-item\n [icon]=\"item.icon ?? null\"\n [disabled]=\"item.disabled ?? false\"\n [error]=\"item.error ?? false\"\n (pressed)=\"onItemSelect(item)\">\n {{ item.label }}\n </ds-menu-item>\n }\n </ds-menu>\n</ds-popover>\n", styles: [":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{display:inline-flex;--_split-button-bg-color: var(--ds-split-button-bg-color, var(--accent));--_split-button-text-color: var(--ds-split-button-text-color, var(--accent-on));--_split-button-bg-color-hover: var(--ds-split-button-bg-color-hover, var(--accent-hover));--_split-button-divider-color: var(--ds-split-button-divider-color, var(--btn-split-divider));--_split-button-outline-bg-color: var(--ds-split-button-outline-bg-color, transparent);--_split-button-outline-border-color: var(--ds-split-button-outline-border-color, var(--border-default));--_split-button-bg-color-active: var(--ds-split-button-bg-color-active, color-mix(in srgb, var(--_split-button-bg-color) 76%, black));--_split-button-outline-bg-color-active: var(--ds-split-button-outline-bg-color-active, var(--surface-muted));--_split-button-press-scale: var(--ds-split-button-press-scale, .98);--_split-button-pressed-shadow: var(--ds-split-button-pressed-shadow, none)}.main,.toggle{display:inline-flex;align-items:center;justify-content:center;gap:var(--space-2);--_field-height: var(--ds-field-height, var(--field-h-md));height:var(--_field-height);border:var(--border-width-default) solid transparent;background:transparent;font:var(--font-weight-semibold) var(--font-size-s)/var(--line-height-flat) var(--font-sans);cursor:pointer;position:relative;transition:background-color var(--duration-fast) var(--ease-standard),border-color var(--duration-fast) var(--ease-standard),transform var(--duration-instant) var(--ease-standard)}.main:active:not(:disabled),.toggle:active:not(:disabled){box-shadow:var(--_split-button-pressed-shadow);transform:scale(var(--_split-button-press-scale))}.main:focus-visible,.toggle: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);z-index:var(--btn-group-focus-z)}.main:disabled,.toggle:disabled{background:var(--surface-muted);border-color:var(--border-divider);color:var(--text-disabled);cursor:not-allowed}.main{padding:0 var(--space-4);border-top-left-radius:var(--radius-md);border-bottom-left-radius:var(--radius-md);transform-origin:right center}.toggle{padding:0 var(--space-2);margin-left:var(--btn-group-overlap);border-top-right-radius:var(--radius-md);border-bottom-right-radius:var(--radius-md);transform-origin:left center}.chevron{transition:transform var(--duration-fast) var(--ease-standard)}.toggle.open .chevron{transform:rotate(180deg)}:host(.primary) .main:not(:disabled),:host(.primary) .toggle:not(:disabled){background:var(--_split-button-bg-color);color:var(--_split-button-text-color)}:host(.primary) .main:not(:disabled):hover,:host(.primary) .toggle:not(:disabled):hover{background:var(--_split-button-bg-color-hover)}:host(.primary) .main:not(:disabled):active,:host(.primary) .toggle:not(:disabled):active{background:var(--_split-button-bg-color-active)}:host(.primary) .toggle:not(:disabled){border-left:var(--border-width-default) solid var(--_split-button-divider-color)}:host(.outline) .main:not(:disabled),:host(.outline) .toggle:not(:disabled){background:var(--_split-button-outline-bg-color);border-color:var(--_split-button-outline-border-color);color:var(--text-primary)}:host(.outline) .main:not(:disabled):hover,:host(.outline) .toggle:not(:disabled):hover{background:var(--surface-secondary)}:host(.outline) .main:not(:disabled):active,:host(.outline) .toggle:not(:disabled):active{background:var(--_split-button-outline-bg-color-active)}\n"] }]
57
+ }, template: "<button\n type=\"button\"\n class=\"main\"\n [disabled]=\"disabled()\"\n (click)=\"pressed.emit($event)\">\n @if (icon(); as name) {\n <ds-icon\n [name]=\"name\"\n [size]=\"18\" />\n }\n\n @if (label()) {\n <span class=\"label\">\n {{ label() }}\n </span>\n }\n\n <ng-content></ng-content>\n</button>\n\n<button\n #trigger\n type=\"button\"\n class=\"toggle\"\n aria-haspopup=\"menu\"\n [class.open]=\"pop.opened()\"\n [attr.aria-expanded]=\"pop.opened()\"\n [attr.aria-label]=\"menuLabelResolved()\"\n [disabled]=\"disabled() || !menuItems().length\"\n (click)=\"pop.toggle(trigger)\"\n (keydown)=\"onTriggerKeydown($event, pop, trigger)\">\n <ds-icon\n class=\"chevron\"\n name=\"chevronDown\"\n [size]=\"18\" />\n</button>\n\n<ds-popover\n #pop\n align=\"end\"\n panelRole=\"presentation\">\n <ds-menu>\n @for (item of menuItems(); track item) {\n <ds-menu-item\n [icon]=\"item.icon ?? null\"\n [disabled]=\"item.disabled ?? false\"\n [error]=\"item.error ?? false\"\n (pressed)=\"onItemSelect(item)\">\n {{ item.label }}\n </ds-menu-item>\n }\n </ds-menu>\n</ds-popover>\n", styles: [":host{display:inline-flex;--_split-button-bg-color: var(--ds-split-button-bg-color, var(--accent));--_split-button-text-color: var(--ds-split-button-text-color, var(--accent-on));--_split-button-bg-color-hover: var(--ds-split-button-bg-color-hover, var(--accent-hover));--_split-button-divider-color: var(--ds-split-button-divider-color, var(--btn-split-divider));--_split-button-outline-bg-color: var(--ds-split-button-outline-bg-color, transparent);--_split-button-outline-border-color: var(--ds-split-button-outline-border-color, var(--border-default));--_split-button-bg-color-active: var(--ds-split-button-bg-color-active, color-mix(in srgb, var(--_split-button-bg-color) 76%, black));--_split-button-outline-bg-color-active: var(--ds-split-button-outline-bg-color-active, var(--surface-muted));--_split-button-press-scale: var(--ds-split-button-press-scale, .98);--_split-button-pressed-shadow: var(--ds-split-button-pressed-shadow, none)}.main,.toggle{display:inline-flex;align-items:center;justify-content:center;gap:var(--space-2);--_field-height: var(--ds-field-height, var(--field-h-md));height:var(--_field-height);border:var(--border-width-default) solid transparent;background:transparent;font:var(--font-weight-semibold) var(--font-size-s)/var(--line-height-flat) var(--font-sans);cursor:pointer;position:relative;transition:background-color var(--duration-fast) var(--ease-standard),border-color var(--duration-fast) var(--ease-standard),transform var(--duration-instant) var(--ease-standard)}.main:active:not(:disabled),.toggle:active:not(:disabled){box-shadow:var(--_split-button-pressed-shadow);transform:scale(var(--_split-button-press-scale))}.main:focus-visible,.toggle: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);z-index:var(--btn-group-focus-z)}.main:disabled,.toggle:disabled{background:var(--surface-muted);border-color:var(--border-divider);color:var(--text-disabled);cursor:not-allowed}.main{padding:0 var(--space-4);border-top-left-radius:var(--radius-md);border-bottom-left-radius:var(--radius-md);transform-origin:right center}.toggle{padding:0 var(--space-2);margin-left:var(--btn-group-overlap);border-top-right-radius:var(--radius-md);border-bottom-right-radius:var(--radius-md);transform-origin:left center}.chevron{transition:transform var(--duration-fast) var(--ease-standard)}.toggle.open .chevron{transform:rotate(180deg)}:host(.primary) .main:not(:disabled),:host(.primary) .toggle:not(:disabled){background:var(--_split-button-bg-color);color:var(--_split-button-text-color)}:host(.primary) .main:not(:disabled):hover,:host(.primary) .toggle:not(:disabled):hover{background:var(--_split-button-bg-color-hover)}:host(.primary) .main:not(:disabled):active,:host(.primary) .toggle:not(:disabled):active{background:var(--_split-button-bg-color-active)}:host(.primary) .toggle:not(:disabled){border-left:var(--border-width-default) solid var(--_split-button-divider-color)}:host(.outline) .main:not(:disabled),:host(.outline) .toggle:not(:disabled){background:var(--_split-button-outline-bg-color);border-color:var(--_split-button-outline-border-color);color:var(--text-primary)}:host(.outline) .main:not(:disabled):hover,:host(.outline) .toggle:not(:disabled):hover{background:var(--surface-secondary)}:host(.outline) .main:not(:disabled):active,:host(.outline) .toggle:not(:disabled):active{background:var(--_split-button-outline-bg-color-active)}\n"] }]
58
58
  }], ctorParameters: () => [], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], menuItems: [{ type: i0.Input, args: [{ isSignal: true, alias: "menuItems", required: false }] }], menuLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "menuLabel", required: false }] }], pressed: [{ type: i0.Output, args: ["pressed"] }], itemSelected: [{ type: i0.Output, args: ["itemSelected"] }] } });
59
59
 
60
60
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"ids-group-ltd-ids-design-system-components-split-button.mjs","sources":["../../../src/lib/components/split-button/split-button.component.ts","../../../src/lib/components/split-button/split-button.component.html","../../../src/lib/components/split-button/ids-group-ltd-ids-design-system-components-split-button.ts"],"sourcesContent":["import {\n Component,\n ViewEncapsulation,\n booleanAttribute,\n computed,\n inject,\n input,\n output,\n} from '@angular/core';\nimport { IconComponent } from '@ids-group-ltd/ids-design-system/icons';\nimport { DS_INTL, devWarn } from '@ids-group-ltd/ids-design-system/core';\nimport type { IconName } from '@ids-group-ltd/ids-design-system/core';\nimport { MenuComponent } from '@ids-group-ltd/ids-design-system/components/menu';\nimport { MenuItemComponent } from '@ids-group-ltd/ids-design-system/components/menu';\nimport { PopoverComponent } from '@ids-group-ltd/ids-design-system/components/popover';\nimport type { SplitButtonItem, SplitButtonVariant } from './split-button.types';\n\n@Component({\n selector: 'ds-split-button',\n standalone: true,\n imports: [IconComponent, MenuComponent, MenuItemComponent, PopoverComponent],\n templateUrl: './split-button.component.html',\n styleUrl: './split-button.component.scss',\n encapsulation: ViewEncapsulation.Emulated,\n host: {\n '[class.primary]': \"variant() === 'primary'\",\n '[class.outline]': \"variant() === 'outline'\",\n },\n})\nexport class SplitButtonComponent {\n private readonly intl = inject(DS_INTL);\n\n constructor() {\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n devWarn(() =>\n this.menuItems().length\n ? null\n : '[ds-split-button] has no `menuItems`, so the chevron is disabled — a chevron that opens' +\n ' nothing reads as a broken control. Pass the items, or use `ds-button` for a single' +\n ' action.',\n );\n }\n }\n\n /** Label text on the main button. */\n readonly label = input<string>('');\n /** Visual style - primary (solid) or outline. */\n readonly variant = input<SplitButtonVariant>('primary');\n /** Icon before the label on the main button. */\n readonly icon = input<IconName | null>(null);\n /** Disables the main button and the dropdown trigger. */\n readonly disabled = input(false, { transform: booleanAttribute });\n /** Items listed in the dropdown menu. Empty disables the chevron. */\n readonly menuItems = input<readonly SplitButtonItem[]>([]);\n /** Accessible name of the dropdown trigger. Unset falls back to `DS_INTL.splitButton.menuLabel`. */\n readonly menuLabel = input<string | null>(null);\n protected readonly menuLabelResolved = computed(\n () => this.menuLabel() ?? this.intl().splitButton.menuLabel,\n );\n /** Fires on a click of the main button, not the dropdown trigger. */\n readonly pressed = output<MouseEvent>();\n /** Fires for a menu item only; the main button emits `pressed`. */\n readonly itemSelected = output<SplitButtonItem>();\n\n protected onItemSelect(item: SplitButtonItem): void {\n if (item.disabled) {\n return;\n }\n // ds-menu-item closes the popover itself via the injected DsOverlayCloseRef.\n this.itemSelected.emit(item);\n }\n\n protected onTriggerKeydown(\n event: KeyboardEvent,\n popover: PopoverComponent,\n trigger: HTMLElement,\n ): void {\n if (event.key === 'ArrowDown' && !popover.opened()) {\n event.preventDefault();\n popover.toggle(trigger);\n }\n }\n}\n","<button\n type=\"button\"\n class=\"main\"\n [disabled]=\"disabled()\"\n (click)=\"pressed.emit($event)\">\n @if (icon(); as name) {\n <ds-icon\n [name]=\"name\"\n [size]=\"18\" />\n }\n\n @if (label()) {\n <span class=\"label\">\n {{ label() }}\n </span>\n }\n\n <ng-content></ng-content>\n</button>\n\n<button\n #trigger\n type=\"button\"\n class=\"toggle\"\n aria-haspopup=\"menu\"\n [class.open]=\"pop.opened()\"\n [attr.aria-expanded]=\"pop.opened()\"\n [attr.aria-label]=\"menuLabelResolved()\"\n [disabled]=\"disabled() || !menuItems().length\"\n (click)=\"pop.toggle(trigger)\"\n (keydown)=\"onTriggerKeydown($event, pop, trigger)\">\n <ds-icon\n class=\"chevron\"\n name=\"chevronDown\"\n [size]=\"18\" />\n</button>\n\n<ds-popover\n #pop\n align=\"end\"\n panelRole=\"presentation\">\n <ds-menu>\n @for (item of menuItems(); track item) {\n <ds-menu-item\n [icon]=\"item.icon ?? null\"\n [disabled]=\"item.disabled ?? false\"\n [error]=\"item.error ?? false\"\n (pressed)=\"onItemSelect(item)\">\n {{ item.label }}\n </ds-menu-item>\n }\n </ds-menu>\n</ds-popover>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;MA6Ba,oBAAoB,CAAA;AACd,IAAA,IAAI,GAAG,MAAM,CAAC,OAAO,CAAC;AAEvC,IAAA,WAAA,GAAA;AACE,QAAA,IAAI,OAAO,SAAS,KAAK,WAAW,IAAI,SAAS,EAAE;YACjD,OAAO,CAAC,MACN,IAAI,CAAC,SAAS,EAAE,CAAC;AACf,kBAAE;AACF,kBAAE,yFAAyF;oBACzF,qFAAqF;AACrF,oBAAA,UAAU,CACf;QACH;IACF;;AAGS,IAAA,KAAK,GAAG,KAAK,CAAS,EAAE,4EAAC;;AAEzB,IAAA,OAAO,GAAG,KAAK,CAAqB,SAAS,8EAAC;;AAE9C,IAAA,IAAI,GAAG,KAAK,CAAkB,IAAI,2EAAC;;IAEnC,QAAQ,GAAG,KAAK,CAAC,KAAK,gFAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;;AAExD,IAAA,SAAS,GAAG,KAAK,CAA6B,EAAE,gFAAC;;AAEjD,IAAA,SAAS,GAAG,KAAK,CAAgB,IAAI,gFAAC;IAC5B,iBAAiB,GAAG,QAAQ,CAC7C,MAAM,IAAI,CAAC,SAAS,EAAE,I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,EAAA,CAAA,EAAA,QAAA,EAAA,iBAAiB,cACf,IAAI,EAAA,OAAA,EACP,CAAC,aAAa,EAAE,aAAa,EAAE,iBAAiB,EAAE,gBAAgB,CAAC,EAAA,aAAA,EAG7D,iBAAiB,CAAC,QAAQ,EAAA,IAAA,EACnC;AACJ,wBAAA,iBAAiB,EAAE,yBAAyB;AAC5C,wBAAA,iBAAiB,EAAE,yBAAyB;AAC7C,qBAAA,EAAA,QAAA,EAAA,mqCAAA,EAAA,MAAA,EAAA,CAAA,80IAAA,CAAA,EAAA;;;AE3BH;;AAEG;;;;"}
1
+ {"version":3,"file":"ids-group-ltd-ids-design-system-components-split-button.mjs","sources":["../../../src/lib/components/split-button/split-button.component.ts","../../../src/lib/components/split-button/split-button.component.html","../../../src/lib/components/split-button/ids-group-ltd-ids-design-system-components-split-button.ts"],"sourcesContent":["import {\n Component,\n ViewEncapsulation,\n booleanAttribute,\n computed,\n inject,\n input,\n output,\n} from '@angular/core';\nimport { IconComponent } from '@ids-group-ltd/ids-design-system/icons';\nimport { DS_INTL, devWarn } from '@ids-group-ltd/ids-design-system/core';\nimport type { IconName } from '@ids-group-ltd/ids-design-system/core';\nimport { MenuComponent } from '@ids-group-ltd/ids-design-system/components/menu';\nimport { MenuItemComponent } from '@ids-group-ltd/ids-design-system/components/menu';\nimport { PopoverComponent } from '@ids-group-ltd/ids-design-system/components/popover';\nimport type { SplitButtonItem, SplitButtonVariant } from './split-button.types';\n\n@Component({\n selector: 'ds-split-button',\n standalone: true,\n imports: [IconComponent, MenuComponent, MenuItemComponent, PopoverComponent],\n templateUrl: './split-button.component.html',\n styleUrl: './split-button.component.scss',\n encapsulation: ViewEncapsulation.Emulated,\n host: {\n '[class.primary]': \"variant() === 'primary'\",\n '[class.outline]': \"variant() === 'outline'\",\n },\n})\nexport class SplitButtonComponent {\n private readonly intl = inject(DS_INTL);\n\n constructor() {\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n devWarn(() =>\n this.menuItems().length\n ? null\n : '[ds-split-button] has no `menuItems`, so the chevron is disabled — a chevron that opens' +\n ' nothing reads as a broken control. Pass the items, or use `ds-button` for a single' +\n ' action.',\n );\n }\n }\n\n /** Label text on the main button. */\n readonly label = input<string>('');\n /** Visual style - primary (solid) or outline. */\n readonly variant = input<SplitButtonVariant>('primary');\n /** Icon before the label on the main button. */\n readonly icon = input<IconName | null>(null);\n /** Disables the main button and the dropdown trigger. */\n readonly disabled = input(false, { transform: booleanAttribute });\n /** Items listed in the dropdown menu. Empty disables the chevron. */\n readonly menuItems = input<readonly SplitButtonItem[]>([]);\n /** Accessible name of the dropdown trigger. Unset falls back to `DS_INTL.splitButton.menuLabel`. */\n readonly menuLabel = input<string | null>(null);\n protected readonly menuLabelResolved = computed(\n () => this.menuLabel() ?? this.intl().splitButton.menuLabel,\n );\n /** Fires on a click of the main button, not the dropdown trigger. */\n readonly pressed = output<MouseEvent>();\n /** Fires for a menu item only; the main button emits `pressed`. */\n readonly itemSelected = output<SplitButtonItem>();\n\n protected onItemSelect(item: SplitButtonItem): void {\n if (item.disabled) {\n return;\n }\n // ds-menu-item closes the popover itself via the injected DsOverlayCloseRef.\n this.itemSelected.emit(item);\n }\n\n protected onTriggerKeydown(\n event: KeyboardEvent,\n popover: PopoverComponent,\n trigger: HTMLElement,\n ): void {\n if (event.key === 'ArrowDown' && !popover.opened()) {\n event.preventDefault();\n popover.toggle(trigger);\n }\n }\n}\n","<button\n type=\"button\"\n class=\"main\"\n [disabled]=\"disabled()\"\n (click)=\"pressed.emit($event)\">\n @if (icon(); as name) {\n <ds-icon\n [name]=\"name\"\n [size]=\"18\" />\n }\n\n @if (label()) {\n <span class=\"label\">\n {{ label() }}\n </span>\n }\n\n <ng-content></ng-content>\n</button>\n\n<button\n #trigger\n type=\"button\"\n class=\"toggle\"\n aria-haspopup=\"menu\"\n [class.open]=\"pop.opened()\"\n [attr.aria-expanded]=\"pop.opened()\"\n [attr.aria-label]=\"menuLabelResolved()\"\n [disabled]=\"disabled() || !menuItems().length\"\n (click)=\"pop.toggle(trigger)\"\n (keydown)=\"onTriggerKeydown($event, pop, trigger)\">\n <ds-icon\n class=\"chevron\"\n name=\"chevronDown\"\n [size]=\"18\" />\n</button>\n\n<ds-popover\n #pop\n align=\"end\"\n panelRole=\"presentation\">\n <ds-menu>\n @for (item of menuItems(); track item) {\n <ds-menu-item\n [icon]=\"item.icon ?? null\"\n [disabled]=\"item.disabled ?? false\"\n [error]=\"item.error ?? false\"\n (pressed)=\"onItemSelect(item)\">\n {{ item.label }}\n </ds-menu-item>\n }\n </ds-menu>\n</ds-popover>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;MA6Ba,oBAAoB,CAAA;AACd,IAAA,IAAI,GAAG,MAAM,CAAC,OAAO,CAAC;AAEvC,IAAA,WAAA,GAAA;AACE,QAAA,IAAI,OAAO,SAAS,KAAK,WAAW,IAAI,SAAS,EAAE;YACjD,OAAO,CAAC,MACN,IAAI,CAAC,SAAS,EAAE,CAAC;AACf,kBAAE;AACF,kBAAE,yFAAyF;oBACzF,qFAAqF;AACrF,oBAAA,UAAU,CACf;QACH;IACF;;AAGS,IAAA,KAAK,GAAG,KAAK,CAAS,EAAE,4EAAC;;AAEzB,IAAA,OAAO,GAAG,KAAK,CAAqB,SAAS,8EAAC;;AAE9C,IAAA,IAAI,GAAG,KAAK,CAAkB,IAAI,2EAAC;;IAEnC,QAAQ,GAAG,KAAK,CAAC,KAAK,gFAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;;AAExD,IAAA,SAAS,GAAG,KAAK,CAA6B,EAAE,gFAAC;;AAEjD,IAAA,SAAS,GAAG,KAAK,CAAgB,IAAI,gFAAC;IAC5B,iBAAiB,GAAG,QAAQ,CAC7C,MAAM,IAAI,CAAC,SAAS,EAAE,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC,WAAW,CAAC,SAAS,wFAC5D;;IAEQ,OAAO,GAAG,MAAM,EAAc;;IAE9B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