@forgeroute/ui 0.5.29 → 0.5.31
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.
- package/fesm2022/forgeroute-ui-card-list-item.mjs +18 -2
- package/fesm2022/forgeroute-ui-card-list-item.mjs.map +1 -1
- package/fesm2022/forgeroute-ui-core.mjs +34 -6
- package/fesm2022/forgeroute-ui-core.mjs.map +1 -1
- package/fesm2022/forgeroute-ui-icon.mjs +7 -6
- package/fesm2022/forgeroute-ui-icon.mjs.map +1 -1
- package/package.json +1 -1
- package/types/forgeroute-ui-card-list-item.d.ts +7 -0
- package/types/forgeroute-ui-core.d.ts +17 -11
- package/types/forgeroute-ui-icon.d.ts +2 -0
- package/types/forgeroute-ui-messaging.d.ts +1 -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;C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AA;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,UArDd;;;;;;;;;;;;;;;;;;;;;;;;GAuBT,UAAA;GAAA,QAAA,CAAA,8pCAAA;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;;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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6 +97,8 @@ export declare class CardListItemComponent {
|
|
|
97
97
|
/** Icon of the `actionLabel` chip: the `d` value of a 24x24 stroke path (like the Edit / View / delete chips, which always have one). Empty = no icon. */
|
|
98
98
|
readonly actionIcon: import("@angular/core").InputSignal<string>;
|
|
99
99
|
readonly actionTestId: import("@angular/core").InputSignal<string>;
|
|
100
|
+
/** Colour of the `actionLabel` icon (any CSS colour, e.g. `#16a34a` for a "Mark done" tick); empty = the standard slate. */
|
|
101
|
+
readonly actionColor: import("@angular/core").InputSignal<string>;
|
|
100
102
|
readonly actionAriaLabel: import("@angular/core").InputSignal<string>;
|
|
101
103
|
readonly editClick: import("@angular/core").OutputEmitterRef<void>;
|
|
102
104
|
readonly viewClick: import("@angular/core").OutputEmitterRef<void>;
|
|
@@ -206,6 +208,11 @@ export declare class CardListItemComponent {
|
|
|
206
208
|
"required": false;
|
|
207
209
|
"isSignal": true;
|
|
208
210
|
};
|
|
211
|
+
"actionColor": {
|
|
212
|
+
"alias": "actionColor";
|
|
213
|
+
"required": false;
|
|
214
|
+
"isSignal": true;
|
|
215
|
+
};
|
|
209
216
|
"actionAriaLabel": {
|
|
210
217
|
"alias": "actionAriaLabel";
|
|
211
218
|
"required": false;
|
|
@@ -2749,7 +2749,7 @@ export declare class ButtonComponent {
|
|
|
2749
2749
|
* `ghost-start`: a ghost button for list / section toggles - a full-width row with its content aligned to the start, transparent
|
|
2750
2750
|
* background, hover tint and the normal focus ring. Pair it with `ariaExpanded` / `ariaPressed`; the label may contain a heading element.
|
|
2751
2751
|
*/
|
|
2752
|
-
readonly variant: import("@angular/core").InputSignal<"
|
|
2752
|
+
readonly variant: import("@angular/core").InputSignal<"primary" | "danger" | "warning" | "link" | "secondary" | "ghost" | "ghost-start" | "tab" | "icon" | "icon-danger">;
|
|
2753
2753
|
/** Renders an anchor to this route instead of a button (use with `variant="link"` for an inline text link). `['/settings']` or `'/settings'`. While `disabled` or `loading` it renders a non-clickable `<span role="link" aria-disabled>` with no href (like `href`). */
|
|
2754
2754
|
readonly routerLink: import("@angular/core").InputSignal<string | readonly unknown[] | null>;
|
|
2755
2755
|
/** Query params of the `routerLink` (e.g. `{ section: 'deal-defaults' }`). */
|
|
@@ -2944,7 +2944,7 @@ export declare class ModalComponent implements OnInit, OnDestroy {
|
|
|
2944
2944
|
*/
|
|
2945
2945
|
readonly describedBy: import("@angular/core").InputSignal<string | null>;
|
|
2946
2946
|
readonly maxWidth: import("@angular/core").InputSignal<string>;
|
|
2947
|
-
readonly bodyOverflow: import("@angular/core").InputSignal<"auto" | "
|
|
2947
|
+
readonly bodyOverflow: import("@angular/core").InputSignal<"auto" | "visible" | "hidden">;
|
|
2948
2948
|
/** `data-testid` of the dialog element itself (the host `<ui-modal>` is always in the page, the dialog only while open). None when empty. */
|
|
2949
2949
|
readonly dialogTestId: import("@angular/core").InputSignal<string>;
|
|
2950
2950
|
/** Hides the header X button (e.g. while a request is running). Escape and a backdrop click still close unless `closable` is false. */
|
|
@@ -3095,7 +3095,7 @@ export declare class SidePanelComponent implements OnDestroy {
|
|
|
3095
3095
|
readonly cancelLabel: import("@angular/core").Signal<string>;
|
|
3096
3096
|
/** Right-aligned primary action button label. Empty string = hidden. */
|
|
3097
3097
|
readonly primaryLabel: import("@angular/core").InputSignal<string>;
|
|
3098
|
-
readonly primaryVariant: import("@angular/core").InputSignal<"
|
|
3098
|
+
readonly primaryVariant: import("@angular/core").InputSignal<"primary" | "danger" | "warning">;
|
|
3099
3099
|
readonly primaryLoading: import("@angular/core").InputSignal<boolean>;
|
|
3100
3100
|
readonly primaryDisabled: import("@angular/core").InputSignal<boolean>;
|
|
3101
3101
|
/** `data-testid` of the Cancel button; none when empty (default). */
|
|
@@ -3615,15 +3615,20 @@ export interface UiFieldRevealHost {
|
|
|
3615
3615
|
}
|
|
3616
3616
|
export declare const UI_FIELD_REVEAL_HOST: InjectionToken<UiFieldRevealHost>;
|
|
3617
3617
|
/**
|
|
3618
|
-
* Touched / reveal bookkeeping shared by the inputs
|
|
3619
|
-
*
|
|
3620
|
-
*
|
|
3621
|
-
*
|
|
3622
|
-
*
|
|
3618
|
+
* Touched / reveal bookkeeping shared by the inputs (every library input uses it, so the rule below is the same for all of them). A message AND the red border (both follow
|
|
3619
|
+
* `revealed`) show only when:
|
|
3620
|
+
* - the USER clicked / touched / typed in THIS field and then left it (blur): the field must have been interacted with (a pointer press, a click, typing, a key press other than
|
|
3621
|
+
* Escape, a change) inside it. Focus that arrives by itself (a panel focusing its first field when it opens) and is then lost (the user closes the panel) is NOT an interaction,
|
|
3622
|
+
* so closing an untouched form never shows an error; OR
|
|
3623
|
+
* - the host sets `showErrors` (a failed Save / Create / Submit click), which reveals an invalid untouched field at once.
|
|
3624
|
+
* A host-provided `[error]` follows the same rule. Switching `showErrors` from true back to false (the host closing / re-initialising its form) clears the touched and interacted
|
|
3625
|
+
* state again, so no red field is left. A field inside a `ui-side-panel` / `ui-modal` ([UI_FIELD_REVEAL_HOST]) also clears both whenever that overlay opens or closes.
|
|
3626
|
+
* Must be called from an injection context. Outside a component (no host element, e.g. a direct spec) every blur counts as an interaction.
|
|
3623
3627
|
*/
|
|
3624
3628
|
export declare function createFieldReveal(showErrors: Signal<boolean>): {
|
|
3625
3629
|
touched: WritableSignal<boolean>;
|
|
3626
3630
|
revealed: Signal<boolean>;
|
|
3631
|
+
interacted: WritableSignal<boolean>;
|
|
3627
3632
|
};
|
|
3628
3633
|
/** Splits `YYYY-MM-DD` (optionally followed by `Thh:mm[:ss]`) and rejects impossible dates (2026-02-31) and times (25:00). */
|
|
3629
3634
|
export declare function parseIso(value: string | null | undefined, withTime: boolean): {
|
|
@@ -3657,9 +3662,10 @@ export declare function mergeDescribedBy(own: string | null | undefined, externa
|
|
|
3657
3662
|
/**
|
|
3658
3663
|
* Initial-focus helpers shared by ui-side-panel and ui-modal (internal — not exported from the public API).
|
|
3659
3664
|
*
|
|
3660
|
-
* Order: an `[autofocus]` / `[data-autofocus]` target in the body → the
|
|
3661
|
-
*
|
|
3662
|
-
*
|
|
3665
|
+
* Order: an explicit `[autofocus]` / `[data-autofocus]` target in the body → the dialog container itself. A form field is NEVER
|
|
3666
|
+
* focused on its own (user decision 2026-11-24): the panel / modal opens with the container focused, so keyboard and screen-reader
|
|
3667
|
+
* users are inside the dialog and nothing is edited, highlighted or validated until the user interacts. The header's close button is
|
|
3668
|
+
* never chosen. On phones / coarse pointers the container is always focused (no on-screen keyboard or iOS zoom).
|
|
3663
3669
|
*/
|
|
3664
3670
|
/** `(max-width: 480px)` or `(pointer: coarse)` — SSR / old-browser safe. */
|
|
3665
3671
|
export declare function isTouchViewport(doc: Document): boolean;
|
|
@@ -45,6 +45,8 @@ export declare class IconComponent {
|
|
|
45
45
|
/** Fires on click (not while disabled); the host performs the action. */
|
|
46
46
|
readonly iconClick: import("@angular/core").OutputEmitterRef<MouseEvent>;
|
|
47
47
|
protected readonly accessibleName: import("@angular/core").Signal<string>;
|
|
48
|
+
/** The tick icon is drawn green, interactive or not (a danger variant still wins nothing: the tick is never destructive). */
|
|
49
|
+
protected readonly isCheck: import("@angular/core").Signal<boolean>;
|
|
48
50
|
protected readonly path: import("@angular/core").Signal<string | undefined>;
|
|
49
51
|
protected onClick(event: MouseEvent): void;
|
|
50
52
|
static ɵfac: i0.ɵɵFactoryDeclaration<IconComponent, never>;
|
|
@@ -563,6 +563,7 @@ export declare class DocumentSendOptionsComponent implements UiFieldValidity {
|
|
|
563
563
|
protected readonly _reveal: {
|
|
564
564
|
touched: import("@angular/core").WritableSignal<boolean>;
|
|
565
565
|
revealed: import("@angular/core").Signal<boolean>;
|
|
566
|
+
interacted: import("@angular/core").WritableSignal<boolean>;
|
|
566
567
|
};
|
|
567
568
|
readonly valueChange: import("@angular/core").OutputEmitterRef<DocumentSendValue>;
|
|
568
569
|
readonly invalidChange: import("@angular/core").OutputEmitterRef<boolean>;
|