@forgeroute/ui 0.5.28 → 0.5.30

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 (40) hide show
  1. package/fesm2022/forgeroute-ui-calendar.mjs +103 -4
  2. package/fesm2022/forgeroute-ui-calendar.mjs.map +1 -1
  3. package/fesm2022/forgeroute-ui-card-list-item.mjs +165 -16
  4. package/fesm2022/forgeroute-ui-card-list-item.mjs.map +1 -1
  5. package/fesm2022/forgeroute-ui-contact-picker.mjs +2 -2
  6. package/fesm2022/forgeroute-ui-contact-picker.mjs.map +1 -1
  7. package/fesm2022/{forgeroute-ui-core-ui-labels.es-Dzvm992V.mjs → forgeroute-ui-core-ui-labels.es-BViJSCO-.mjs} +4 -1
  8. package/fesm2022/{forgeroute-ui-core-ui-labels.es-Dzvm992V.mjs.map → forgeroute-ui-core-ui-labels.es-BViJSCO-.mjs.map} +1 -1
  9. package/fesm2022/forgeroute-ui-core.mjs +38 -5
  10. package/fesm2022/forgeroute-ui-core.mjs.map +1 -1
  11. package/fesm2022/forgeroute-ui-data-table-core.mjs +59 -28
  12. package/fesm2022/forgeroute-ui-data-table-core.mjs.map +1 -1
  13. package/fesm2022/forgeroute-ui-icon.mjs +7 -6
  14. package/fesm2022/forgeroute-ui-icon.mjs.map +1 -1
  15. package/fesm2022/forgeroute-ui-kpi-card.mjs +2 -2
  16. package/fesm2022/forgeroute-ui-kpi-card.mjs.map +1 -1
  17. package/fesm2022/forgeroute-ui-notes.mjs +20 -22
  18. package/fesm2022/forgeroute-ui-notes.mjs.map +1 -1
  19. package/fesm2022/forgeroute-ui-panel-info-list.mjs +26 -4
  20. package/fesm2022/forgeroute-ui-panel-info-list.mjs.map +1 -1
  21. package/fesm2022/forgeroute-ui-payments.mjs +2 -1
  22. package/fesm2022/forgeroute-ui-payments.mjs.map +1 -1
  23. package/fesm2022/forgeroute-ui-setup.mjs +2 -1
  24. package/fesm2022/forgeroute-ui-setup.mjs.map +1 -1
  25. package/fesm2022/forgeroute-ui-stripe.mjs +78 -6
  26. package/fesm2022/forgeroute-ui-stripe.mjs.map +1 -1
  27. package/fesm2022/forgeroute-ui-table-types.mjs.map +1 -1
  28. package/package.json +1 -1
  29. package/types/forgeroute-ui-calendar.d.ts +28 -1
  30. package/types/forgeroute-ui-card-list-item.d.ts +32 -1
  31. package/types/forgeroute-ui-core.d.ts +13 -5
  32. package/types/forgeroute-ui-data-table-core.d.ts +10 -1
  33. package/types/forgeroute-ui-icon.d.ts +2 -0
  34. package/types/forgeroute-ui-messaging.d.ts +6 -5
  35. package/types/forgeroute-ui-panel-info-list.d.ts +11 -0
  36. package/types/forgeroute-ui-payments.d.ts +1 -1
  37. package/types/forgeroute-ui-quickbooks.d.ts +1 -1
  38. package/types/forgeroute-ui-square.d.ts +3 -3
  39. package/types/forgeroute-ui-stripe.d.ts +31 -1
  40. package/types/forgeroute-ui-table-types.d.ts +5 -0
@@ -68,6 +68,7 @@ var IconComponent = class IconComponent {
68
68
  this.interactive = input(true, ...ngDevMode ? [{ debugName: "interactive" }] : /* istanbul ignore next */ []);
69
69
  this.iconClick = output();
70
70
  this.accessibleName = computed(() => this.ariaLabel() || this.tooltip(), ...ngDevMode ? [{ debugName: "accessibleName" }] : /* istanbul ignore next */ []);
71
+ this.isCheck = computed(() => this.name() === "check", ...ngDevMode ? [{ debugName: "isCheck" }] : /* istanbul ignore next */ []);
71
72
  this.path = computed(() => iconPath(this.name()), ...ngDevMode ? [{ debugName: "path" }] : /* istanbul ignore next */ []);
72
73
  }
73
74
  onClick(event) {
@@ -153,13 +154,13 @@ var IconComponent = class IconComponent {
153
154
  ngImport: i0,
154
155
  template: `
155
156
  @if (interactive()) {
156
- <button type="button" class="icon-btn" [class.danger]="variant() === 'danger'"
157
+ <button type="button" class="icon-btn" [class.danger]="variant() === 'danger'" [class.check]="isCheck()"
157
158
  [class.loading]="loading()" [disabled]="disabled() || loading()" [attr.aria-busy]="loading() ? 'true' : null"
158
159
  [attr.aria-label]="accessibleName() || null" [uiTooltip]="tooltip()" (click)="onClick($event)">
159
160
  <ng-container *ngTemplateOutlet="glyph" />
160
161
  </button>
161
162
  } @else {
162
- <span class="icon-static" [class.danger]="variant() === 'danger'" [attr.aria-busy]="loading() ? 'true' : null"
163
+ <span class="icon-static" [class.danger]="variant() === 'danger'" [class.check]="isCheck()" [attr.aria-busy]="loading() ? 'true' : null"
163
164
  [attr.role]="accessibleName() ? 'img' : null" [attr.aria-label]="accessibleName() || null" [uiTooltip]="tooltip()" [attr.aria-hidden]="accessibleName() ? null : 'true'">
164
165
  <ng-container *ngTemplateOutlet="glyph" />
165
166
  </span>
@@ -176,7 +177,7 @@ var IconComponent = class IconComponent {
176
177
  </ng-template>
177
178
  `,
178
179
  isInline: true,
179
- styles: [":host{display:inline-flex}.icon-static{display:inline-flex;align-items:center;justify-content:center;color:inherit}.icon-static.danger{color:#b91c1c}.icon-static svg{display:block}.icon-btn{position:relative;display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;padding:0;border:none;border-radius:6px;background:transparent;color:#475569;cursor:pointer;-webkit-appearance:none;appearance:none;font:inherit;transition:background .15s ease,color .15s ease}.icon-btn:hover:not(:disabled){background:#f1f5f9;color:#0f172a}.icon-btn.danger{color:#b91c1c}.icon-btn.danger:hover:not(:disabled){background:#fef2f2;color:#991b1b}.icon-btn:focus-visible{outline:2px solid #2563eb;outline-offset:2px}.icon-btn:disabled{opacity:.5;cursor:not-allowed}.icon-btn.loading:disabled{opacity:1;cursor:progress}.spinner{display:block;box-sizing:border-box;border:2px solid rgba(100,116,139,.3);border-top-color:currentColor;border-radius:50%;animation:ui-icon-spin .6s linear infinite}@keyframes ui-icon-spin{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){.spinner{animation-duration:2s}}.icon-btn:after{content:\"\";position:absolute;inset:-8px}\n"],
180
+ styles: [":host{display:inline-flex}.icon-static{display:inline-flex;align-items:center;justify-content:center;color:inherit}.icon-static.danger{color:#b91c1c}.icon-static.check{color:#16a34a}.icon-static svg{display:block}.icon-btn{position:relative;display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;padding:0;border:none;border-radius:6px;background:transparent;color:#475569;cursor:pointer;-webkit-appearance:none;appearance:none;font:inherit;transition:background .15s ease,color .15s ease}.icon-btn:hover:not(:disabled){background:#f1f5f9;color:#0f172a}.icon-btn.check{color:#16a34a}.icon-btn.check:hover:not(:disabled){background:#f0fdf4;color:#15803d}.icon-btn.danger{color:#b91c1c}.icon-btn.danger:hover:not(:disabled){background:#fef2f2;color:#991b1b}.icon-btn:focus-visible{outline:2px solid #2563eb;outline-offset:2px}.icon-btn:disabled{opacity:.5;cursor:not-allowed}.icon-btn.loading:disabled{opacity:1;cursor:progress}.spinner{display:block;box-sizing:border-box;border:2px solid rgba(100,116,139,.3);border-top-color:currentColor;border-radius:50%;animation:ui-icon-spin .6s linear infinite}@keyframes ui-icon-spin{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){.spinner{animation-duration:2s}}.icon-btn:after{content:\"\";position:absolute;inset:-8px}\n"],
180
181
  dependencies: [{
181
182
  kind: "directive",
182
183
  type: NgTemplateOutlet,
@@ -210,13 +211,13 @@ i0.ɵɵngDeclareClassMetadata({
210
211
  changeDetection: ChangeDetectionStrategy.OnPush,
211
212
  template: `
212
213
  @if (interactive()) {
213
- <button type="button" class="icon-btn" [class.danger]="variant() === 'danger'"
214
+ <button type="button" class="icon-btn" [class.danger]="variant() === 'danger'" [class.check]="isCheck()"
214
215
  [class.loading]="loading()" [disabled]="disabled() || loading()" [attr.aria-busy]="loading() ? 'true' : null"
215
216
  [attr.aria-label]="accessibleName() || null" [uiTooltip]="tooltip()" (click)="onClick($event)">
216
217
  <ng-container *ngTemplateOutlet="glyph" />
217
218
  </button>
218
219
  } @else {
219
- <span class="icon-static" [class.danger]="variant() === 'danger'" [attr.aria-busy]="loading() ? 'true' : null"
220
+ <span class="icon-static" [class.danger]="variant() === 'danger'" [class.check]="isCheck()" [attr.aria-busy]="loading() ? 'true' : null"
220
221
  [attr.role]="accessibleName() ? 'img' : null" [attr.aria-label]="accessibleName() || null" [uiTooltip]="tooltip()" [attr.aria-hidden]="accessibleName() ? null : 'true'">
221
222
  <ng-container *ngTemplateOutlet="glyph" />
222
223
  </span>
@@ -232,7 +233,7 @@ i0.ɵɵngDeclareClassMetadata({
232
233
  }
233
234
  </ng-template>
234
235
  `,
235
- styles: [":host{display:inline-flex}.icon-static{display:inline-flex;align-items:center;justify-content:center;color:inherit}.icon-static.danger{color:#b91c1c}.icon-static svg{display:block}.icon-btn{position:relative;display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;padding:0;border:none;border-radius:6px;background:transparent;color:#475569;cursor:pointer;-webkit-appearance:none;appearance:none;font:inherit;transition:background .15s ease,color .15s ease}.icon-btn:hover:not(:disabled){background:#f1f5f9;color:#0f172a}.icon-btn.danger{color:#b91c1c}.icon-btn.danger:hover:not(:disabled){background:#fef2f2;color:#991b1b}.icon-btn:focus-visible{outline:2px solid #2563eb;outline-offset:2px}.icon-btn:disabled{opacity:.5;cursor:not-allowed}.icon-btn.loading:disabled{opacity:1;cursor:progress}.spinner{display:block;box-sizing:border-box;border:2px solid rgba(100,116,139,.3);border-top-color:currentColor;border-radius:50%;animation:ui-icon-spin .6s linear infinite}@keyframes ui-icon-spin{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){.spinner{animation-duration:2s}}.icon-btn:after{content:\"\";position:absolute;inset:-8px}\n"]
236
+ styles: [":host{display:inline-flex}.icon-static{display:inline-flex;align-items:center;justify-content:center;color:inherit}.icon-static.danger{color:#b91c1c}.icon-static.check{color:#16a34a}.icon-static svg{display:block}.icon-btn{position:relative;display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;padding:0;border:none;border-radius:6px;background:transparent;color:#475569;cursor:pointer;-webkit-appearance:none;appearance:none;font:inherit;transition:background .15s ease,color .15s ease}.icon-btn:hover:not(:disabled){background:#f1f5f9;color:#0f172a}.icon-btn.check{color:#16a34a}.icon-btn.check:hover:not(:disabled){background:#f0fdf4;color:#15803d}.icon-btn.danger{color:#b91c1c}.icon-btn.danger:hover:not(:disabled){background:#fef2f2;color:#991b1b}.icon-btn:focus-visible{outline:2px solid #2563eb;outline-offset:2px}.icon-btn:disabled{opacity:.5;cursor:not-allowed}.icon-btn.loading:disabled{opacity:1;cursor:progress}.spinner{display:block;box-sizing:border-box;border:2px solid rgba(100,116,139,.3);border-top-color:currentColor;border-radius:50%;animation:ui-icon-spin .6s linear infinite}@keyframes ui-icon-spin{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){.spinner{animation-duration:2s}}.icon-btn:after{content:\"\";position:absolute;inset:-8px}\n"]
236
237
  }]
237
238
  }],
238
239
  propDecorators: {
@@ -1 +1 @@
1
- {"version":3,"file":"forgeroute-ui-icon.mjs","names":[],"sources":["../../../projects/forgeroute-ui/icon/src/lib/icon/icon.component.ts"],"sourcesContent":["import { NgTemplateOutlet } from '@angular/common';\nimport { Component, ChangeDetectionStrategy, computed, input, output } from '@angular/core';\nimport { builtInActionIcon } from '@forgeroute/ui/more-menu';\nimport { TooltipDirective } from '@forgeroute/ui/tooltip';\n\n/** Icons drawn by `<ui-icon>` itself (the other row-action icons — view, edit, … — are reused from the data table). */\nconst EXTRA_ICONS: Record<string, string> = {\n // A fuller bin than the data table's row-action one: lid with handle, tapered body, two slats\n 'delete': 'M3 6h18 M8 6V4a1 1 0 0 1 1-1h6a1 1 0 0 1 1 1v2 M5 6l1 14a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2l1-14 M10 11v6 M14 11v6',\n 'add': 'M12 5v14 M5 12h14',\n 'close': 'M18 6L6 18 M6 6l12 12',\n 'check': 'M20 6L9 17l-5-5',\n 'upload': 'M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4 M17 8l-5-5-5 5 M12 3v12',\n 'image': 'M19 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V5a2 2 0 0 0-2-2z M8.5 8.5a1.5 1.5 0 1 0 0 3 1.5 1.5 0 0 0 0-3z M21 15l-5-5L5 21',\n 'chevron-up': 'M18 15l-6-6-6 6',\n 'chevron-down': 'M6 9l6 6 6-6',\n 'chevron-right': 'M9 18l6-6-6-6',\n 'arrow-left': 'M19 12H5 M12 19l-7-7 7-7',\n 'bell': 'M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9 M13.73 21a2 2 0 0 1-3.46 0',\n 'print': 'M6 9V2h12v7 M6 18H4a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-2 M6 14h12v8H6z',\n 'shield': 'M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z',\n 'lock': 'M5 11h14a2 2 0 0 1 2 2v7a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-7a2 2 0 0 1 2-2z M7 11V7a5 5 0 0 1 10 0v4',\n 'arrow-up': 'M12 19V5 M5 12l7-7 7 7',\n 'arrow-down': 'M12 5v14 M19 12l-7 7-7-7',\n 'arrow-right': 'M5 12h14 M12 5l7 7-7 7',\n 'document': 'M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z M14 2v6h6 M16 13H8 M16 17H8 M10 9H8',\n // Six dots (drag grip): zero-length segments, drawn as dots by the round line caps\n 'grip': 'M9 5h.01 M15 5h.01 M9 12h.01 M15 12h.01 M9 19h.01 M15 19h.01',\n 'card': 'M3 4h18a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2z M1 10h22',\n // The view (eye) icon with a diagonal slash: \"hidden\" / \"don't show\" (e.g. a password field's hide toggle)\n 'view-off': 'M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z M12 9a3 3 0 1 0 0 6 3 3 0 0 0 0-6z M3 3l18 18',\n // Undo-arrow (a refund / reverse): curved line back to the left with an arrowhead\n 'refund': 'M3 10h10a8 8 0 0 1 8 8v2 M3 10l6 6 M3 10l6-6',\n // Two interlocking chain links: a link / URL (copy link, share link)\n 'link': 'M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71 M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71',\n // Three vertical bars of different heights: a bar chart / comparison\n 'chart': 'M18 20V10 M12 20V4 M6 20v-6',\n // Clipboard with a clip at the top: copy to clipboard\n 'clipboard': 'M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2 M9 2h6a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1H9a1 1 0 0 1-1-1V3a1 1 0 0 1 1-1z',\n // Floppy disk: save\n 'save': 'M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2z M17 21v-8H7v8 M7 3v5h8',\n 'bank': 'M3 21h18 M3 10h18 M5 6l7-3 7 3 M4 10v11 M20 10v11 M8 14v3 M12 14v3 M16 14v3',\n // Two chain links pulled apart with a slash: disconnect / unlink an integration\n 'unlink': 'M18.84 12.25l1.72-1.71a5 5 0 0 0-7.07-7.07l-1.72 1.71 M5.17 11.75l-1.72 1.71a5 5 0 0 0 7.07 7.07l1.71-1.71 M3 3l18 18',\n // Paper plane: send / test-send\n 'send': 'M22 2L11 13 M22 2l-7 20-4-9-9-4 20-7z',\n // Two arrows chasing in a circle: refresh / sync / retry\n 'refresh': 'M23 4v6h-6 M1 20v-6h6 M3.51 9a9 9 0 0 1 14.85-3.36L23 10 M1 14l4.64 4.36A9 9 0 0 0 20.49 15',\n // library source 2026-11-04, not yet published:\n // Magnifying glass: search (e.g. the leading icon of a search field, `ui-text-input leadingIcon=\"search\"`)\n 'search': 'M11 3a8 8 0 1 0 0 16 8 8 0 0 0 0-16z M21 21l-4.35-4.35',\n // Cup with steam: food and drink (a product type)\n 'cup': 'M18 8h1a4 4 0 0 1 0 8h-1 M2 8h16v9a4 4 0 0 1-4 4H6a4 4 0 0 1-4-4V8z M6 1v3 M10 1v3 M14 1v3',\n // Banknote: a rounded note with a centre coin and two corner dots - cash (a payment method)\n 'cash': 'M3 6h18a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1z M12 9a3 3 0 1 0 0 6 3 3 0 0 0 0-6z M6 12h.01 M18 12h.01',\n // Dollar sign: a vertical bar through an S - money / price / amount\n 'dollar': 'M12 1v22 M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6',\n // Spanner: rentals and tools (a product type)\n 'wrench': 'M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z',\n // library source 2026-11-05, not yet published:\n // Five-point star: rating / favourite\n 'star': 'M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z',\n // Gift box with ribbon: a gift / reward / referral thank-you\n 'gift': 'M20 12v10H4V12 M2 7h20v5H2z M12 22V7 M12 7H7.5a2.5 2.5 0 0 1 0-5C11 2 12 7 12 7z M12 7h4.5a2.5 2.5 0 0 0 0-5C13 2 12 7 12 7z',\n // Medal with ribbon tails: an award / achievement\n 'award': 'M12 1a7 7 0 1 0 0 14 7 7 0 0 0 0-14z M8.21 13.89L7 23l5-3 5 3-1.21-9.12',\n // Calendar with a check mark: a confirmed date / booked appointment\n 'calendar-check': 'M19 4H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2z M16 2v4 M8 2v4 M3 10h18 M9 16l2 2 4-4',\n};\n\n/**\n * Icons added in 0.5.11 (a dashboard, a group of people, a gear, a person with a plus). They are drawn by `<ui-icon>`, `ui-option-card` and the setup wizard through `iconPath(key)`,\n * but are kept apart from `ICON_NAMES` / `IconName` (as published) and from the data-table action keys, so a row action named `settings` or `users` still gets the fallback arrow it always got.\n */\nconst MORE_ICONS: Record<string, string> = {\n // Four panels of different sizes: a dashboard / overview\n 'dashboard': 'M3 3h7v9H3z M14 3h7v5h-7z M14 12h7v9h-7z M3 16h7v5H3z',\n // Two people side by side: users / a team\n 'users': 'M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2 M9 3a4 4 0 1 0 0 8 4 4 0 0 0 0-8z M23 21v-2a4 4 0 0 0-3-3.87 M16 3.13a4 4 0 0 1 0 7.75',\n // A gear: settings\n 'settings': 'M12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6z M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z',\n // A person with a plus: invite / add a user\n 'user-plus': 'M16 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2 M8.5 3a4 4 0 1 0 0 8 4 4 0 0 0 0-8z M20 8v6 M23 11h-6',\n};\n\n/** The keys added in 0.5.11 (see `MORE_ICONS`): each resolves with `iconPath(key)`. */\nexport const MORE_ICON_NAMES: readonly string[] = Object.freeze(Object.keys(MORE_ICONS));\n\n/**\n * Every key `<ui-icon>` draws by itself (the data-table action keys such as `view` / `edit` / `call` are accepted too, see `builtInActionIcon`).\n * Each resolves with `iconPath(key)`. Includes `search`, `cup` (food / drink) and `wrench` (rental / tools), library source 2026-11-04, and `cash` (banknote) and `dollar` (payment methods / amounts), library source 2026-11-05, not yet published. Also `star`, `gift`, `award` and `calendar-check` (library source 2026-11-05, not yet published).\n */\nexport const ICON_NAMES: readonly string[] = Object.freeze(Object.keys(EXTRA_ICONS));\n\n/** The SVG path (24×24 stroke icon) for an icon key, or undefined when the key is unknown. */\nexport function iconPath(name: string): string | undefined {\n // own keys only: 'constructor' / 'toString' / '__proto__' are not icons\n if (Object.prototype.hasOwnProperty.call(EXTRA_ICONS, name)) return EXTRA_ICONS[name];\n return builtInActionIcon(name) ?? (Object.prototype.hasOwnProperty.call(MORE_ICONS, name) ? MORE_ICONS[name] : undefined);\n}\n\n/** Keys with an icon of their own (the data-table action keys are accepted too — see `builtInActionIcon`). */\nexport type IconName = 'add' | 'close' | 'check' | 'upload' | 'image' | 'chevron-up' | 'chevron-down' | 'arrow-left' | 'bell' | 'print'\n | 'lock' | 'shield' | 'arrow-up' | 'arrow-down' | 'arrow-right' | 'document' | 'grip' | 'card' | 'bank'\n | 'view' | 'view-off' | 'edit' | 'delete' | 'download' | 'duplicate' | 'archive' | 'restore' | 'share' | 'email' | 'message' | 'call' | 'refund' | 'chevron-right' | 'link' | 'save' | 'chart' | 'clipboard' | 'unlink' | 'send' | 'refresh' | 'search' | 'cup' | 'wrench' | 'cash' | 'dollar' | 'star' | 'gift' | 'award' | 'calendar-check' | 'history' | 'move-up' | 'move-down';\n\n/**\n * A clickable icon. The host passes a key (`name=\"delete\"`) and the library draws that icon; clicking it emits\n * `iconClick`, and the host does the actual work (delete the row, open a panel, …).\n *\n * <ui-icon name=\"delete\" tooltip=\"Remove line item 1\" variant=\"danger\" (iconClick)=\"removeLineItem(i)\" />\n *\n * `tooltip` is the text shown on hover / keyboard focus (any length) and, unless `ariaLabel` is set, the name\n * assistive tech reads — always set it on a clickable icon. An unknown `name` draws nothing.\n *\n * `[loading]=\"true\"` replaces the picture with a spinner and disables the button while the request the click started is running\n * (the same busy state `ui-button` has) — e.g. `<ui-icon name=\"delete\" [loading]=\"deleting()\" … />`.\n *\n * `[interactive]=\"false\"` draws just the picture (no button, no click) for an icon that sits next to text or inside another\n * button — e.g. the arrow in a \"Back\" button, a bell beside a reminder. It is hidden from assistive tech unless a `tooltip` or `ariaLabel` is set.\n *\n * <ui-button><ui-icon name=\"arrow-left\" [interactive]=\"false\" /> Back to Dashboard</ui-button>\n */\n@Component({\n selector: 'ui-icon',\n standalone: true,\n imports: [NgTemplateOutlet, TooltipDirective],\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n @if (interactive()) {\n <button type=\"button\" class=\"icon-btn\" [class.danger]=\"variant() === 'danger'\"\n [class.loading]=\"loading()\" [disabled]=\"disabled() || loading()\" [attr.aria-busy]=\"loading() ? 'true' : null\"\n [attr.aria-label]=\"accessibleName() || null\" [uiTooltip]=\"tooltip()\" (click)=\"onClick($event)\">\n <ng-container *ngTemplateOutlet=\"glyph\" />\n </button>\n } @else {\n <span class=\"icon-static\" [class.danger]=\"variant() === 'danger'\" [attr.aria-busy]=\"loading() ? 'true' : null\"\n [attr.role]=\"accessibleName() ? 'img' : null\" [attr.aria-label]=\"accessibleName() || null\" [uiTooltip]=\"tooltip()\" [attr.aria-hidden]=\"accessibleName() ? null : 'true'\">\n <ng-container *ngTemplateOutlet=\"glyph\" />\n </span>\n }\n <ng-template #glyph>\n @if (loading()) {\n <span class=\"spinner\" [style.width.px]=\"size()\" [style.height.px]=\"size()\" aria-hidden=\"true\"></span>\n } @else if (path(); as d) {\n <svg viewBox=\"0 0 24 24\" [attr.width]=\"size()\" [attr.height]=\"size()\" fill=\"none\" stroke=\"currentColor\"\n stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\" focusable=\"false\">\n <path [attr.d]=\"d\" />\n </svg>\n }\n </ng-template>\n `,\n styles: [`\n :host { display: inline-flex; }\n .icon-static { display: inline-flex; align-items: center; justify-content: center; color: inherit; }\n .icon-static.danger { color: #b91c1c; }\n .icon-static svg { display: block; }\n .icon-btn {\n position: relative; display: inline-flex; align-items: center; justify-content: center;\n width: 28px; height: 28px; padding: 0; border: none; border-radius: 6px;\n background: transparent; color: #475569; cursor: pointer;\n -webkit-appearance: none; appearance: none; font: inherit;\n transition: background 0.15s ease, color 0.15s ease;\n }\n .icon-btn:hover:not(:disabled) { background: #f1f5f9; color: #0f172a; }\n .icon-btn.danger { color: #b91c1c; }\n .icon-btn.danger:hover:not(:disabled) { background: #fef2f2; color: #991b1b; }\n .icon-btn:focus-visible { outline: 2px solid #2563eb; outline-offset: 2px; }\n .icon-btn:disabled { opacity: 0.5; cursor: not-allowed; }\n /* Busy: the spinner replaces the picture at full strength (the button is disabled while the request runs) */\n .icon-btn.loading:disabled { opacity: 1; cursor: progress; }\n .spinner {\n display: block; box-sizing: border-box; border: 2px solid rgba(100, 116, 139, 0.3); border-top-color: currentColor;\n border-radius: 50%; animation: ui-icon-spin 0.6s linear infinite;\n }\n @keyframes ui-icon-spin { to { transform: rotate(360deg); } }\n @media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 2s; } }\n /* 44px hit area for fingers without changing the 28px look */\n .icon-btn::after { content: ''; position: absolute; inset: -8px; }\n `],\n})\nexport class IconComponent {\n /** Which icon to draw, e.g. `delete`, `edit`, `add`. */\n readonly name = input.required<IconName | (string & {})>();\n /** Hover / keyboard-focus tooltip text, e.g. \"Remove line item 1\". Any length. Also the accessible name unless `ariaLabel` is set. */\n readonly tooltip = input('');\n /** Screen-reader name. Leave empty to use `tooltip`; set it only when it should differ. */\n readonly ariaLabel = input('');\n /** Icon size in px. */\n readonly size = input(16);\n readonly variant = input<'default' | 'danger'>('default');\n readonly disabled = input(false);\n /** The host is running the request this icon started: a spinner replaces the picture and the button is disabled (no click) until it is false again. */\n readonly loading = input(false);\n /** false = just the picture (no button, no click) — for an icon beside text or inside another button. */\n readonly interactive = input(true);\n /** Fires on click (not while disabled); the host performs the action. */\n readonly iconClick = output<MouseEvent>();\n\n protected readonly accessibleName = computed(() => this.ariaLabel() || this.tooltip());\n protected readonly path = computed(() => iconPath(this.name()));\n\n protected onClick(event: MouseEvent): void {\n // Keep a click on the icon from also triggering a click handler on a parent (a row, a card, …).\n event.stopPropagation();\n this.iconClick.emit(event);\n }\n}\n"],"mappings":";;;;;AAMA,MAAM,cAAsC;CAE1C,UAAc;CACd,OAAc;CACd,SAAc;CACd,SAAc;CACd,UAAc;CACd,SAAc;CACd,cAAc;CACd,gBAAgB;CAChB,iBAAiB;CACjB,cAAc;CACd,QAAc;CACd,SAAc;CACd,UAAc;CACd,QAAc;CACd,YAAc;CACd,cAAc;CACd,eAAe;CACf,YAAc;CAEd,QAAc;CACd,QAAc;CAEd,YAAc;CAEd,UAAc;CAEd,QAAc;CAEd,SAAc;CAEd,aAAc;CAEd,QAAc;CACd,QAAc;CAEd,UAAc;CAEd,QAAc;CAEd,WAAc;CAGd,UAAc;CAEd,OAAc;CAEd,QAAc;CAEd,UAAc;CAEd,UAAc;CAGd,QAAc;CAEd,QAAc;CAEd,SAAc;CAEd,kBAAkB;AACnB;AAMD,MAAM,aAAqC;CAEzC,aAAa;CAEb,SAAS;CAET,YAAY;CAEZ,aAAa;AACd;AAG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AAA,cAAA,CAAA;IAAA,MAAA;IAAA,MAzBS;IAAgB,UAAA;IAAA,QAAA;KAAA;KAAA;KAAA;IAAA;GAAA,GAAA;IAAA,MAAA;IAAA,MAAE;IAAgB,UAAA;IAAA,QAAA,CAAA,aAAA,iBAAA;GAAA,CAAA;GAAA,iBAAA,GAAA,wBAAA;EAAA,CAAA;CAAA;;AAuDjC,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAa,YAAA,CAAA;EA1DzB,MAAA;EACW,MAAA,CAAA;GAAA,UAAA;GAAS,YACP;GAAI,SACP,CAAC,kBAAkB,gBAAgB;GAAC,iBAC5B,wBAAwB;GAAM,UACrC;;;;;;;;;;;;;;;;;;;;;;;;GAuBT,QAAA,CAAA,8pCAAA;EAAA,CAAA"}
1
+ {"version":3,"file":"forgeroute-ui-icon.mjs","names":[],"sources":["../../../projects/forgeroute-ui/icon/src/lib/icon/icon.component.ts"],"sourcesContent":["import { NgTemplateOutlet } from '@angular/common';\nimport { Component, ChangeDetectionStrategy, computed, input, output } from '@angular/core';\nimport { builtInActionIcon } from '@forgeroute/ui/more-menu';\nimport { TooltipDirective } from '@forgeroute/ui/tooltip';\n\n/** Icons drawn by `<ui-icon>` itself (the other row-action icons — view, edit, … — are reused from the data table). */\nconst EXTRA_ICONS: Record<string, string> = {\n // A fuller bin than the data table's row-action one: lid with handle, tapered body, two slats\n 'delete': 'M3 6h18 M8 6V4a1 1 0 0 1 1-1h6a1 1 0 0 1 1 1v2 M5 6l1 14a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2l1-14 M10 11v6 M14 11v6',\n 'add': 'M12 5v14 M5 12h14',\n 'close': 'M18 6L6 18 M6 6l12 12',\n 'check': 'M20 6L9 17l-5-5',\n 'upload': 'M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4 M17 8l-5-5-5 5 M12 3v12',\n 'image': 'M19 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V5a2 2 0 0 0-2-2z M8.5 8.5a1.5 1.5 0 1 0 0 3 1.5 1.5 0 0 0 0-3z M21 15l-5-5L5 21',\n 'chevron-up': 'M18 15l-6-6-6 6',\n 'chevron-down': 'M6 9l6 6 6-6',\n 'chevron-right': 'M9 18l6-6-6-6',\n 'arrow-left': 'M19 12H5 M12 19l-7-7 7-7',\n 'bell': 'M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9 M13.73 21a2 2 0 0 1-3.46 0',\n 'print': 'M6 9V2h12v7 M6 18H4a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-2 M6 14h12v8H6z',\n 'shield': 'M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z',\n 'lock': 'M5 11h14a2 2 0 0 1 2 2v7a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-7a2 2 0 0 1 2-2z M7 11V7a5 5 0 0 1 10 0v4',\n 'arrow-up': 'M12 19V5 M5 12l7-7 7 7',\n 'arrow-down': 'M12 5v14 M19 12l-7 7-7-7',\n 'arrow-right': 'M5 12h14 M12 5l7 7-7 7',\n 'document': 'M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z M14 2v6h6 M16 13H8 M16 17H8 M10 9H8',\n // Six dots (drag grip): zero-length segments, drawn as dots by the round line caps\n 'grip': 'M9 5h.01 M15 5h.01 M9 12h.01 M15 12h.01 M9 19h.01 M15 19h.01',\n 'card': 'M3 4h18a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2z M1 10h22',\n // The view (eye) icon with a diagonal slash: \"hidden\" / \"don't show\" (e.g. a password field's hide toggle)\n 'view-off': 'M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z M12 9a3 3 0 1 0 0 6 3 3 0 0 0 0-6z M3 3l18 18',\n // Undo-arrow (a refund / reverse): curved line back to the left with an arrowhead\n 'refund': 'M3 10h10a8 8 0 0 1 8 8v2 M3 10l6 6 M3 10l6-6',\n // Two interlocking chain links: a link / URL (copy link, share link)\n 'link': 'M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71 M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71',\n // Three vertical bars of different heights: a bar chart / comparison\n 'chart': 'M18 20V10 M12 20V4 M6 20v-6',\n // Clipboard with a clip at the top: copy to clipboard\n 'clipboard': 'M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2 M9 2h6a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1H9a1 1 0 0 1-1-1V3a1 1 0 0 1 1-1z',\n // Floppy disk: save\n 'save': 'M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2z M17 21v-8H7v8 M7 3v5h8',\n 'bank': 'M3 21h18 M3 10h18 M5 6l7-3 7 3 M4 10v11 M20 10v11 M8 14v3 M12 14v3 M16 14v3',\n // Two chain links pulled apart with a slash: disconnect / unlink an integration\n 'unlink': 'M18.84 12.25l1.72-1.71a5 5 0 0 0-7.07-7.07l-1.72 1.71 M5.17 11.75l-1.72 1.71a5 5 0 0 0 7.07 7.07l1.71-1.71 M3 3l18 18',\n // Paper plane: send / test-send\n 'send': 'M22 2L11 13 M22 2l-7 20-4-9-9-4 20-7z',\n // Two arrows chasing in a circle: refresh / sync / retry\n 'refresh': 'M23 4v6h-6 M1 20v-6h6 M3.51 9a9 9 0 0 1 14.85-3.36L23 10 M1 14l4.64 4.36A9 9 0 0 0 20.49 15',\n // library source 2026-11-04, not yet published:\n // Magnifying glass: search (e.g. the leading icon of a search field, `ui-text-input leadingIcon=\"search\"`)\n 'search': 'M11 3a8 8 0 1 0 0 16 8 8 0 0 0 0-16z M21 21l-4.35-4.35',\n // Cup with steam: food and drink (a product type)\n 'cup': 'M18 8h1a4 4 0 0 1 0 8h-1 M2 8h16v9a4 4 0 0 1-4 4H6a4 4 0 0 1-4-4V8z M6 1v3 M10 1v3 M14 1v3',\n // Banknote: a rounded note with a centre coin and two corner dots - cash (a payment method)\n 'cash': 'M3 6h18a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1z M12 9a3 3 0 1 0 0 6 3 3 0 0 0 0-6z M6 12h.01 M18 12h.01',\n // Dollar sign: a vertical bar through an S - money / price / amount\n 'dollar': 'M12 1v22 M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6',\n // Spanner: rentals and tools (a product type)\n 'wrench': 'M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z',\n // library source 2026-11-05, not yet published:\n // Five-point star: rating / favourite\n 'star': 'M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z',\n // Gift box with ribbon: a gift / reward / referral thank-you\n 'gift': 'M20 12v10H4V12 M2 7h20v5H2z M12 22V7 M12 7H7.5a2.5 2.5 0 0 1 0-5C11 2 12 7 12 7z M12 7h4.5a2.5 2.5 0 0 0 0-5C13 2 12 7 12 7z',\n // Medal with ribbon tails: an award / achievement\n 'award': 'M12 1a7 7 0 1 0 0 14 7 7 0 0 0 0-14z M8.21 13.89L7 23l5-3 5 3-1.21-9.12',\n // Calendar with a check mark: a confirmed date / booked appointment\n 'calendar-check': 'M19 4H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2z M16 2v4 M8 2v4 M3 10h18 M9 16l2 2 4-4',\n};\n\n/**\n * Icons added in 0.5.11 (a dashboard, a group of people, a gear, a person with a plus). They are drawn by `<ui-icon>`, `ui-option-card` and the setup wizard through `iconPath(key)`,\n * but are kept apart from `ICON_NAMES` / `IconName` (as published) and from the data-table action keys, so a row action named `settings` or `users` still gets the fallback arrow it always got.\n */\nconst MORE_ICONS: Record<string, string> = {\n // Four panels of different sizes: a dashboard / overview\n 'dashboard': 'M3 3h7v9H3z M14 3h7v5h-7z M14 12h7v9h-7z M3 16h7v5H3z',\n // Two people side by side: users / a team\n 'users': 'M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2 M9 3a4 4 0 1 0 0 8 4 4 0 0 0 0-8z M23 21v-2a4 4 0 0 0-3-3.87 M16 3.13a4 4 0 0 1 0 7.75',\n // A gear: settings\n 'settings': 'M12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6z M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z',\n // A person with a plus: invite / add a user\n 'user-plus': 'M16 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2 M8.5 3a4 4 0 1 0 0 8 4 4 0 0 0 0-8z M20 8v6 M23 11h-6',\n};\n\n/** The keys added in 0.5.11 (see `MORE_ICONS`): each resolves with `iconPath(key)`. */\nexport const MORE_ICON_NAMES: readonly string[] = Object.freeze(Object.keys(MORE_ICONS));\n\n/**\n * Every key `<ui-icon>` draws by itself (the data-table action keys such as `view` / `edit` / `call` are accepted too, see `builtInActionIcon`).\n * Each resolves with `iconPath(key)`. Includes `search`, `cup` (food / drink) and `wrench` (rental / tools), library source 2026-11-04, and `cash` (banknote) and `dollar` (payment methods / amounts), library source 2026-11-05, not yet published. Also `star`, `gift`, `award` and `calendar-check` (library source 2026-11-05, not yet published).\n */\nexport const ICON_NAMES: readonly string[] = Object.freeze(Object.keys(EXTRA_ICONS));\n\n/** The SVG path (24×24 stroke icon) for an icon key, or undefined when the key is unknown. */\nexport function iconPath(name: string): string | undefined {\n // own keys only: 'constructor' / 'toString' / '__proto__' are not icons\n if (Object.prototype.hasOwnProperty.call(EXTRA_ICONS, name)) return EXTRA_ICONS[name];\n return builtInActionIcon(name) ?? (Object.prototype.hasOwnProperty.call(MORE_ICONS, name) ? MORE_ICONS[name] : undefined);\n}\n\n/** Keys with an icon of their own (the data-table action keys are accepted too — see `builtInActionIcon`). */\nexport type IconName = 'add' | 'close' | 'check' | 'upload' | 'image' | 'chevron-up' | 'chevron-down' | 'arrow-left' | 'bell' | 'print'\n | 'lock' | 'shield' | 'arrow-up' | 'arrow-down' | 'arrow-right' | 'document' | 'grip' | 'card' | 'bank'\n | 'view' | 'view-off' | 'edit' | 'delete' | 'download' | 'duplicate' | 'archive' | 'restore' | 'share' | 'email' | 'message' | 'call' | 'refund' | 'chevron-right' | 'link' | 'save' | 'chart' | 'clipboard' | 'unlink' | 'send' | 'refresh' | 'search' | 'cup' | 'wrench' | 'cash' | 'dollar' | 'star' | 'gift' | 'award' | 'calendar-check' | 'history' | 'move-up' | 'move-down';\n\n/**\n * A clickable icon. The host passes a key (`name=\"delete\"`) and the library draws that icon; clicking it emits\n * `iconClick`, and the host does the actual work (delete the row, open a panel, …).\n *\n * <ui-icon name=\"delete\" tooltip=\"Remove line item 1\" variant=\"danger\" (iconClick)=\"removeLineItem(i)\" />\n *\n * `tooltip` is the text shown on hover / keyboard focus (any length) and, unless `ariaLabel` is set, the name\n * assistive tech reads — always set it on a clickable icon. An unknown `name` draws nothing.\n *\n * `[loading]=\"true\"` replaces the picture with a spinner and disables the button while the request the click started is running\n * (the same busy state `ui-button` has) — e.g. `<ui-icon name=\"delete\" [loading]=\"deleting()\" … />`.\n *\n * `[interactive]=\"false\"` draws just the picture (no button, no click) for an icon that sits next to text or inside another\n * button — e.g. the arrow in a \"Back\" button, a bell beside a reminder. It is hidden from assistive tech unless a `tooltip` or `ariaLabel` is set.\n *\n * <ui-button><ui-icon name=\"arrow-left\" [interactive]=\"false\" /> Back to Dashboard</ui-button>\n */\n@Component({\n selector: 'ui-icon',\n standalone: true,\n imports: [NgTemplateOutlet, TooltipDirective],\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n @if (interactive()) {\n <button type=\"button\" class=\"icon-btn\" [class.danger]=\"variant() === 'danger'\" [class.check]=\"isCheck()\"\n [class.loading]=\"loading()\" [disabled]=\"disabled() || loading()\" [attr.aria-busy]=\"loading() ? 'true' : null\"\n [attr.aria-label]=\"accessibleName() || null\" [uiTooltip]=\"tooltip()\" (click)=\"onClick($event)\">\n <ng-container *ngTemplateOutlet=\"glyph\" />\n </button>\n } @else {\n <span class=\"icon-static\" [class.danger]=\"variant() === 'danger'\" [class.check]=\"isCheck()\" [attr.aria-busy]=\"loading() ? 'true' : null\"\n [attr.role]=\"accessibleName() ? 'img' : null\" [attr.aria-label]=\"accessibleName() || null\" [uiTooltip]=\"tooltip()\" [attr.aria-hidden]=\"accessibleName() ? null : 'true'\">\n <ng-container *ngTemplateOutlet=\"glyph\" />\n </span>\n }\n <ng-template #glyph>\n @if (loading()) {\n <span class=\"spinner\" [style.width.px]=\"size()\" [style.height.px]=\"size()\" aria-hidden=\"true\"></span>\n } @else if (path(); as d) {\n <svg viewBox=\"0 0 24 24\" [attr.width]=\"size()\" [attr.height]=\"size()\" fill=\"none\" stroke=\"currentColor\"\n stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\" focusable=\"false\">\n <path [attr.d]=\"d\" />\n </svg>\n }\n </ng-template>\n `,\n styles: [`\n :host { display: inline-flex; }\n .icon-static { display: inline-flex; align-items: center; justify-content: center; color: inherit; }\n .icon-static.danger { color: #b91c1c; }\n /* The tick (check) is always green: it means done / confirmed everywhere it is used. */\n .icon-static.check { color: #16a34a; }\n .icon-static svg { display: block; }\n .icon-btn {\n position: relative; display: inline-flex; align-items: center; justify-content: center;\n width: 28px; height: 28px; padding: 0; border: none; border-radius: 6px;\n background: transparent; color: #475569; cursor: pointer;\n -webkit-appearance: none; appearance: none; font: inherit;\n transition: background 0.15s ease, color 0.15s ease;\n }\n .icon-btn:hover:not(:disabled) { background: #f1f5f9; color: #0f172a; }\n .icon-btn.check { color: #16a34a; }\n .icon-btn.check:hover:not(:disabled) { background: #f0fdf4; color: #15803d; }\n .icon-btn.danger { color: #b91c1c; }\n .icon-btn.danger:hover:not(:disabled) { background: #fef2f2; color: #991b1b; }\n .icon-btn:focus-visible { outline: 2px solid #2563eb; outline-offset: 2px; }\n .icon-btn:disabled { opacity: 0.5; cursor: not-allowed; }\n /* Busy: the spinner replaces the picture at full strength (the button is disabled while the request runs) */\n .icon-btn.loading:disabled { opacity: 1; cursor: progress; }\n .spinner {\n display: block; box-sizing: border-box; border: 2px solid rgba(100, 116, 139, 0.3); border-top-color: currentColor;\n border-radius: 50%; animation: ui-icon-spin 0.6s linear infinite;\n }\n @keyframes ui-icon-spin { to { transform: rotate(360deg); } }\n @media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 2s; } }\n /* 44px hit area for fingers without changing the 28px look */\n .icon-btn::after { content: ''; position: absolute; inset: -8px; }\n `],\n})\nexport class IconComponent {\n /** Which icon to draw, e.g. `delete`, `edit`, `add`. */\n readonly name = input.required<IconName | (string & {})>();\n /** Hover / keyboard-focus tooltip text, e.g. \"Remove line item 1\". Any length. Also the accessible name unless `ariaLabel` is set. */\n readonly tooltip = input('');\n /** Screen-reader name. Leave empty to use `tooltip`; set it only when it should differ. */\n readonly ariaLabel = input('');\n /** Icon size in px. */\n readonly size = input(16);\n readonly variant = input<'default' | 'danger'>('default');\n readonly disabled = input(false);\n /** The host is running the request this icon started: a spinner replaces the picture and the button is disabled (no click) until it is false again. */\n readonly loading = input(false);\n /** false = just the picture (no button, no click) — for an icon beside text or inside another button. */\n readonly interactive = input(true);\n /** Fires on click (not while disabled); the host performs the action. */\n readonly iconClick = output<MouseEvent>();\n\n protected readonly accessibleName = computed(() => this.ariaLabel() || this.tooltip());\n /** The tick icon is drawn green, interactive or not (a danger variant still wins nothing: the tick is never destructive). */\n protected readonly isCheck = computed(() => this.name() === 'check');\n protected readonly path = computed(() => iconPath(this.name()));\n\n protected onClick(event: MouseEvent): void {\n // Keep a click on the icon from also triggering a click handler on a parent (a row, a card, …).\n event.stopPropagation();\n this.iconClick.emit(event);\n }\n}\n"],"mappings":";;;;;AAMA,MAAM,cAAsC;CAE1C,UAAc;CACd,OAAc;CACd,SAAc;CACd,SAAc;CACd,UAAc;CACd,SAAc;CACd,cAAc;CACd,gBAAgB;CAChB,iBAAiB;CACjB,cAAc;CACd,QAAc;CACd,SAAc;CACd,UAAc;CACd,QAAc;CACd,YAAc;CACd,cAAc;CACd,eAAe;CACf,YAAc;CAEd,QAAc;CACd,QAAc;CAEd,YAAc;CAEd,UAAc;CAEd,QAAc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KAAA,mBAAA;IAAA;IAAA,UAAA;KAAA,mBAAA;KAAA,YAAA;KAAA,UAAA;KAAA,YAAA;KAAA,mBAAA;IAAA;IAAA,SAAA;KAAA,mBAAA;KAAA,YAAA;KAAA,UAAA;KAAA,YAAA;KAAA,mBAAA;IAAA;IAAA,aAAA;KAAA,mBAAA;KAAA,YAAA;KAAA,UAAA;KAAA,YAAA;KAAA,mBAAA;IAAA;GAAA;GAAA,SAAA,EAAA,WAAA,YAAA;GAAA,UAAA;GAAA,UAzDd;;;;;;;;;;;;;;;;;;;;;;;;GAuBT,UAAA;GAAA,QAAA,CAAA,myCAAA;GAAA,cAAA,CAAA;IAAA,MAAA;IAAA,MAzBS;IAAgB,UAAA;IAAA,QAAA;KAAA;KAAA;KAAA;IAAA;GAAA,GAAA;IAAA,MAAA;IAAA,MAAE;IAAgB,UAAA;IAAA,QAAA,CAAA,aAAA,iBAAA;GAAA,CAAA;GAAA,iBAAA,GAAA,wBAAA;EAAA,CAAA;CAAA;;AA2DjC,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAa,YAAA,CAAA;EA9DzB,MAAA;EACW,MAAA,CAAA;GAAA,UAAA;GAAS,YACP;GAAI,SACP,CAAC,kBAAkB,gBAAgB;GAAC,iBAC5B,wBAAwB;GAAM,UACrC;;;;;;;;;;;;;;;;;;;;;;;;GAuBT,QAAA,CAAA,myCAAA;EAAA,CAAA"}
@@ -234,7 +234,7 @@ var KpiCardComponent = class KpiCardComponent {
234
234
  </div>
235
235
  `,
236
236
  isInline: true,
237
- styles: [":host{display:block;height:100%}.kpi-card{position:relative;background:#fff;border:1px solid #e2e8f0;border-radius:10px;padding:16px;display:flex;flex-direction:column;gap:4px;min-width:0;height:100%;box-sizing:border-box;transition:border-color .15s ease,box-shadow .15s ease}:host(:focus){outline:none}:host(:focus-visible) .kpi-card{outline:2px solid #3b82f6;outline-offset:2px}.kpi-card.clickable{cursor:pointer}.kpi-card.clickable:hover{border-color:#93c5fd;box-shadow:0 2px 8px #3b82f614}.kpi-card.clickable:hover .kpi-arrow{color:#3b82f6;transform:translate(2px)}.kpi-arrow{position:absolute;bottom:14px;right:14px;color:#94a3b8;transition:color .15s ease,transform .15s ease}.kpi-icon{flex-shrink:0;width:36px;height:36px;border-radius:8px;display:flex;align-items:center;justify-content:center;margin-bottom:8px}.green-icon{background:#dcfce7;color:#16a34a}.blue-icon{background:#dbeafe;color:#2563eb}.amber-icon{background:#fef3c7;color:#d97706}.orange-icon{background:#ffedd5;color:#c2410c}.red-icon{background:#fee2e2;color:#dc2626}.slate-icon{background:#f1f5f9;color:#475569}.kpi-label{font-size:.75rem;font-weight:600;color:#64748b;text-transform:uppercase;letter-spacing:.04em}.kpi-top{display:flex;align-items:flex-start;justify-content:space-between;gap:8px;min-height:36px;margin-bottom:4px}.kpi-ring{flex-shrink:0}.kpi-card.ring-corner .kpi-top{display:contents}.kpi-card.ring-corner .kpi-ring{position:absolute;top:12px;right:12px}.kpi-value{font-size:1.5rem;font-weight:700;color:#111827;line-height:1.1}.kpi-value.green-value{color:#16a34a}.kpi-value.blue-value{color:#3b82f6}.kpi-value.red-value{color:#dc2626}.kpi-subtitle{font-size:.75rem;color:#64748b;margin-top:2px}.kpi-value--loading{display:flex;align-items:center;height:1.65rem}.kpi-bar{display:block;width:60%;max-width:8rem;height:1.1rem;border-radius:6px;background:#e2e8f0;animation:kpi-pulse 1.4s ease-in-out infinite}.kpi-subtitle--loading{align-self:flex-start;max-width:100%;border-radius:4px;background:#e2e8f0;color:transparent;-webkit-user-select:none;user-select:none;animation:kpi-pulse 1.4s ease-in-out infinite}.kpi-loading-text{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}@keyframes kpi-pulse{50%{opacity:.55}}@media(prefers-reduced-motion:reduce){.kpi-bar,.kpi-subtitle--loading{animation:none}}\n"],
237
+ styles: [":host{display:block;height:100%}.kpi-card{position:relative;background:#fff;border:1px solid #e2e8f0;border-radius:10px;padding:16px;display:flex;flex-direction:column;gap:4px;min-width:0;height:100%;box-sizing:border-box;transition:border-color .15s ease,box-shadow .15s ease}:host(:focus){outline:none}:host(:focus-visible) .kpi-card{outline:2px solid #3b82f6;outline-offset:2px}.kpi-card.clickable{cursor:pointer}.kpi-card.clickable:hover{border-color:#93c5fd;box-shadow:0 2px 8px #3b82f614}.kpi-card.clickable:hover .kpi-arrow{color:#3b82f6;transform:translateY(-50%) translate(2px)}.kpi-arrow{position:absolute;top:50%;right:16px;transform:translateY(-50%);color:#94a3b8;transition:color .15s ease,transform .15s ease}.kpi-icon{flex-shrink:0;width:36px;height:36px;border-radius:8px;display:flex;align-items:center;justify-content:center;margin-bottom:8px}.green-icon{background:#dcfce7;color:#16a34a}.blue-icon{background:#dbeafe;color:#2563eb}.amber-icon{background:#fef3c7;color:#d97706}.orange-icon{background:#ffedd5;color:#c2410c}.red-icon{background:#fee2e2;color:#dc2626}.slate-icon{background:#f1f5f9;color:#475569}.kpi-label{font-size:.75rem;font-weight:600;color:#64748b;text-transform:uppercase;letter-spacing:.04em}.kpi-top{display:flex;align-items:flex-start;justify-content:space-between;gap:8px;min-height:36px;margin-bottom:4px}.kpi-ring{flex-shrink:0}.kpi-card.ring-corner .kpi-top{display:contents}.kpi-card.ring-corner .kpi-ring{position:absolute;top:12px;right:12px}.kpi-value{font-size:1.5rem;font-weight:700;color:#111827;line-height:1.1}.kpi-value.green-value{color:#16a34a}.kpi-value.blue-value{color:#3b82f6}.kpi-value.red-value{color:#dc2626}.kpi-subtitle{font-size:.75rem;color:#64748b;margin-top:2px}.kpi-value--loading{display:flex;align-items:center;height:1.65rem}.kpi-bar{display:block;width:60%;max-width:8rem;height:1.1rem;border-radius:6px;background:#e2e8f0;animation:kpi-pulse 1.4s ease-in-out infinite}.kpi-subtitle--loading{align-self:flex-start;max-width:100%;border-radius:4px;background:#e2e8f0;color:transparent;-webkit-user-select:none;user-select:none;animation:kpi-pulse 1.4s ease-in-out infinite}.kpi-loading-text{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}@keyframes kpi-pulse{50%{opacity:.55}}@media(prefers-reduced-motion:reduce){.kpi-bar,.kpi-subtitle--loading{animation:none}}\n"],
238
238
  dependencies: [{
239
239
  kind: "component",
240
240
  type: ProgressRingComponent,
@@ -310,7 +310,7 @@ i0.ɵɵngDeclareClassMetadata({
310
310
  }
311
311
  </div>
312
312
  `,
313
- styles: [":host{display:block;height:100%}.kpi-card{position:relative;background:#fff;border:1px solid #e2e8f0;border-radius:10px;padding:16px;display:flex;flex-direction:column;gap:4px;min-width:0;height:100%;box-sizing:border-box;transition:border-color .15s ease,box-shadow .15s ease}:host(:focus){outline:none}:host(:focus-visible) .kpi-card{outline:2px solid #3b82f6;outline-offset:2px}.kpi-card.clickable{cursor:pointer}.kpi-card.clickable:hover{border-color:#93c5fd;box-shadow:0 2px 8px #3b82f614}.kpi-card.clickable:hover .kpi-arrow{color:#3b82f6;transform:translate(2px)}.kpi-arrow{position:absolute;bottom:14px;right:14px;color:#94a3b8;transition:color .15s ease,transform .15s ease}.kpi-icon{flex-shrink:0;width:36px;height:36px;border-radius:8px;display:flex;align-items:center;justify-content:center;margin-bottom:8px}.green-icon{background:#dcfce7;color:#16a34a}.blue-icon{background:#dbeafe;color:#2563eb}.amber-icon{background:#fef3c7;color:#d97706}.orange-icon{background:#ffedd5;color:#c2410c}.red-icon{background:#fee2e2;color:#dc2626}.slate-icon{background:#f1f5f9;color:#475569}.kpi-label{font-size:.75rem;font-weight:600;color:#64748b;text-transform:uppercase;letter-spacing:.04em}.kpi-top{display:flex;align-items:flex-start;justify-content:space-between;gap:8px;min-height:36px;margin-bottom:4px}.kpi-ring{flex-shrink:0}.kpi-card.ring-corner .kpi-top{display:contents}.kpi-card.ring-corner .kpi-ring{position:absolute;top:12px;right:12px}.kpi-value{font-size:1.5rem;font-weight:700;color:#111827;line-height:1.1}.kpi-value.green-value{color:#16a34a}.kpi-value.blue-value{color:#3b82f6}.kpi-value.red-value{color:#dc2626}.kpi-subtitle{font-size:.75rem;color:#64748b;margin-top:2px}.kpi-value--loading{display:flex;align-items:center;height:1.65rem}.kpi-bar{display:block;width:60%;max-width:8rem;height:1.1rem;border-radius:6px;background:#e2e8f0;animation:kpi-pulse 1.4s ease-in-out infinite}.kpi-subtitle--loading{align-self:flex-start;max-width:100%;border-radius:4px;background:#e2e8f0;color:transparent;-webkit-user-select:none;user-select:none;animation:kpi-pulse 1.4s ease-in-out infinite}.kpi-loading-text{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}@keyframes kpi-pulse{50%{opacity:.55}}@media(prefers-reduced-motion:reduce){.kpi-bar,.kpi-subtitle--loading{animation:none}}\n"]
313
+ styles: [":host{display:block;height:100%}.kpi-card{position:relative;background:#fff;border:1px solid #e2e8f0;border-radius:10px;padding:16px;display:flex;flex-direction:column;gap:4px;min-width:0;height:100%;box-sizing:border-box;transition:border-color .15s ease,box-shadow .15s ease}:host(:focus){outline:none}:host(:focus-visible) .kpi-card{outline:2px solid #3b82f6;outline-offset:2px}.kpi-card.clickable{cursor:pointer}.kpi-card.clickable:hover{border-color:#93c5fd;box-shadow:0 2px 8px #3b82f614}.kpi-card.clickable:hover .kpi-arrow{color:#3b82f6;transform:translateY(-50%) translate(2px)}.kpi-arrow{position:absolute;top:50%;right:16px;transform:translateY(-50%);color:#94a3b8;transition:color .15s ease,transform .15s ease}.kpi-icon{flex-shrink:0;width:36px;height:36px;border-radius:8px;display:flex;align-items:center;justify-content:center;margin-bottom:8px}.green-icon{background:#dcfce7;color:#16a34a}.blue-icon{background:#dbeafe;color:#2563eb}.amber-icon{background:#fef3c7;color:#d97706}.orange-icon{background:#ffedd5;color:#c2410c}.red-icon{background:#fee2e2;color:#dc2626}.slate-icon{background:#f1f5f9;color:#475569}.kpi-label{font-size:.75rem;font-weight:600;color:#64748b;text-transform:uppercase;letter-spacing:.04em}.kpi-top{display:flex;align-items:flex-start;justify-content:space-between;gap:8px;min-height:36px;margin-bottom:4px}.kpi-ring{flex-shrink:0}.kpi-card.ring-corner .kpi-top{display:contents}.kpi-card.ring-corner .kpi-ring{position:absolute;top:12px;right:12px}.kpi-value{font-size:1.5rem;font-weight:700;color:#111827;line-height:1.1}.kpi-value.green-value{color:#16a34a}.kpi-value.blue-value{color:#3b82f6}.kpi-value.red-value{color:#dc2626}.kpi-subtitle{font-size:.75rem;color:#64748b;margin-top:2px}.kpi-value--loading{display:flex;align-items:center;height:1.65rem}.kpi-bar{display:block;width:60%;max-width:8rem;height:1.1rem;border-radius:6px;background:#e2e8f0;animation:kpi-pulse 1.4s ease-in-out infinite}.kpi-subtitle--loading{align-self:flex-start;max-width:100%;border-radius:4px;background:#e2e8f0;color:transparent;-webkit-user-select:none;user-select:none;animation:kpi-pulse 1.4s ease-in-out infinite}.kpi-loading-text{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}@keyframes kpi-pulse{50%{opacity:.55}}@media(prefers-reduced-motion:reduce){.kpi-bar,.kpi-subtitle--loading{animation:none}}\n"]
314
314
  }]
315
315
  }],
316
316
  propDecorators: {
@@ -1 +1 @@
1
- {"version":3,"file":"forgeroute-ui-kpi-card.mjs","names":[],"sources":["../../../projects/forgeroute-ui/kpi-card/src/lib/kpi-card/kpi-card.component.ts"],"sourcesContent":["import { Component, ChangeDetectionStrategy, ElementRef, computed, inject, input } from '@angular/core';\nimport { DomSanitizer, SafeHtml } from '@angular/platform-browser';\nimport { ProgressRingComponent, ProgressRingVariant } from '@forgeroute/ui/progress-ring';\nimport { UiLabelsService } from '@forgeroute/ui/core';\n\nexport type KpiCardColor = 'green' | 'blue' | 'amber' | 'orange' | 'red' | 'slate';\n/** Colour of the big value: `default` (dark slate), `green`, `blue`, or `red` (for figures that need attention: overdue, outstanding, failed). */\nexport type KpiCardValueColor = 'default' | 'green' | 'blue' | 'red';\n\n/**\n * Compact KPI summary card: optional icon, uppercase label, large value, optional subtitle.\n * Set `clickable` to show a hover state + chevron (bind `(click)` on the host). A clickable card is a keyboard button:\n * role=\"button\", focusable (tabindex 0, visible focus ring), and Enter / Space fire the host's (click). Give it an\n * accessible name with [attr.aria-label] when the label alone isn't enough (e.g. \"Net Commission: $12.5K — show details\").\n *\n * Optional background: `background=\"#fef2f2\"` fills the card with any CSS colour (default white), e.g. a soft red for money going out; the\n * text keeps its own colours, so pick a light shade.\n *\n * Optional ring (top-right corner, level with the icon when the card has one — no extra height; beside the label otherwise): `[progress]=\"67\"` (+ `progressMax`, `progressVariant`, `progressSize`) draws a ui-progress-ring beside the label; extra lines\n * (a pace badge, a projection…) go in an element with the `kpi-footer` attribute.\n *\n * <ui-kpi-card label=\"Deals Closed\" [value]=\"'' + deals\" subtitle=\"Year to Date\" icon=\"check-circle\" color=\"blue\" />\n * <ui-kpi-card label=\"Net Commission\" [value]=\"net\" icon=\"dollar\" color=\"green\" [highlight]=\"true\"\n * [clickable]=\"true\" (click)=\"openDetails()\" />\n */\n@Component({\n selector: 'ui-kpi-card',\n standalone: true,\n imports: [ProgressRingComponent],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[attr.role]': 'clickable() ? \"button\" : null',\n '[attr.aria-busy]': 'loading() ? \"true\" : null',\n '[attr.tabindex]': 'clickable() ? 0 : null',\n '(keydown.enter)': 'onActivateKey($event)',\n '(keydown.space)': 'onActivateKey($event)',\n },\n template: `\n <div class=\"kpi-card\" [class.highlight]=\"highlight()\" [class.clickable]=\"clickable()\" [class.ring-corner]=\"hasProgress() && !!iconSvg()\" [style.background]=\"background() || null\">\n @if (iconSvg()) {\n <div [class]=\"'kpi-icon ' + color() + '-icon'\" aria-hidden=\"true\" [innerHTML]=\"iconSvg()\"></div>\n }\n @if (hasProgress()) {\n <div class=\"kpi-top\">\n <span class=\"kpi-label\" data-testid=\"kpi-label\">{{ label() }}</span>\n <ui-progress-ring class=\"kpi-ring\" [attr.aria-hidden]=\"loading() ? 'true' : null\" [value]=\"progress()!\" [max]=\"progressMax()\" [size]=\"progressSize()\" [strokeWidth]=\"progressStrokeWidth()\"\n [variant]=\"progressVariant()\" [ariaLabel]=\"progressAriaLabel() || labels.t('kpiCard.progress', { label: label() })\" [valueText]=\"progressValueText()\" />\n </div>\n } @else {\n <span class=\"kpi-label\" data-testid=\"kpi-label\">{{ label() }}</span>\n }\n @if (loading()) {\n <span class=\"kpi-value kpi-value--loading\" aria-hidden=\"true\" data-testid=\"kpi-value-placeholder\"><span class=\"kpi-bar\"></span></span>\n <span class=\"kpi-loading-text\">{{ loadingLabel() }}</span>\n @if (subtitle()) {\n <span class=\"kpi-subtitle kpi-subtitle--loading\" aria-hidden=\"true\" data-testid=\"kpi-subtitle-placeholder\">{{ subtitle() }}</span>\n }\n } @else {\n <span class=\"kpi-value\" data-testid=\"kpi-value\"\n [class.green-value]=\"highlight() || valueColor() === 'green'\"\n [class.blue-value]=\"valueColor() === 'blue'\"\n [class.red-value]=\"valueColor() === 'red'\">{{ value() }}</span>\n @if (subtitle()) {\n <span class=\"kpi-subtitle\">{{ subtitle() }}</span>\n }\n }\n <ng-content select=\"[kpi-footer]\" />\n @if (clickable()) {\n <svg class=\"kpi-arrow\" width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><polyline points=\"9 18 15 12 9 6\"/></svg>\n }\n </div>\n `,\n styles: [`\n :host { display: block; height: 100%; }\n .kpi-card {\n position: relative;\n background: #fff; border: 1px solid #e2e8f0; border-radius: 10px;\n padding: 16px; display: flex; flex-direction: column; gap: 4px; min-width: 0;\n height: 100%; box-sizing: border-box;\n transition: border-color 150ms ease, box-shadow 150ms ease;\n }\n :host(:focus) { outline: none; }\n :host(:focus-visible) .kpi-card { outline: 2px solid #3b82f6; outline-offset: 2px; }\n .kpi-card.clickable { cursor: pointer; }\n .kpi-card.clickable:hover { border-color: #93c5fd; box-shadow: 0 2px 8px rgba(59,130,246,0.08); }\n .kpi-card.clickable:hover .kpi-arrow { color: #3b82f6; transform: translateX(2px); }\n .kpi-arrow {\n position: absolute; bottom: 14px; right: 14px;\n color: #94a3b8; transition: color 150ms ease, transform 150ms ease;\n }\n .kpi-icon {\n flex-shrink: 0; width: 36px; height: 36px; border-radius: 8px;\n display: flex; align-items: center; justify-content: center;\n margin-bottom: 8px;\n }\n .green-icon { background: #dcfce7; color: #16a34a; }\n .blue-icon { background: #dbeafe; color: #2563eb; }\n .amber-icon { background: #fef3c7; color: #d97706; }\n .orange-icon { background: #ffedd5; color: #c2410c; }\n .red-icon { background: #fee2e2; color: #dc2626; }\n .slate-icon { background: #f1f5f9; color: #475569; }\n .kpi-label {\n font-size: 0.75rem; font-weight: 600; color: #64748b;\n text-transform: uppercase; letter-spacing: 0.04em;\n }\n .kpi-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; min-height: 36px; margin-bottom: 4px; }\n .kpi-ring { flex-shrink: 0; }\n /* Icon + ring: the ring sits in the card's top-right corner, level with the icon, so the ring adds no height (the label row is just the label). */\n .kpi-card.ring-corner .kpi-top { display: contents; }\n .kpi-card.ring-corner .kpi-ring { position: absolute; top: 12px; right: 12px; }\n .kpi-value { font-size: 1.5rem; font-weight: 700; color: #111827; line-height: 1.1; }\n .kpi-value.green-value { color: #16a34a; }\n .kpi-value.blue-value { color: #3b82f6; }\n .kpi-value.red-value { color: #dc2626; }\n .kpi-subtitle { font-size: 0.75rem; color: #64748b; margin-top: 2px; } /* slate-500: AA contrast on white */\n /* loading: the value / subtitle are replaced by grey placeholders of the SAME box (value line = 1.5rem x 1.1 line-height; the subtitle\n placeholder is the subtitle's own text made transparent), so the card keeps its size while loading. */\n .kpi-value--loading { display: flex; align-items: center; height: 1.65rem; }\n .kpi-bar { display: block; width: 60%; max-width: 8rem; height: 1.1rem; border-radius: 6px; background: #e2e8f0; animation: kpi-pulse 1.4s ease-in-out infinite; }\n .kpi-subtitle--loading {\n align-self: flex-start; max-width: 100%; border-radius: 4px; background: #e2e8f0; color: transparent;\n -webkit-user-select: none; user-select: none; animation: kpi-pulse 1.4s ease-in-out infinite;\n }\n /* \"Loading\" for assistive tech, visually hidden (the placeholders above are aria-hidden). */\n .kpi-loading-text { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }\n @keyframes kpi-pulse { 50% { opacity: 0.55; } }\n @media (prefers-reduced-motion: reduce) {\n .kpi-bar, .kpi-subtitle--loading { animation: none; }\n }\n `],\n})\nexport class KpiCardComponent {\n protected readonly labels = inject(UiLabelsService);\n private readonly sanitizer = inject(DomSanitizer);\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n\n readonly label = input('');\n readonly value = input('');\n readonly subtitle = input('');\n /** Built-in icon name (see KPI_ICONS keys), e.g. 'dollar', 'users', 'check-circle'. */\n readonly icon = input('');\n readonly color = input<KpiCardColor>('slate');\n readonly highlight = input(false);\n readonly clickable = input(false);\n readonly valueColor = input<KpiCardValueColor>('default');\n /**\n * (library source 2026-11-04, not yet published) While true the value (and the subtitle, when one is set) are replaced by grey\n * placeholders and the card is `aria-busy=\"true\"`; assistive tech reads the label followed by the `loadingLabel` text\n * (visually hidden), never the stale value or subtitle. The card keeps its size: the value placeholder has the value line's box and the\n * subtitle placeholder is the subtitle's own (transparent) text, so pass the subtitle you will show while loading to keep the height\n * identical. The progress ring (when there is one) stays visible but is hidden from assistive tech (`aria-hidden=\"true\"` on it) while loading, since its\n * value belongs to the data that is being replaced. Default false = unchanged. Everything else (icon, ring, `kpi-footer` slot, `clickable`, colours) is unaffected.\n */\n readonly loading = input(false);\n /** What assistive tech hears instead of the value while `loading` (default 'Loading'). */\n readonly loadingLabelInput = input<string | null>(null, { alias: 'loadingLabel' });\n readonly loadingLabel = computed(() => this.loadingLabelInput() ?? this.labels.t('kpiCard.loadingLabel'));\n /** Card background as any CSS colour (`#fef2f2`, `var(--surface)` …). Empty (default) = white. The text colours do not change, so use a light shade. */\n readonly background = input('');\n\n // ── Optional progress ring (top right, next to the label) — omit `progress` and the card is unchanged ──\n /** Completed amount shown as a `ui-progress-ring` beside the label. `null` (default) = no ring. */\n readonly progress = input<number | null>(null);\n /** Total for `progress` (default 100, so `progress` is a percentage). */\n readonly progressMax = input(100);\n /** Ring diameter in px. */\n readonly progressSize = input(58);\n readonly progressStrokeWidth = input(5);\n /** Fixed ring color; leave it out and the color follows completion (red / amber / blue / green). */\n readonly progressVariant = input<ProgressRingVariant | null | undefined>(null);\n /** Accessible name of the ring; default \"<label> progress\". */\n readonly progressAriaLabel = input('');\n /** Human reading of the ring for assistive tech, e.g. \"$200K of $300K\". */\n readonly progressValueText = input('');\n protected readonly hasProgress = computed(() => this.progress() !== null && this.progress() !== undefined);\n\n /** Enter / Space on a clickable card act like a click (Space would otherwise scroll the page). */\n protected onActivateKey(event: Event) {\n if (!this.clickable()) return;\n event.preventDefault();\n this.host.nativeElement.click();\n }\n\n protected readonly iconSvg = computed((): SafeHtml | null => {\n const svg = KPI_ICONS[this.icon()];\n return svg ? this.sanitizer.bypassSecurityTrustHtml(svg) : null;\n });\n}\n\n// Static, library-owned SVG markup only — never user input.\nconst KPI_ICONS: Record<string, string> = {\n 'shield-check': '<svg width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z\"/><path d=\"m9 12 2 2 4-4\"/></svg>',\n 'clock': '<svg width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><circle cx=\"12\" cy=\"12\" r=\"10\"/><polyline points=\"12 6 12 12 16 14\"/></svg>',\n 'alert-circle': '<svg width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><circle cx=\"12\" cy=\"12\" r=\"10\"/><line x1=\"12\" y1=\"8\" x2=\"12\" y2=\"12\"/><line x1=\"12\" y1=\"16\" x2=\"12.01\" y2=\"16\"/></svg>',\n 'alert-triangle': '<svg width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M10.29 3.86 1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z\"/><line x1=\"12\" y1=\"9\" x2=\"12\" y2=\"13\"/><line x1=\"12\" y1=\"17\" x2=\"12.01\" y2=\"17\"/></svg>',\n 'check-circle': '<svg width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M22 11.08V12a10 10 0 1 1-5.93-9.14\"/><polyline points=\"22 4 12 14.01 9 11.01\"/></svg>',\n 'users': '<svg width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2\"/><circle cx=\"9\" cy=\"7\" r=\"4\"/><path d=\"M23 21v-2a4 4 0 0 0-3-3.87\"/><path d=\"M16 3.13a4 4 0 0 1 0 7.75\"/></svg>',\n 'user': '<svg width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2\"/><circle cx=\"12\" cy=\"7\" r=\"4\"/></svg>',\n 'send': '<svg width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><line x1=\"22\" y1=\"2\" x2=\"11\" y2=\"13\"/><polygon points=\"22 2 15 22 11 13 2 9 22 2\"/></svg>',\n 'inbox': '<svg width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><polyline points=\"22 12 16 12 14 15 10 15 8 12 2 12\"/><path d=\"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z\"/></svg>',\n 'mail': '<svg width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><rect x=\"2\" y=\"4\" width=\"20\" height=\"16\" rx=\"2\"/><path d=\"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7\"/></svg>',\n 'message': '<svg width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z\"/></svg>',\n 'play': '<svg width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><polygon points=\"5 3 19 12 5 21 5 3\"/></svg>',\n 'eye': '<svg width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z\"/><circle cx=\"12\" cy=\"12\" r=\"3\"/></svg>',\n 'percent': '<svg width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><line x1=\"19\" y1=\"5\" x2=\"5\" y2=\"19\"/><circle cx=\"6.5\" cy=\"6.5\" r=\"2.5\"/><circle cx=\"17.5\" cy=\"17.5\" r=\"2.5\"/></svg>',\n 'dollar': '<svg width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><line x1=\"12\" y1=\"1\" x2=\"12\" y2=\"23\"/><path d=\"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6\"/></svg>',\n 'phone': '<svg width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z\"/></svg>',\n 'file': '<svg width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z\"/><polyline points=\"14 2 14 8 20 8\"/><line x1=\"16\" y1=\"13\" x2=\"8\" y2=\"13\"/><line x1=\"16\" y1=\"17\" x2=\"8\" y2=\"17\"/></svg>',\n 'target': '<svg width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><circle cx=\"12\" cy=\"12\" r=\"10\"/><circle cx=\"12\" cy=\"12\" r=\"6\"/><circle cx=\"12\" cy=\"12\" r=\"2\"/></svg>',\n 'trending-up': '<svg width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><polyline points=\"23 6 13.5 15.5 8.5 10.5 1 18\"/><polyline points=\"17 6 23 6 23 12\"/></svg>',\n 'x-circle': '<svg width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><circle cx=\"12\" cy=\"12\" r=\"10\"/><line x1=\"15\" y1=\"9\" x2=\"9\" y2=\"15\"/><line x1=\"9\" y1=\"9\" x2=\"15\" y2=\"15\"/></svg>',\n 'video': '<svg width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><rect x=\"2\" y=\"5\" width=\"14\" height=\"14\" rx=\"2\"/><path d=\"m16 10 6-3.5v11L16 14\"/></svg>',\n 'calendar': '<svg width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><rect x=\"3\" y=\"4\" width=\"18\" height=\"18\" rx=\"2\"/><line x1=\"16\" y1=\"2\" x2=\"16\" y2=\"6\"/><line x1=\"8\" y1=\"2\" x2=\"8\" y2=\"6\"/><line x1=\"3\" y1=\"10\" x2=\"21\" y2=\"10\"/></svg>',\n 'activity': '<svg width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><polyline points=\"22 12 18 12 15 21 9 3 6 12 2 12\"/></svg>',\n};\n"],"mappings":";;;;;AAmIA,IAAa,mBAAb,MAAa,iBAAgB;CA1G7B,cAAA;EA2GqB,KAAA,SAAS,OAAO,eAAe;EACjC,KAAA,YAAY,OAAO,YAAY;EAC/B,KAAA,OAAY,OAAgC,UAAU;EAE9D,KAAA,QAAa,MAAM,IAAG,GAAA,YAAA,CAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;EACtB,KAAA,QAAa,MAAM,IAAG,GAAA,YAAA,CAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;EACtB,KAAA,WAAa,MAAM,IAAG,GAAA,YAAA,CAAA,EAAA,WAAA,WAAA,CAAA,+BAAA,CAAA,CAAA;EAEtB,KAAA,OAAa,MAAM,IAAG,GAAA,YAAA,CAAA,EAAA,WAAA,OAAA,CAAA,+BAAA,CAAA,CAAA;EACtB,KAAA,QAAa,MAAoB,SAAQ,GAAA,YAAA,CAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;EACzC,KAAA,YAAa,MAAM,OAAM,GAAA,YAAA,CAAA,EAAA,WAAA,YAAA,CAAA,+BAAA,CAAA,CAAA;EACzB,KAAA,YAAa,MAAM,OAAM,GAAA,YAAA,CAAA,EAAA,WAAA,YAAA,CAAA,+BAAA,CAAA,CAAA;EACzB,KAAA,aAAa,MAAyB,WAAU,GAAA,YAAA,CAAA,EAAA,WAAA,aAAA,CAAA,+BAAA,CAAA,CAAA;EAShD,KAAA,UAAa,MAAM,OAAM,GAAA,YAAA,CAAA,EAAA,WAAA,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CAAA;EA1G5B,MAAA;EACW,MAAA,CAAA;GAAA,UAAA;GAAa,YACX;GAAI,SACP,CAAC,qBAAqB;GAAC,iBACf,wBAAwB;GAAM,MACzC;IACJ,eAAe;IACf,oBAAoB;IACpB,mBAAmB;IACnB,mBAAmB;IACnB,mBAAmB;GACpB;GAAA,UACS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCT,QAAA,CAAA,20EAAA;EAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuHH,MAAM,YAAoC;CACxC,gBAAgB;CAChB,SAAS;CACT,gBAAgB;CAChB,kBAAkB;CAClB,gBAAgB;CAChB,SAAS;CACT,QAAQ;CACR,QAAQ;CACR,SAAS;CACT,QAAQ;CACR,WAAW;CACX,QAAQ;CACR,OAAO;CACP,WAAW;CACX,UAAU;CACV,SAAS;CACT,QAAQ;CACR,UAAU;CACV,eAAe;CACf,YAAY;CACZ,SAAS;CACT,YAAY;CACZ,YAAY;AACb"}
1
+ {"version":3,"file":"forgeroute-ui-kpi-card.mjs","names":[],"sources":["../../../projects/forgeroute-ui/kpi-card/src/lib/kpi-card/kpi-card.component.ts"],"sourcesContent":["import { Component, ChangeDetectionStrategy, ElementRef, computed, inject, input } from '@angular/core';\nimport { DomSanitizer, SafeHtml } from '@angular/platform-browser';\nimport { ProgressRingComponent, ProgressRingVariant } from '@forgeroute/ui/progress-ring';\nimport { UiLabelsService } from '@forgeroute/ui/core';\n\nexport type KpiCardColor = 'green' | 'blue' | 'amber' | 'orange' | 'red' | 'slate';\n/** Colour of the big value: `default` (dark slate), `green`, `blue`, or `red` (for figures that need attention: overdue, outstanding, failed). */\nexport type KpiCardValueColor = 'default' | 'green' | 'blue' | 'red';\n\n/**\n * Compact KPI summary card: optional icon, uppercase label, large value, optional subtitle.\n * Set `clickable` to show a hover state + chevron (bind `(click)` on the host). A clickable card is a keyboard button:\n * role=\"button\", focusable (tabindex 0, visible focus ring), and Enter / Space fire the host's (click). Give it an\n * accessible name with [attr.aria-label] when the label alone isn't enough (e.g. \"Net Commission: $12.5K — show details\").\n *\n * Optional background: `background=\"#fef2f2\"` fills the card with any CSS colour (default white), e.g. a soft red for money going out; the\n * text keeps its own colours, so pick a light shade.\n *\n * Optional ring (top-right corner, level with the icon when the card has one — no extra height; beside the label otherwise): `[progress]=\"67\"` (+ `progressMax`, `progressVariant`, `progressSize`) draws a ui-progress-ring beside the label; extra lines\n * (a pace badge, a projection…) go in an element with the `kpi-footer` attribute.\n *\n * <ui-kpi-card label=\"Deals Closed\" [value]=\"'' + deals\" subtitle=\"Year to Date\" icon=\"check-circle\" color=\"blue\" />\n * <ui-kpi-card label=\"Net Commission\" [value]=\"net\" icon=\"dollar\" color=\"green\" [highlight]=\"true\"\n * [clickable]=\"true\" (click)=\"openDetails()\" />\n */\n@Component({\n selector: 'ui-kpi-card',\n standalone: true,\n imports: [ProgressRingComponent],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[attr.role]': 'clickable() ? \"button\" : null',\n '[attr.aria-busy]': 'loading() ? \"true\" : null',\n '[attr.tabindex]': 'clickable() ? 0 : null',\n '(keydown.enter)': 'onActivateKey($event)',\n '(keydown.space)': 'onActivateKey($event)',\n },\n template: `\n <div class=\"kpi-card\" [class.highlight]=\"highlight()\" [class.clickable]=\"clickable()\" [class.ring-corner]=\"hasProgress() && !!iconSvg()\" [style.background]=\"background() || null\">\n @if (iconSvg()) {\n <div [class]=\"'kpi-icon ' + color() + '-icon'\" aria-hidden=\"true\" [innerHTML]=\"iconSvg()\"></div>\n }\n @if (hasProgress()) {\n <div class=\"kpi-top\">\n <span class=\"kpi-label\" data-testid=\"kpi-label\">{{ label() }}</span>\n <ui-progress-ring class=\"kpi-ring\" [attr.aria-hidden]=\"loading() ? 'true' : null\" [value]=\"progress()!\" [max]=\"progressMax()\" [size]=\"progressSize()\" [strokeWidth]=\"progressStrokeWidth()\"\n [variant]=\"progressVariant()\" [ariaLabel]=\"progressAriaLabel() || labels.t('kpiCard.progress', { label: label() })\" [valueText]=\"progressValueText()\" />\n </div>\n } @else {\n <span class=\"kpi-label\" data-testid=\"kpi-label\">{{ label() }}</span>\n }\n @if (loading()) {\n <span class=\"kpi-value kpi-value--loading\" aria-hidden=\"true\" data-testid=\"kpi-value-placeholder\"><span class=\"kpi-bar\"></span></span>\n <span class=\"kpi-loading-text\">{{ loadingLabel() }}</span>\n @if (subtitle()) {\n <span class=\"kpi-subtitle kpi-subtitle--loading\" aria-hidden=\"true\" data-testid=\"kpi-subtitle-placeholder\">{{ subtitle() }}</span>\n }\n } @else {\n <span class=\"kpi-value\" data-testid=\"kpi-value\"\n [class.green-value]=\"highlight() || valueColor() === 'green'\"\n [class.blue-value]=\"valueColor() === 'blue'\"\n [class.red-value]=\"valueColor() === 'red'\">{{ value() }}</span>\n @if (subtitle()) {\n <span class=\"kpi-subtitle\">{{ subtitle() }}</span>\n }\n }\n <ng-content select=\"[kpi-footer]\" />\n @if (clickable()) {\n <svg class=\"kpi-arrow\" width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><polyline points=\"9 18 15 12 9 6\"/></svg>\n }\n </div>\n `,\n styles: [`\n :host { display: block; height: 100%; }\n .kpi-card {\n position: relative;\n background: #fff; border: 1px solid #e2e8f0; border-radius: 10px;\n padding: 16px; display: flex; flex-direction: column; gap: 4px; min-width: 0;\n height: 100%; box-sizing: border-box;\n transition: border-color 150ms ease, box-shadow 150ms ease;\n }\n :host(:focus) { outline: none; }\n :host(:focus-visible) .kpi-card { outline: 2px solid #3b82f6; outline-offset: 2px; }\n .kpi-card.clickable { cursor: pointer; }\n .kpi-card.clickable:hover { border-color: #93c5fd; box-shadow: 0 2px 8px rgba(59,130,246,0.08); }\n .kpi-card.clickable:hover .kpi-arrow { color: #3b82f6; transform: translateY(-50%) translateX(2px); }\n .kpi-arrow {\n position: absolute; top: 50%; right: 16px; transform: translateY(-50%);\n color: #94a3b8; transition: color 150ms ease, transform 150ms ease;\n }\n .kpi-icon {\n flex-shrink: 0; width: 36px; height: 36px; border-radius: 8px;\n display: flex; align-items: center; justify-content: center;\n margin-bottom: 8px;\n }\n .green-icon { background: #dcfce7; color: #16a34a; }\n .blue-icon { background: #dbeafe; color: #2563eb; }\n .amber-icon { background: #fef3c7; color: #d97706; }\n .orange-icon { background: #ffedd5; color: #c2410c; }\n .red-icon { background: #fee2e2; color: #dc2626; }\n .slate-icon { background: #f1f5f9; color: #475569; }\n .kpi-label {\n font-size: 0.75rem; font-weight: 600; color: #64748b;\n text-transform: uppercase; letter-spacing: 0.04em;\n }\n .kpi-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; min-height: 36px; margin-bottom: 4px; }\n .kpi-ring { flex-shrink: 0; }\n /* Icon + ring: the ring sits in the card's top-right corner, level with the icon, so the ring adds no height (the label row is just the label). */\n .kpi-card.ring-corner .kpi-top { display: contents; }\n .kpi-card.ring-corner .kpi-ring { position: absolute; top: 12px; right: 12px; }\n .kpi-value { font-size: 1.5rem; font-weight: 700; color: #111827; line-height: 1.1; }\n .kpi-value.green-value { color: #16a34a; }\n .kpi-value.blue-value { color: #3b82f6; }\n .kpi-value.red-value { color: #dc2626; }\n .kpi-subtitle { font-size: 0.75rem; color: #64748b; margin-top: 2px; } /* slate-500: AA contrast on white */\n /* loading: the value / subtitle are replaced by grey placeholders of the SAME box (value line = 1.5rem x 1.1 line-height; the subtitle\n placeholder is the subtitle's own text made transparent), so the card keeps its size while loading. */\n .kpi-value--loading { display: flex; align-items: center; height: 1.65rem; }\n .kpi-bar { display: block; width: 60%; max-width: 8rem; height: 1.1rem; border-radius: 6px; background: #e2e8f0; animation: kpi-pulse 1.4s ease-in-out infinite; }\n .kpi-subtitle--loading {\n align-self: flex-start; max-width: 100%; border-radius: 4px; background: #e2e8f0; color: transparent;\n -webkit-user-select: none; user-select: none; animation: kpi-pulse 1.4s ease-in-out infinite;\n }\n /* \"Loading\" for assistive tech, visually hidden (the placeholders above are aria-hidden). */\n .kpi-loading-text { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }\n @keyframes kpi-pulse { 50% { opacity: 0.55; } }\n @media (prefers-reduced-motion: reduce) {\n .kpi-bar, .kpi-subtitle--loading { animation: none; }\n }\n `],\n})\nexport class KpiCardComponent {\n protected readonly labels = inject(UiLabelsService);\n private readonly sanitizer = inject(DomSanitizer);\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n\n readonly label = input('');\n readonly value = input('');\n readonly subtitle = input('');\n /** Built-in icon name (see KPI_ICONS keys), e.g. 'dollar', 'users', 'check-circle'. */\n readonly icon = input('');\n readonly color = input<KpiCardColor>('slate');\n readonly highlight = input(false);\n readonly clickable = input(false);\n readonly valueColor = input<KpiCardValueColor>('default');\n /**\n * (library source 2026-11-04, not yet published) While true the value (and the subtitle, when one is set) are replaced by grey\n * placeholders and the card is `aria-busy=\"true\"`; assistive tech reads the label followed by the `loadingLabel` text\n * (visually hidden), never the stale value or subtitle. The card keeps its size: the value placeholder has the value line's box and the\n * subtitle placeholder is the subtitle's own (transparent) text, so pass the subtitle you will show while loading to keep the height\n * identical. The progress ring (when there is one) stays visible but is hidden from assistive tech (`aria-hidden=\"true\"` on it) while loading, since its\n * value belongs to the data that is being replaced. Default false = unchanged. Everything else (icon, ring, `kpi-footer` slot, `clickable`, colours) is unaffected.\n */\n readonly loading = input(false);\n /** What assistive tech hears instead of the value while `loading` (default 'Loading'). */\n readonly loadingLabelInput = input<string | null>(null, { alias: 'loadingLabel' });\n readonly loadingLabel = computed(() => this.loadingLabelInput() ?? this.labels.t('kpiCard.loadingLabel'));\n /** Card background as any CSS colour (`#fef2f2`, `var(--surface)` …). Empty (default) = white. The text colours do not change, so use a light shade. */\n readonly background = input('');\n\n // ── Optional progress ring (top right, next to the label) — omit `progress` and the card is unchanged ──\n /** Completed amount shown as a `ui-progress-ring` beside the label. `null` (default) = no ring. */\n readonly progress = input<number | null>(null);\n /** Total for `progress` (default 100, so `progress` is a percentage). */\n readonly progressMax = input(100);\n /** Ring diameter in px. */\n readonly progressSize = input(58);\n readonly progressStrokeWidth = input(5);\n /** Fixed ring color; leave it out and the color follows completion (red / amber / blue / green). */\n readonly progressVariant = input<ProgressRingVariant | null | undefined>(null);\n /** Accessible name of the ring; default \"<label> progress\". */\n readonly progressAriaLabel = input('');\n /** Human reading of the ring for assistive tech, e.g. \"$200K of $300K\". */\n readonly progressValueText = input('');\n protected readonly hasProgress = computed(() => this.progress() !== null && this.progress() !== undefined);\n\n /** Enter / Space on a clickable card act like a click (Space would otherwise scroll the page). */\n protected onActivateKey(event: Event) {\n if (!this.clickable()) return;\n event.preventDefault();\n this.host.nativeElement.click();\n }\n\n protected readonly iconSvg = computed((): SafeHtml | null => {\n const svg = KPI_ICONS[this.icon()];\n return svg ? this.sanitizer.bypassSecurityTrustHtml(svg) : null;\n });\n}\n\n// Static, library-owned SVG markup only — never user input.\nconst KPI_ICONS: Record<string, string> = {\n 'shield-check': '<svg width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z\"/><path d=\"m9 12 2 2 4-4\"/></svg>',\n 'clock': '<svg width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><circle cx=\"12\" cy=\"12\" r=\"10\"/><polyline points=\"12 6 12 12 16 14\"/></svg>',\n 'alert-circle': '<svg width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><circle cx=\"12\" cy=\"12\" r=\"10\"/><line x1=\"12\" y1=\"8\" x2=\"12\" y2=\"12\"/><line x1=\"12\" y1=\"16\" x2=\"12.01\" y2=\"16\"/></svg>',\n 'alert-triangle': '<svg width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M10.29 3.86 1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z\"/><line x1=\"12\" y1=\"9\" x2=\"12\" y2=\"13\"/><line x1=\"12\" y1=\"17\" x2=\"12.01\" y2=\"17\"/></svg>',\n 'check-circle': '<svg width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M22 11.08V12a10 10 0 1 1-5.93-9.14\"/><polyline points=\"22 4 12 14.01 9 11.01\"/></svg>',\n 'users': '<svg width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2\"/><circle cx=\"9\" cy=\"7\" r=\"4\"/><path d=\"M23 21v-2a4 4 0 0 0-3-3.87\"/><path d=\"M16 3.13a4 4 0 0 1 0 7.75\"/></svg>',\n 'user': '<svg width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2\"/><circle cx=\"12\" cy=\"7\" r=\"4\"/></svg>',\n 'send': '<svg width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><line x1=\"22\" y1=\"2\" x2=\"11\" y2=\"13\"/><polygon points=\"22 2 15 22 11 13 2 9 22 2\"/></svg>',\n 'inbox': '<svg width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><polyline points=\"22 12 16 12 14 15 10 15 8 12 2 12\"/><path d=\"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z\"/></svg>',\n 'mail': '<svg width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><rect x=\"2\" y=\"4\" width=\"20\" height=\"16\" rx=\"2\"/><path d=\"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7\"/></svg>',\n 'message': '<svg width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z\"/></svg>',\n 'play': '<svg width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><polygon points=\"5 3 19 12 5 21 5 3\"/></svg>',\n 'eye': '<svg width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z\"/><circle cx=\"12\" cy=\"12\" r=\"3\"/></svg>',\n 'percent': '<svg width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><line x1=\"19\" y1=\"5\" x2=\"5\" y2=\"19\"/><circle cx=\"6.5\" cy=\"6.5\" r=\"2.5\"/><circle cx=\"17.5\" cy=\"17.5\" r=\"2.5\"/></svg>',\n 'dollar': '<svg width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><line x1=\"12\" y1=\"1\" x2=\"12\" y2=\"23\"/><path d=\"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6\"/></svg>',\n 'phone': '<svg width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z\"/></svg>',\n 'file': '<svg width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z\"/><polyline points=\"14 2 14 8 20 8\"/><line x1=\"16\" y1=\"13\" x2=\"8\" y2=\"13\"/><line x1=\"16\" y1=\"17\" x2=\"8\" y2=\"17\"/></svg>',\n 'target': '<svg width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><circle cx=\"12\" cy=\"12\" r=\"10\"/><circle cx=\"12\" cy=\"12\" r=\"6\"/><circle cx=\"12\" cy=\"12\" r=\"2\"/></svg>',\n 'trending-up': '<svg width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><polyline points=\"23 6 13.5 15.5 8.5 10.5 1 18\"/><polyline points=\"17 6 23 6 23 12\"/></svg>',\n 'x-circle': '<svg width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><circle cx=\"12\" cy=\"12\" r=\"10\"/><line x1=\"15\" y1=\"9\" x2=\"9\" y2=\"15\"/><line x1=\"9\" y1=\"9\" x2=\"15\" y2=\"15\"/></svg>',\n 'video': '<svg width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><rect x=\"2\" y=\"5\" width=\"14\" height=\"14\" rx=\"2\"/><path d=\"m16 10 6-3.5v11L16 14\"/></svg>',\n 'calendar': '<svg width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><rect x=\"3\" y=\"4\" width=\"18\" height=\"18\" rx=\"2\"/><line x1=\"16\" y1=\"2\" x2=\"16\" y2=\"6\"/><line x1=\"8\" y1=\"2\" x2=\"8\" y2=\"6\"/><line x1=\"3\" y1=\"10\" x2=\"21\" y2=\"10\"/></svg>',\n 'activity': '<svg width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><polyline points=\"22 12 18 12 15 21 9 3 6 12 2 12\"/></svg>',\n};\n"],"mappings":";;;;;AAmIA,IAAa,mBAAb,MAAa,iBAAgB;CA1G7B,cAAA;EA2GqB,KAAA,SAAS,OAAO,eAAe;EACjC,KAAA,YAAY,OAAO,YAAY;EAC/B,KAAA,OAAY,OAAgC,UAAU;EAE9D,KAAA,QAAa,MAAM,IAAG,GAAA,YAAA,CAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;EACtB,KAAA,QAAa,MAAM,IAAG,GAAA,YAAA,CAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;EACtB,KAAA,WAAa,MAAM,IAAG,GAAA,YAAA,CAAA,EAAA,WAAA,WAAA,CAAA,+BAAA,CAAA,CAAA;EAEtB,KAAA,OAAa,MAAM,IAAG,GAAA,YAAA,CAAA,EAAA,WAAA,OAAA,CAAA,+BAAA,CAAA,CAAA;EACtB,KAAA,QAAa,MAAoB,SAAQ,GAAA,YAAA,CAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;EACzC,KAAA,YAAa,MAAM,OAAM,GAAA,YAAA,CAAA,EAAA,WAAA,YAAA,CAAA,+BAAA,CAAA,CAAA;EACzB,KAAA,YAAa,MAAM,OAAM,GAAA,YAAA,CAAA,EAAA,WAAA,YAAA,CAAA,+BAAA,CAAA,CAAA;EACzB,KAAA,aAAa,MAAyB,WAAU,GAAA,YAAA,CAAA,EAAA,WAAA,aAAA,CAAA,+BAAA,CAAA,CAAA;EAShD,KAAA,UAAa,MAAM,OAAM,GAAA,YAAA,CAAA,EAAA,WAAA,UAAA,CAAA,+BAAA,CAAA,CAAA;E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CAAA;GAAA,UAAA;GAAa,YACX;GAAI,SACP,CAAC,qBAAqB;GAAC,iBACf,wBAAwB;GAAM,MACzC;IACJ,eAAe;IACf,oBAAoB;IACpB,mBAAmB;IACnB,mBAAmB;IACnB,mBAAmB;GACpB;GAAA,UACS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCT,QAAA,CAAA,m3EAAA;EAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuHH,MAAM,YAAoC;CACxC,gBAAgB;CAChB,SAAS;CACT,gBAAgB;CAChB,kBAAkB;CAClB,gBAAgB;CAChB,SAAS;CACT,QAAQ;CACR,QAAQ;CACR,SAAS;CACT,QAAQ;CACR,WAAW;CACX,QAAQ;CACR,OAAO;CACP,WAAW;CACX,UAAU;CACV,SAAS;CACT,QAAQ;CACR,UAAU;CACV,eAAe;CACf,YAAY;CACZ,SAAS;CACT,YAAY;CACZ,YAAY;AACb"}
@@ -9,7 +9,7 @@ import { EmptyStateComponent } from "@forgeroute/ui/empty-state";
9
9
  import { PaginationComponent } from "@forgeroute/ui/pagination";
10
10
  import { AvatarComponent } from "@forgeroute/ui/avatar";
11
11
  import { TextareaInputComponent } from "@forgeroute/ui/textarea-input";
12
- import { IconComponent } from "@forgeroute/ui/icon";
12
+ import { TooltipDirective } from "@forgeroute/ui/tooltip";
13
13
  import { LiveRegionComponent } from "@forgeroute/ui/live-region";
14
14
  const NOTES_MAX_LENGTH = 1e4;
15
15
  const STATE_RANK = {
@@ -402,9 +402,13 @@ var NotesComponent = class NotesComponent {
402
402
  @if (!readOnly() && editingId() !== note.id && !note.queued) {
403
403
  <div class="note-actions">
404
404
  @if (editable()) {
405
- <ui-icon name="edit" [size]="14" [tooltip]="labels.t('notes.editNote')" (iconClick)="startEdit(note)" />
405
+ <button class="note-icon-btn note-icon-btn--edit" type="button" [attr.aria-label]="labels.t('notes.editNote')" [uiTooltip]="labels.t('notes.editNote')" (click)="startEdit(note)">
406
+ <svg width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path d="M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7 M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z" /></svg>
407
+ </button>
406
408
  }
407
- <ui-icon name="delete" variant="danger" [size]="14" [tooltip]="labels.t('notes.deleteNote')" (iconClick)="confirmDelete(note.id)" />
409
+ <button class="note-icon-btn note-icon-btn--delete" type="button" [attr.aria-label]="labels.t('notes.deleteNote')" [uiTooltip]="labels.t('notes.deleteNote')" (click)="confirmDelete(note.id)">
410
+ <svg width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path d="M3 6h18 M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2 M19 6l-1 14a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2L5 6 M10 11v6 M14 11v6" /></svg>
411
+ </button>
408
412
  </div>
409
413
  }
410
414
  </div>
@@ -431,7 +435,7 @@ var NotesComponent = class NotesComponent {
431
435
  </ui-modal>
432
436
  `,
433
437
  isInline: true,
434
- styles: [":host{display:block}.note-add{padding:14px;margin-bottom:18px;background:#f8fafc;border:1px solid #e2e8f0;border-radius:12px}.note-add-footer{display:flex;justify-content:flex-end;margin-top:10px}.note-offline-hint{margin:0 0 12px;font-size:.875rem;color:#475569}.note-loading{padding:24px 0;font-size:.875rem;color:#64748b;text-align:center}.note-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:10px}.note-item{display:flex;gap:12px;padding:14px;background:#fff;border:1px solid #e2e8f0;border-radius:12px;transition:border-color .15s,box-shadow .15s}@media(hover:hover){.note-item:hover{border-color:#cbd5e1;box-shadow:0 1px 3px #0f172a0f}}.note-item.editing{background:#f8fafc;border-color:#bfdbfe}@media(prefers-reduced-motion:reduce){.note-item{transition:none}}.note-avatar{flex-shrink:0}.note-main{flex:1;min-width:0;display:flex;flex-direction:column;gap:6px}.note-head{display:flex;align-items:center;flex-wrap:wrap;gap:2px 6px;min-height:28px}.note-author{font-size:.875rem;font-weight:600;color:#0f172a}.note-dot{color:#94a3b8;font-size:.75rem}.note-date{font-size:.75rem;color:#64748b}.note-edited{font-size:.75rem;font-style:italic;color:#64748b}.note-queued{font-size:.75rem;font-weight:500;color:#475569;background:#f1f5f9;border:1px dashed #94a3b8;border-radius:999px;padding:1px 8px}.note-queued-bad{color:#991b1b;background:#fef2f2;border:1px solid #b91c1c;font-weight:700}.note-actions{display:flex;align-items:center;gap:2px;margin-left:auto}.note-body{margin:0;font-size:.9375rem;line-height:1.6;color:#1e293b;white-space:pre-wrap;overflow-wrap:anywhere;word-break:break-word}.note-item-footer{display:flex;justify-content:flex-end;gap:8px;margin-top:4px}.note-delete-msg{margin:0;font-size:.9375rem;line-height:1.5;color:#334155}@media(max-width:480px){.note-item{padding:12px;gap:10px}.note-add{padding:12px}}\n"],
438
+ styles: [":host{display:block}.note-add{padding:14px;margin-bottom:18px;background:#f8fafc;border:1px solid #e2e8f0;border-radius:12px}.note-add-footer{display:flex;justify-content:flex-end;margin-top:10px}.note-offline-hint{margin:0 0 12px;font-size:.875rem;color:#475569}.note-loading{padding:24px 0;font-size:.875rem;color:#64748b;text-align:center}.note-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:10px}.note-item{display:flex;gap:12px;padding:14px;background:#fff;border:1px solid #e2e8f0;border-radius:12px;transition:border-color .15s,box-shadow .15s}@media(hover:hover){.note-item:hover{border-color:#cbd5e1;box-shadow:0 1px 3px #0f172a0f}}.note-item.editing{background:#f8fafc;border-color:#bfdbfe}@media(prefers-reduced-motion:reduce){.note-item{transition:none}}.note-avatar{flex-shrink:0}.note-main{flex:1;min-width:0;display:flex;flex-direction:column;gap:6px}.note-head{display:flex;align-items:center;flex-wrap:wrap;gap:2px 6px;min-height:28px}.note-author{font-size:.875rem;font-weight:600;color:#0f172a}.note-dot{color:#94a3b8;font-size:.75rem}.note-date{font-size:.75rem;color:#64748b}.note-edited{font-size:.75rem;font-style:italic;color:#64748b}.note-queued{font-size:.75rem;font-weight:500;color:#475569;background:#f1f5f9;border:1px dashed #94a3b8;border-radius:999px;padding:1px 8px}.note-queued-bad{color:#991b1b;background:#fef2f2;border:1px solid #b91c1c;font-weight:700}.note-actions{display:flex;align-items:center;gap:6px;margin-left:auto}.note-icon-btn{position:relative;display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;width:26px;height:26px;padding:0;line-height:1;background:none;cursor:pointer;border-radius:6px;transition:background .15s,color .15s,border-color .15s}.note-icon-btn:after{content:\"\";position:absolute;top:50%;left:50%;width:44px;height:44px;transform:translate(-50%,-50%)}.note-icon-btn--edit{color:#64748b;border:1px solid #e2e8f0}.note-icon-btn--edit:hover{background:#f1f5f9;color:#1e293b}.note-icon-btn--delete{color:#b91c1c;border:1px solid #fecaca}.note-icon-btn--delete:hover{background:#fef2f2;border-color:#fca5a5;color:#991b1b}.note-icon-btn:focus-visible{outline:2px solid #2563eb;outline-offset:2px}.note-body{margin:0;font-size:.9375rem;line-height:1.6;color:#1e293b;white-space:pre-wrap;overflow-wrap:anywhere;word-break:break-word}.note-item-footer{display:flex;justify-content:flex-end;gap:8px;margin-top:4px}.note-delete-msg{margin:0;font-size:.9375rem;line-height:1.5;color:#334155}@media(max-width:480px){.note-item{padding:12px;gap:10px}.note-add{padding:12px}}\n"],
435
439
  dependencies: [
436
440
  {
437
441
  kind: "ngmodule",
@@ -565,20 +569,10 @@ var NotesComponent = class NotesComponent {
565
569
  ]
566
570
  },
567
571
  {
568
- kind: "component",
569
- type: IconComponent,
570
- selector: "ui-icon",
571
- inputs: [
572
- "name",
573
- "tooltip",
574
- "ariaLabel",
575
- "size",
576
- "variant",
577
- "disabled",
578
- "loading",
579
- "interactive"
580
- ],
581
- outputs: ["iconClick"]
572
+ kind: "directive",
573
+ type: TooltipDirective,
574
+ selector: "[uiTooltip]",
575
+ inputs: ["uiTooltip", "tooltipPosition"]
582
576
  },
583
577
  {
584
578
  kind: "component",
@@ -629,7 +623,7 @@ i0.ɵɵngDeclareClassMetadata({
629
623
  EmptyStateComponent,
630
624
  PaginationComponent,
631
625
  TextareaInputComponent,
632
- IconComponent,
626
+ TooltipDirective,
633
627
  AvatarComponent,
634
628
  LiveRegionComponent
635
629
  ],
@@ -677,9 +671,13 @@ i0.ɵɵngDeclareClassMetadata({
677
671
  @if (!readOnly() && editingId() !== note.id && !note.queued) {
678
672
  <div class="note-actions">
679
673
  @if (editable()) {
680
- <ui-icon name="edit" [size]="14" [tooltip]="labels.t('notes.editNote')" (iconClick)="startEdit(note)" />
674
+ <button class="note-icon-btn note-icon-btn--edit" type="button" [attr.aria-label]="labels.t('notes.editNote')" [uiTooltip]="labels.t('notes.editNote')" (click)="startEdit(note)">
675
+ <svg width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path d="M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7 M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z" /></svg>
676
+ </button>
681
677
  }
682
- <ui-icon name="delete" variant="danger" [size]="14" [tooltip]="labels.t('notes.deleteNote')" (iconClick)="confirmDelete(note.id)" />
678
+ <button class="note-icon-btn note-icon-btn--delete" type="button" [attr.aria-label]="labels.t('notes.deleteNote')" [uiTooltip]="labels.t('notes.deleteNote')" (click)="confirmDelete(note.id)">
679
+ <svg width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path d="M3 6h18 M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2 M19 6l-1 14a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2L5 6 M10 11v6 M14 11v6" /></svg>
680
+ </button>
683
681
  </div>
684
682
  }
685
683
  </div>
@@ -705,7 +703,7 @@ i0.ɵɵngDeclareClassMetadata({
705
703
  <ui-button modal-footer-right variant="danger" size="sm" data-testid="delete-note-confirm" [loading]="saving()" (click)="deleteNote()">{{ labels.t('notes.deleteNote2') }}</ui-button>
706
704
  </ui-modal>
707
705
  `,
708
- styles: [":host{display:block}.note-add{padding:14px;margin-bottom:18px;background:#f8fafc;border:1px solid #e2e8f0;border-radius:12px}.note-add-footer{display:flex;justify-content:flex-end;margin-top:10px}.note-offline-hint{margin:0 0 12px;font-size:.875rem;color:#475569}.note-loading{padding:24px 0;font-size:.875rem;color:#64748b;text-align:center}.note-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:10px}.note-item{display:flex;gap:12px;padding:14px;background:#fff;border:1px solid #e2e8f0;border-radius:12px;transition:border-color .15s,box-shadow .15s}@media(hover:hover){.note-item:hover{border-color:#cbd5e1;box-shadow:0 1px 3px #0f172a0f}}.note-item.editing{background:#f8fafc;border-color:#bfdbfe}@media(prefers-reduced-motion:reduce){.note-item{transition:none}}.note-avatar{flex-shrink:0}.note-main{flex:1;min-width:0;display:flex;flex-direction:column;gap:6px}.note-head{display:flex;align-items:center;flex-wrap:wrap;gap:2px 6px;min-height:28px}.note-author{font-size:.875rem;font-weight:600;color:#0f172a}.note-dot{color:#94a3b8;font-size:.75rem}.note-date{font-size:.75rem;color:#64748b}.note-edited{font-size:.75rem;font-style:italic;color:#64748b}.note-queued{font-size:.75rem;font-weight:500;color:#475569;background:#f1f5f9;border:1px dashed #94a3b8;border-radius:999px;padding:1px 8px}.note-queued-bad{color:#991b1b;background:#fef2f2;border:1px solid #b91c1c;font-weight:700}.note-actions{display:flex;align-items:center;gap:2px;margin-left:auto}.note-body{margin:0;font-size:.9375rem;line-height:1.6;color:#1e293b;white-space:pre-wrap;overflow-wrap:anywhere;word-break:break-word}.note-item-footer{display:flex;justify-content:flex-end;gap:8px;margin-top:4px}.note-delete-msg{margin:0;font-size:.9375rem;line-height:1.5;color:#334155}@media(max-width:480px){.note-item{padding:12px;gap:10px}.note-add{padding:12px}}\n"]
706
+ styles: [":host{display:block}.note-add{padding:14px;margin-bottom:18px;background:#f8fafc;border:1px solid #e2e8f0;border-radius:12px}.note-add-footer{display:flex;justify-content:flex-end;margin-top:10px}.note-offline-hint{margin:0 0 12px;font-size:.875rem;color:#475569}.note-loading{padding:24px 0;font-size:.875rem;color:#64748b;text-align:center}.note-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:10px}.note-item{display:flex;gap:12px;padding:14px;background:#fff;border:1px solid #e2e8f0;border-radius:12px;transition:border-color .15s,box-shadow .15s}@media(hover:hover){.note-item:hover{border-color:#cbd5e1;box-shadow:0 1px 3px #0f172a0f}}.note-item.editing{background:#f8fafc;border-color:#bfdbfe}@media(prefers-reduced-motion:reduce){.note-item{transition:none}}.note-avatar{flex-shrink:0}.note-main{flex:1;min-width:0;display:flex;flex-direction:column;gap:6px}.note-head{display:flex;align-items:center;flex-wrap:wrap;gap:2px 6px;min-height:28px}.note-author{font-size:.875rem;font-weight:600;color:#0f172a}.note-dot{color:#94a3b8;font-size:.75rem}.note-date{font-size:.75rem;color:#64748b}.note-edited{font-size:.75rem;font-style:italic;color:#64748b}.note-queued{font-size:.75rem;font-weight:500;color:#475569;background:#f1f5f9;border:1px dashed #94a3b8;border-radius:999px;padding:1px 8px}.note-queued-bad{color:#991b1b;background:#fef2f2;border:1px solid #b91c1c;font-weight:700}.note-actions{display:flex;align-items:center;gap:6px;margin-left:auto}.note-icon-btn{position:relative;display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;width:26px;height:26px;padding:0;line-height:1;background:none;cursor:pointer;border-radius:6px;transition:background .15s,color .15s,border-color .15s}.note-icon-btn:after{content:\"\";position:absolute;top:50%;left:50%;width:44px;height:44px;transform:translate(-50%,-50%)}.note-icon-btn--edit{color:#64748b;border:1px solid #e2e8f0}.note-icon-btn--edit:hover{background:#f1f5f9;color:#1e293b}.note-icon-btn--delete{color:#b91c1c;border:1px solid #fecaca}.note-icon-btn--delete:hover{background:#fef2f2;border-color:#fca5a5;color:#991b1b}.note-icon-btn:focus-visible{outline:2px solid #2563eb;outline-offset:2px}.note-body{margin:0;font-size:.9375rem;line-height:1.6;color:#1e293b;white-space:pre-wrap;overflow-wrap:anywhere;word-break:break-word}.note-item-footer{display:flex;justify-content:flex-end;gap:8px;margin-top:4px}.note-delete-msg{margin:0;font-size:.9375rem;line-height:1.5;color:#334155}@media(max-width:480px){.note-item{padding:12px;gap:10px}.note-add{padding:12px}}\n"]
709
707
  }]
710
708
  }],
711
709
  ctorParameters: () => [],