@forgeroute/ui 0.5.26 → 0.5.27
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 +30 -8
- package/fesm2022/forgeroute-ui-card-list-item.mjs.map +1 -1
- package/fesm2022/forgeroute-ui-checkbox.mjs +2 -2
- package/fesm2022/forgeroute-ui-checkbox.mjs.map +1 -1
- package/fesm2022/forgeroute-ui-color-input.mjs +2 -2
- package/fesm2022/forgeroute-ui-color-input.mjs.map +1 -1
- package/fesm2022/forgeroute-ui-combobox.mjs +2 -2
- package/fesm2022/forgeroute-ui-combobox.mjs.map +1 -1
- package/fesm2022/forgeroute-ui-contact-picker.mjs +4 -4
- package/fesm2022/forgeroute-ui-contact-picker.mjs.map +1 -1
- package/fesm2022/forgeroute-ui-conversations.mjs +2 -0
- package/fesm2022/forgeroute-ui-conversations.mjs.map +1 -1
- package/fesm2022/forgeroute-ui-data-table-core.mjs +2 -2
- package/fesm2022/forgeroute-ui-data-table-core.mjs.map +1 -1
- package/fesm2022/forgeroute-ui-date-input.mjs +2 -2
- package/fesm2022/forgeroute-ui-date-input.mjs.map +1 -1
- package/fesm2022/forgeroute-ui-datetime-input.mjs +2 -2
- package/fesm2022/forgeroute-ui-datetime-input.mjs.map +1 -1
- package/fesm2022/forgeroute-ui-detail-card.mjs +20 -4
- package/fesm2022/forgeroute-ui-detail-card.mjs.map +1 -1
- package/fesm2022/forgeroute-ui-dropdown.mjs +16 -2
- package/fesm2022/forgeroute-ui-dropdown.mjs.map +1 -1
- package/fesm2022/forgeroute-ui-file-input.mjs +7 -5
- package/fesm2022/forgeroute-ui-file-input.mjs.map +1 -1
- package/fesm2022/forgeroute-ui-icon-picker.mjs +2 -2
- package/fesm2022/forgeroute-ui-icon-picker.mjs.map +1 -1
- package/fesm2022/forgeroute-ui-media.mjs +67 -2
- package/fesm2022/forgeroute-ui-media.mjs.map +1 -1
- package/fesm2022/forgeroute-ui-messaging.mjs +3 -0
- package/fesm2022/forgeroute-ui-messaging.mjs.map +1 -1
- package/fesm2022/forgeroute-ui-multi-select.mjs +2 -2
- package/fesm2022/forgeroute-ui-multi-select.mjs.map +1 -1
- package/fesm2022/forgeroute-ui-notes.mjs +1 -0
- package/fesm2022/forgeroute-ui-notes.mjs.map +1 -1
- package/fesm2022/forgeroute-ui-option-card.mjs +1 -0
- package/fesm2022/forgeroute-ui-option-card.mjs.map +1 -1
- package/fesm2022/forgeroute-ui-payments.mjs +3 -0
- package/fesm2022/forgeroute-ui-payments.mjs.map +1 -1
- package/fesm2022/forgeroute-ui-pdf.mjs +1 -0
- package/fesm2022/forgeroute-ui-pdf.mjs.map +1 -1
- package/fesm2022/forgeroute-ui-quickbooks.mjs +1 -0
- package/fesm2022/forgeroute-ui-quickbooks.mjs.map +1 -1
- package/fesm2022/forgeroute-ui-radio-matrix.mjs +2 -2
- package/fesm2022/forgeroute-ui-radio-matrix.mjs.map +1 -1
- package/fesm2022/forgeroute-ui-radio.mjs +2 -2
- package/fesm2022/forgeroute-ui-radio.mjs.map +1 -1
- package/fesm2022/forgeroute-ui-select.mjs +2 -2
- package/fesm2022/forgeroute-ui-select.mjs.map +1 -1
- package/fesm2022/forgeroute-ui-setup.mjs +1 -0
- package/fesm2022/forgeroute-ui-setup.mjs.map +1 -1
- package/fesm2022/forgeroute-ui-square.mjs +1 -0
- package/fesm2022/forgeroute-ui-square.mjs.map +1 -1
- package/fesm2022/forgeroute-ui-star-rating.mjs +2 -2
- package/fesm2022/forgeroute-ui-star-rating.mjs.map +1 -1
- package/fesm2022/forgeroute-ui-stripe.mjs +1 -0
- package/fesm2022/forgeroute-ui-stripe.mjs.map +1 -1
- package/fesm2022/forgeroute-ui-swatch-picker.mjs +2 -2
- package/fesm2022/forgeroute-ui-swatch-picker.mjs.map +1 -1
- package/fesm2022/forgeroute-ui-table-toolbar.mjs +17 -5
- package/fesm2022/forgeroute-ui-table-toolbar.mjs.map +1 -1
- package/fesm2022/forgeroute-ui-text-input.mjs +2 -2
- package/fesm2022/forgeroute-ui-text-input.mjs.map +1 -1
- package/fesm2022/forgeroute-ui-textarea-input.mjs +23 -36
- package/fesm2022/forgeroute-ui-textarea-input.mjs.map +1 -1
- package/fesm2022/forgeroute-ui-time-input.mjs +2 -2
- package/fesm2022/forgeroute-ui-time-input.mjs.map +1 -1
- package/package.json +1 -1
- package/types/forgeroute-ui-card-list-item.d.ts +11 -3
- package/types/forgeroute-ui-detail-card.d.ts +7 -0
- package/types/forgeroute-ui-dropdown.d.ts +2 -0
- package/types/forgeroute-ui-media.d.ts +28 -0
- package/types/forgeroute-ui-messaging.d.ts +4 -4
- package/types/forgeroute-ui-payments.d.ts +1 -1
- package/types/forgeroute-ui-quickbooks.d.ts +1 -1
- package/types/forgeroute-ui-square.d.ts +4 -4
- package/types/forgeroute-ui-stripe.d.ts +4 -4
- package/types/forgeroute-ui-textarea-input.d.ts +9 -9
|
@@ -20,6 +20,7 @@ const ICON_PATHS = {
|
|
|
20
20
|
};
|
|
21
21
|
const CALENDAR_PATH = "M5 4h14a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2z M16 2v4 M8 2v4 M3 10h18";
|
|
22
22
|
const EDIT_PATH = "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";
|
|
23
|
+
const EYE_PATH = "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";
|
|
23
24
|
const TRASH_PATH = "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";
|
|
24
25
|
var CardListItemComponent = class CardListItemComponent {
|
|
25
26
|
constructor() {
|
|
@@ -46,6 +47,7 @@ var CardListItemComponent = class CardListItemComponent {
|
|
|
46
47
|
this.deleteLabel = computed(() => this.deleteLabelInput() ?? this.labels.t("cardListItem.deleteLabel"), ...ngDevMode ? [{ debugName: "deleteLabel" }] : /* istanbul ignore next */ []);
|
|
47
48
|
this.deleteTestId = input("", ...ngDevMode ? [{ debugName: "deleteTestId" }] : /* istanbul ignore next */ []);
|
|
48
49
|
this.actionLabel = input("", ...ngDevMode ? [{ debugName: "actionLabel" }] : /* istanbul ignore next */ []);
|
|
50
|
+
this.actionIcon = input("", ...ngDevMode ? [{ debugName: "actionIcon" }] : /* istanbul ignore next */ []);
|
|
49
51
|
this.actionTestId = input("", ...ngDevMode ? [{ debugName: "actionTestId" }] : /* istanbul ignore next */ []);
|
|
50
52
|
this.actionAriaLabel = input("", ...ngDevMode ? [{ debugName: "actionAriaLabel" }] : /* istanbul ignore next */ []);
|
|
51
53
|
this.hasBuiltInChip = computed(() => this.editButton() || this.viewButton() || !!this.actionLabel() || this.deletable(), ...ngDevMode ? [{ debugName: "hasBuiltInChip" }] : /* istanbul ignore next */ []);
|
|
@@ -55,6 +57,7 @@ var CardListItemComponent = class CardListItemComponent {
|
|
|
55
57
|
this.action = output();
|
|
56
58
|
this.calendarPath = CALENDAR_PATH;
|
|
57
59
|
this.editPath = EDIT_PATH;
|
|
60
|
+
this.eyePath = EYE_PATH;
|
|
58
61
|
this.trashPath = TRASH_PATH;
|
|
59
62
|
this.iconPath = computed(() => {
|
|
60
63
|
const i = this.icon();
|
|
@@ -206,6 +209,13 @@ var CardListItemComponent = class CardListItemComponent {
|
|
|
206
209
|
isRequired: false,
|
|
207
210
|
transformFunction: null
|
|
208
211
|
},
|
|
212
|
+
actionIcon: {
|
|
213
|
+
classPropertyName: "actionIcon",
|
|
214
|
+
publicName: "actionIcon",
|
|
215
|
+
isSignal: true,
|
|
216
|
+
isRequired: false,
|
|
217
|
+
transformFunction: null
|
|
218
|
+
},
|
|
209
219
|
actionTestId: {
|
|
210
220
|
classPropertyName: "actionTestId",
|
|
211
221
|
publicName: "actionTestId",
|
|
@@ -269,14 +279,16 @@ var CardListItemComponent = class CardListItemComponent {
|
|
|
269
279
|
<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 [attr.d]="editPath" /></svg>{{ labels.t('common.edit') }}</button>
|
|
270
280
|
}
|
|
271
281
|
@if (viewButton()) {
|
|
272
|
-
<button class="cli-chip cli-chip--view" type="button" [attr.aria-label]="viewAriaLabel() || null" (click)="viewClick.emit()">
|
|
282
|
+
<button class="cli-chip cli-chip--view" type="button" [attr.aria-label]="viewAriaLabel() || null" (click)="viewClick.emit()">
|
|
283
|
+
<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 [attr.d]="eyePath" /></svg>{{ labels.t('common.view') }}</button>
|
|
273
284
|
}
|
|
274
285
|
@if (actionLabel()) {
|
|
275
|
-
<button class="cli-chip cli-chip--action" type="button" [attr.data-testid]="actionTestId() || null" [attr.aria-label]="actionAriaLabel() || null" (click)="action.emit()">
|
|
286
|
+
<button class="cli-chip cli-chip--action" type="button" [attr.data-testid]="actionTestId() || null" [attr.aria-label]="actionAriaLabel() || null" (click)="action.emit()">
|
|
287
|
+
@if (actionIcon()) { <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 [attr.d]="actionIcon()" /></svg> }{{ actionLabel() }}</button>
|
|
276
288
|
}
|
|
277
289
|
@if (deletable()) {
|
|
278
290
|
<button class="cli-chip cli-chip--delete" type="button" [attr.data-testid]="deleteTestId() || null" [attr.aria-label]="deleteLabel() || labels.t('common.delete')" (click)="delete.emit()">
|
|
279
|
-
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path [attr.d]="trashPath" /></svg>
|
|
291
|
+
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path [attr.d]="trashPath" /></svg>{{ labels.t('common.delete') }}
|
|
280
292
|
</button>
|
|
281
293
|
}
|
|
282
294
|
<ng-content select="[card-list-action]" />
|
|
@@ -286,7 +298,7 @@ var CardListItemComponent = class CardListItemComponent {
|
|
|
286
298
|
<ng-content select="[card-detail]" />
|
|
287
299
|
`,
|
|
288
300
|
isInline: true,
|
|
289
|
-
styles: ["ui-card-list-item{position:relative;display:block;border:1px solid #e2e8f0;border-radius:8px;overflow:hidden;margin-bottom:8px}ui-card-list-item:last-child{margin-bottom:0}ui-card-list-item .cli-row{display:flex;align-items:flex-start;gap:12px;padding:13px 18px;transition:background .12s}ui-card-list-item .cli-row:hover{background:#f8fafc}@media(prefers-reduced-motion:reduce){ui-card-list-item .cli-row{transition:none}}ui-card-list-item .cli-dot{width:9px;height:9px;border-radius:50%;flex-shrink:0;margin-top:5px}ui-card-list-item .cli-dot:focus-visible{outline:2px solid #3b82f6;outline-offset:2px}ui-card-list-item .cli-dot--high{background:#ef4444}ui-card-list-item .cli-dot--medium{background:#f59e0b}ui-card-list-item .cli-dot--low{background:#94a3b8}ui-card-list-item .cli-dot--blue{background:#3b82f6}ui-card-list-item .cli-dot--green{background:#22c55e}ui-card-list-item .cli-icon-circle{width:32px;height:32px;border-radius:50%;display:flex;align-items:center;justify-content:center;flex-shrink:0}ui-card-list-item .cli-icon-circle--call{background:#dbeafe;color:#2563eb}ui-card-list-item .cli-icon-circle--email{background:#dcfce7;color:#16a34a}ui-card-list-item .cli-icon-circle--sms{background:#fef9c3;color:#ca8a04}ui-card-list-item .cli-icon-circle--task{background:#dbeafe;color:#2563eb}ui-card-list-item .cli-icon-circle--doc{background:#ffedd5;color:#ea580c}ui-card-list-item .cli-icon-circle--money{background:#d1fae5;color:#059669}ui-card-list-item .cli-icon-circle--deal{background:#e0f2fe;color:#0284c7}ui-card-list-item .cli-icon-circle--survey{background:#dbeafe;color:#2563eb}ui-card-list-item .cli-icon-circle--property{background:#fef3c7;color:#d97706}ui-card-list-item .cli-icon-circle--search{background:#e0f2fe;color:#0284c7}ui-card-list-item .cli-icon-circle--heart{background:#fce7f3;color:#db2777}ui-card-list-item .cli-icon-circle--calc{background:#d1fae5;color:#059669}ui-card-list-item .cli-icon-circle--repeat{background:#e0f2fe;color:#0284c7}ui-card-list-item .cli-body{flex:1;min-width:0;display:flex;flex-direction:column;gap:3px;overflow-wrap:anywhere;word-break:break-word}ui-card-list-item .cli-badges{position:absolute;top:10px;right:12px;display:flex;align-items:center;gap:6px;z-index:1}ui-card-list-item .cli-row--badges .cli-body{padding-right:96px}ui-card-list-item .cli-row--badges-2 .cli-body{padding-right:190px}ui-card-list-item .cli-row--badges .cli-chip{align-self:flex-end}ui-card-list-item .cli-row--badges-chip{box-sizing:border-box;min-height:
|
|
301
|
+
styles: ["ui-card-list-item{position:relative;display:block;border:1px solid #e2e8f0;border-radius:8px;overflow:hidden;margin-bottom:8px}ui-card-list-item:last-child{margin-bottom:0}ui-card-list-item .cli-row{display:flex;align-items:flex-start;gap:12px;padding:13px 18px;transition:background .12s}ui-card-list-item .cli-row:hover{background:#f8fafc}@media(prefers-reduced-motion:reduce){ui-card-list-item .cli-row{transition:none}}ui-card-list-item .cli-dot{width:9px;height:9px;border-radius:50%;flex-shrink:0;margin-top:5px}ui-card-list-item .cli-dot:focus-visible{outline:2px solid #3b82f6;outline-offset:2px}ui-card-list-item .cli-dot--high{background:#ef4444}ui-card-list-item .cli-dot--medium{background:#f59e0b}ui-card-list-item .cli-dot--low{background:#94a3b8}ui-card-list-item .cli-dot--blue{background:#3b82f6}ui-card-list-item .cli-dot--green{background:#22c55e}ui-card-list-item .cli-icon-circle{width:32px;height:32px;border-radius:50%;display:flex;align-items:center;justify-content:center;flex-shrink:0}ui-card-list-item .cli-icon-circle--call{background:#dbeafe;color:#2563eb}ui-card-list-item .cli-icon-circle--email{background:#dcfce7;color:#16a34a}ui-card-list-item .cli-icon-circle--sms{background:#fef9c3;color:#ca8a04}ui-card-list-item .cli-icon-circle--task{background:#dbeafe;color:#2563eb}ui-card-list-item .cli-icon-circle--doc{background:#ffedd5;color:#ea580c}ui-card-list-item .cli-icon-circle--money{background:#d1fae5;color:#059669}ui-card-list-item .cli-icon-circle--deal{background:#e0f2fe;color:#0284c7}ui-card-list-item .cli-icon-circle--survey{background:#dbeafe;color:#2563eb}ui-card-list-item .cli-icon-circle--property{background:#fef3c7;color:#d97706}ui-card-list-item .cli-icon-circle--search{background:#e0f2fe;color:#0284c7}ui-card-list-item .cli-icon-circle--heart{background:#fce7f3;color:#db2777}ui-card-list-item .cli-icon-circle--calc{background:#d1fae5;color:#059669}ui-card-list-item .cli-icon-circle--repeat{background:#e0f2fe;color:#0284c7}ui-card-list-item .cli-body{flex:1;min-width:0;display:flex;flex-direction:column;gap:3px;overflow-wrap:anywhere;word-break:break-word}ui-card-list-item .cli-badges{position:absolute;top:10px;right:12px;display:flex;align-items:center;gap:6px;z-index:1}ui-card-list-item .cli-row--badges .cli-body{padding-right:96px}ui-card-list-item .cli-row--badges-2 .cli-body{padding-right:190px}ui-card-list-item .cli-row--badges .cli-chip{align-self:flex-end}ui-card-list-item .cli-row--badges-chip{box-sizing:border-box;min-height:90px}ui-card-list-item .cli-row--badges:has([card-list-action]){box-sizing:border-box;min-height:90px}@media(pointer:coarse),(max-width:480px){ui-card-list-item .cli-row--badges-chip{min-height:106px}ui-card-list-item .cli-row--badges:has([card-list-action]){min-height:106px}}ui-card-list-item .cli-title-row{display:flex;align-items:center;gap:7px;flex-wrap:wrap}ui-card-list-item .cli-title{font-size:.875rem;font-weight:600;color:#1e293b}ui-card-list-item .cli-desc-row{display:flex;align-items:center;gap:8px}ui-card-list-item .cli-desc-row:empty{display:none}ui-card-list-item .cli-description{font-size:.8125rem;color:#64748b;min-width:0}ui-card-list-item .cli-date{display:flex;align-items:center;gap:4px;font-size:.75rem;color:#64748b}ui-card-list-item .cli-chip{flex-shrink:0;display:inline-flex;align-items:center;gap:5px;align-self:center;box-sizing:border-box;font-family:inherit;font-size:.8rem;font-weight:500;line-height:1.4;background:none;cursor:pointer;padding:4px 10px;border-radius:6px;text-decoration:none;transition:background .15s,color .15s,border-color .15s}ui-card-list-item .cli-chip--edit{color:#64748b;border:1px solid #e2e8f0}ui-card-list-item .cli-chip--edit:hover{background:#f1f5f9;color:#1e293b}ui-card-list-item .cli-chip--view{color:#2563eb;border:1px solid #dbeafe}ui-card-list-item .cli-chip--view:hover{background:#eff6ff;border-color:#bfdbfe;color:#1d4ed8}ui-card-list-item .cli-chip--action{color:#475569;border:1px solid #e2e8f0}ui-card-list-item .cli-chip--action:hover{background:#f1f5f9;color:#1e293b}ui-card-list-item .cli-chip--delete{color:#b91c1c;border:1px solid #fecaca}ui-card-list-item .cli-chip--delete:hover{background:#fef2f2;border-color:#fca5a5;color:#991b1b}ui-card-list-item .cli-chip:focus-visible,ui-card-list-item .cli-inline-link:focus-visible{outline:2px solid #3b82f6;outline-offset:2px}ui-card-list-item .cli-inline-link{flex-shrink:0;margin-left:auto;display:inline-flex;align-items:center;gap:4px;font-size:.8rem;font-weight:500;color:#2563eb;text-decoration:none;transition:color .15s}ui-card-list-item .cli-inline-link:hover{color:#1d4ed8}@media(pointer:coarse),(max-width:480px){ui-card-list-item .cli-chip{min-height:44px;padding:4px 14px}}@media(max-width:480px){ui-card-list-item .cli-row{flex-wrap:wrap;gap:8px 12px;padding:12px}ui-card-list-item .cli-body{flex:1 1 160px}ui-card-list-item .cli-badges{position:static;flex-wrap:wrap;padding:10px 12px 0}ui-card-list-item .cli-row--badges .cli-body,ui-card-list-item .cli-row--badges-2 .cli-body{padding-right:0}ui-card-list-item .cli-row--badges .cli-chip{align-self:center}ui-card-list-item .cli-row--badges-chip,ui-card-list-item .cli-row--badges:has([card-list-action]){min-height:0}}ui-card-list-item [card-stats]{display:flex;align-items:stretch;background:#f8fafc;border-top:1px solid #f1f5f9}ui-card-list-item [card-detail]{background:#f8fafc;border-top:1px solid #e2e8f0}ui-card-list-item .cli-stat{flex:1;display:flex;flex-direction:column;gap:2px;padding:10px 14px}ui-card-list-item .cli-stat-label{font-size:.6875rem;font-weight:600;letter-spacing:.04em;text-transform:uppercase;color:#64748b}ui-card-list-item .cli-stat-value{font-size:.9375rem;font-weight:600;color:#0f172a}ui-card-list-item .cli-stat-divider{width:1px;background:#e2e8f0;margin:8px 0}\n"],
|
|
290
302
|
dependencies: [{
|
|
291
303
|
kind: "component",
|
|
292
304
|
type: BadgeComponent,
|
|
@@ -361,14 +373,16 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
361
373
|
<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 [attr.d]="editPath" /></svg>{{ labels.t('common.edit') }}</button>
|
|
362
374
|
}
|
|
363
375
|
@if (viewButton()) {
|
|
364
|
-
<button class="cli-chip cli-chip--view" type="button" [attr.aria-label]="viewAriaLabel() || null" (click)="viewClick.emit()">
|
|
376
|
+
<button class="cli-chip cli-chip--view" type="button" [attr.aria-label]="viewAriaLabel() || null" (click)="viewClick.emit()">
|
|
377
|
+
<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 [attr.d]="eyePath" /></svg>{{ labels.t('common.view') }}</button>
|
|
365
378
|
}
|
|
366
379
|
@if (actionLabel()) {
|
|
367
|
-
<button class="cli-chip cli-chip--action" type="button" [attr.data-testid]="actionTestId() || null" [attr.aria-label]="actionAriaLabel() || null" (click)="action.emit()">
|
|
380
|
+
<button class="cli-chip cli-chip--action" type="button" [attr.data-testid]="actionTestId() || null" [attr.aria-label]="actionAriaLabel() || null" (click)="action.emit()">
|
|
381
|
+
@if (actionIcon()) { <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 [attr.d]="actionIcon()" /></svg> }{{ actionLabel() }}</button>
|
|
368
382
|
}
|
|
369
383
|
@if (deletable()) {
|
|
370
384
|
<button class="cli-chip cli-chip--delete" type="button" [attr.data-testid]="deleteTestId() || null" [attr.aria-label]="deleteLabel() || labels.t('common.delete')" (click)="delete.emit()">
|
|
371
|
-
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path [attr.d]="trashPath" /></svg>
|
|
385
|
+
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path [attr.d]="trashPath" /></svg>{{ labels.t('common.delete') }}
|
|
372
386
|
</button>
|
|
373
387
|
}
|
|
374
388
|
<ng-content select="[card-list-action]" />
|
|
@@ -377,7 +391,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
377
391
|
<ng-content select="[card-stats]" />
|
|
378
392
|
<ng-content select="[card-detail]" />
|
|
379
393
|
`,
|
|
380
|
-
styles: ["ui-card-list-item{position:relative;display:block;border:1px solid #e2e8f0;border-radius:8px;overflow:hidden;margin-bottom:8px}ui-card-list-item:last-child{margin-bottom:0}ui-card-list-item .cli-row{display:flex;align-items:flex-start;gap:12px;padding:13px 18px;transition:background .12s}ui-card-list-item .cli-row:hover{background:#f8fafc}@media(prefers-reduced-motion:reduce){ui-card-list-item .cli-row{transition:none}}ui-card-list-item .cli-dot{width:9px;height:9px;border-radius:50%;flex-shrink:0;margin-top:5px}ui-card-list-item .cli-dot:focus-visible{outline:2px solid #3b82f6;outline-offset:2px}ui-card-list-item .cli-dot--high{background:#ef4444}ui-card-list-item .cli-dot--medium{background:#f59e0b}ui-card-list-item .cli-dot--low{background:#94a3b8}ui-card-list-item .cli-dot--blue{background:#3b82f6}ui-card-list-item .cli-dot--green{background:#22c55e}ui-card-list-item .cli-icon-circle{width:32px;height:32px;border-radius:50%;display:flex;align-items:center;justify-content:center;flex-shrink:0}ui-card-list-item .cli-icon-circle--call{background:#dbeafe;color:#2563eb}ui-card-list-item .cli-icon-circle--email{background:#dcfce7;color:#16a34a}ui-card-list-item .cli-icon-circle--sms{background:#fef9c3;color:#ca8a04}ui-card-list-item .cli-icon-circle--task{background:#dbeafe;color:#2563eb}ui-card-list-item .cli-icon-circle--doc{background:#ffedd5;color:#ea580c}ui-card-list-item .cli-icon-circle--money{background:#d1fae5;color:#059669}ui-card-list-item .cli-icon-circle--deal{background:#e0f2fe;color:#0284c7}ui-card-list-item .cli-icon-circle--survey{background:#dbeafe;color:#2563eb}ui-card-list-item .cli-icon-circle--property{background:#fef3c7;color:#d97706}ui-card-list-item .cli-icon-circle--search{background:#e0f2fe;color:#0284c7}ui-card-list-item .cli-icon-circle--heart{background:#fce7f3;color:#db2777}ui-card-list-item .cli-icon-circle--calc{background:#d1fae5;color:#059669}ui-card-list-item .cli-icon-circle--repeat{background:#e0f2fe;color:#0284c7}ui-card-list-item .cli-body{flex:1;min-width:0;display:flex;flex-direction:column;gap:3px;overflow-wrap:anywhere;word-break:break-word}ui-card-list-item .cli-badges{position:absolute;top:10px;right:12px;display:flex;align-items:center;gap:6px;z-index:1}ui-card-list-item .cli-row--badges .cli-body{padding-right:96px}ui-card-list-item .cli-row--badges-2 .cli-body{padding-right:190px}ui-card-list-item .cli-row--badges .cli-chip{align-self:flex-end}ui-card-list-item .cli-row--badges-chip{box-sizing:border-box;min-height:
|
|
394
|
+
styles: ["ui-card-list-item{position:relative;display:block;border:1px solid #e2e8f0;border-radius:8px;overflow:hidden;margin-bottom:8px}ui-card-list-item:last-child{margin-bottom:0}ui-card-list-item .cli-row{display:flex;align-items:flex-start;gap:12px;padding:13px 18px;transition:background .12s}ui-card-list-item .cli-row:hover{background:#f8fafc}@media(prefers-reduced-motion:reduce){ui-card-list-item .cli-row{transition:none}}ui-card-list-item .cli-dot{width:9px;height:9px;border-radius:50%;flex-shrink:0;margin-top:5px}ui-card-list-item .cli-dot:focus-visible{outline:2px solid #3b82f6;outline-offset:2px}ui-card-list-item .cli-dot--high{background:#ef4444}ui-card-list-item .cli-dot--medium{background:#f59e0b}ui-card-list-item .cli-dot--low{background:#94a3b8}ui-card-list-item .cli-dot--blue{background:#3b82f6}ui-card-list-item .cli-dot--green{background:#22c55e}ui-card-list-item .cli-icon-circle{width:32px;height:32px;border-radius:50%;display:flex;align-items:center;justify-content:center;flex-shrink:0}ui-card-list-item .cli-icon-circle--call{background:#dbeafe;color:#2563eb}ui-card-list-item .cli-icon-circle--email{background:#dcfce7;color:#16a34a}ui-card-list-item .cli-icon-circle--sms{background:#fef9c3;color:#ca8a04}ui-card-list-item .cli-icon-circle--task{background:#dbeafe;color:#2563eb}ui-card-list-item .cli-icon-circle--doc{background:#ffedd5;color:#ea580c}ui-card-list-item .cli-icon-circle--money{background:#d1fae5;color:#059669}ui-card-list-item .cli-icon-circle--deal{background:#e0f2fe;color:#0284c7}ui-card-list-item .cli-icon-circle--survey{background:#dbeafe;color:#2563eb}ui-card-list-item .cli-icon-circle--property{background:#fef3c7;color:#d97706}ui-card-list-item .cli-icon-circle--search{background:#e0f2fe;color:#0284c7}ui-card-list-item .cli-icon-circle--heart{background:#fce7f3;color:#db2777}ui-card-list-item .cli-icon-circle--calc{background:#d1fae5;color:#059669}ui-card-list-item .cli-icon-circle--repeat{background:#e0f2fe;color:#0284c7}ui-card-list-item .cli-body{flex:1;min-width:0;display:flex;flex-direction:column;gap:3px;overflow-wrap:anywhere;word-break:break-word}ui-card-list-item .cli-badges{position:absolute;top:10px;right:12px;display:flex;align-items:center;gap:6px;z-index:1}ui-card-list-item .cli-row--badges .cli-body{padding-right:96px}ui-card-list-item .cli-row--badges-2 .cli-body{padding-right:190px}ui-card-list-item .cli-row--badges .cli-chip{align-self:flex-end}ui-card-list-item .cli-row--badges-chip{box-sizing:border-box;min-height:90px}ui-card-list-item .cli-row--badges:has([card-list-action]){box-sizing:border-box;min-height:90px}@media(pointer:coarse),(max-width:480px){ui-card-list-item .cli-row--badges-chip{min-height:106px}ui-card-list-item .cli-row--badges:has([card-list-action]){min-height:106px}}ui-card-list-item .cli-title-row{display:flex;align-items:center;gap:7px;flex-wrap:wrap}ui-card-list-item .cli-title{font-size:.875rem;font-weight:600;color:#1e293b}ui-card-list-item .cli-desc-row{display:flex;align-items:center;gap:8px}ui-card-list-item .cli-desc-row:empty{display:none}ui-card-list-item .cli-description{font-size:.8125rem;color:#64748b;min-width:0}ui-card-list-item .cli-date{display:flex;align-items:center;gap:4px;font-size:.75rem;color:#64748b}ui-card-list-item .cli-chip{flex-shrink:0;display:inline-flex;align-items:center;gap:5px;align-self:center;box-sizing:border-box;font-family:inherit;font-size:.8rem;font-weight:500;line-height:1.4;background:none;cursor:pointer;padding:4px 10px;border-radius:6px;text-decoration:none;transition:background .15s,color .15s,border-color .15s}ui-card-list-item .cli-chip--edit{color:#64748b;border:1px solid #e2e8f0}ui-card-list-item .cli-chip--edit:hover{background:#f1f5f9;color:#1e293b}ui-card-list-item .cli-chip--view{color:#2563eb;border:1px solid #dbeafe}ui-card-list-item .cli-chip--view:hover{background:#eff6ff;border-color:#bfdbfe;color:#1d4ed8}ui-card-list-item .cli-chip--action{color:#475569;border:1px solid #e2e8f0}ui-card-list-item .cli-chip--action:hover{background:#f1f5f9;color:#1e293b}ui-card-list-item .cli-chip--delete{color:#b91c1c;border:1px solid #fecaca}ui-card-list-item .cli-chip--delete:hover{background:#fef2f2;border-color:#fca5a5;color:#991b1b}ui-card-list-item .cli-chip:focus-visible,ui-card-list-item .cli-inline-link:focus-visible{outline:2px solid #3b82f6;outline-offset:2px}ui-card-list-item .cli-inline-link{flex-shrink:0;margin-left:auto;display:inline-flex;align-items:center;gap:4px;font-size:.8rem;font-weight:500;color:#2563eb;text-decoration:none;transition:color .15s}ui-card-list-item .cli-inline-link:hover{color:#1d4ed8}@media(pointer:coarse),(max-width:480px){ui-card-list-item .cli-chip{min-height:44px;padding:4px 14px}}@media(max-width:480px){ui-card-list-item .cli-row{flex-wrap:wrap;gap:8px 12px;padding:12px}ui-card-list-item .cli-body{flex:1 1 160px}ui-card-list-item .cli-badges{position:static;flex-wrap:wrap;padding:10px 12px 0}ui-card-list-item .cli-row--badges .cli-body,ui-card-list-item .cli-row--badges-2 .cli-body{padding-right:0}ui-card-list-item .cli-row--badges .cli-chip{align-self:center}ui-card-list-item .cli-row--badges-chip,ui-card-list-item .cli-row--badges:has([card-list-action]){min-height:0}}ui-card-list-item [card-stats]{display:flex;align-items:stretch;background:#f8fafc;border-top:1px solid #f1f5f9}ui-card-list-item [card-detail]{background:#f8fafc;border-top:1px solid #e2e8f0}ui-card-list-item .cli-stat{flex:1;display:flex;flex-direction:column;gap:2px;padding:10px 14px}ui-card-list-item .cli-stat-label{font-size:.6875rem;font-weight:600;letter-spacing:.04em;text-transform:uppercase;color:#64748b}ui-card-list-item .cli-stat-value{font-size:.9375rem;font-weight:600;color:#0f172a}ui-card-list-item .cli-stat-divider{width:1px;background:#e2e8f0;margin:8px 0}\n"]
|
|
381
395
|
}]
|
|
382
396
|
}],
|
|
383
397
|
propDecorators: {
|
|
@@ -517,6 +531,14 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
517
531
|
required: false
|
|
518
532
|
}]
|
|
519
533
|
}],
|
|
534
|
+
actionIcon: [{
|
|
535
|
+
type: i0.Input,
|
|
536
|
+
args: [{
|
|
537
|
+
isSignal: true,
|
|
538
|
+
alias: "actionIcon",
|
|
539
|
+
required: false
|
|
540
|
+
}]
|
|
541
|
+
}],
|
|
520
542
|
actionTestId: [{
|
|
521
543
|
type: i0.Input,
|
|
522
544
|
args: [{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"forgeroute-ui-card-list-item.mjs","names":[],"sources":["../../../projects/forgeroute-ui/card-list-item/src/lib/card-list-item/card-list-item.component.ts"],"sourcesContent":["import { Component, ChangeDetectionStrategy, ViewEncapsulation, computed, input, output, inject } from '@angular/core';\nimport { BadgeComponent } from '@forgeroute/ui/badge';\nimport { TooltipDirective } from '@forgeroute/ui/tooltip';\nimport { BadgeVariant } from '@forgeroute/ui/table-types';\nimport { UiLabelKey, UiLabelsService } from '@forgeroute/ui/core';\n\n/** Colour of the priority dot (`high` red, `medium` amber, `low` grey, `blue`, `green`); `none` = no dot. */\nexport type CardListIndicator = 'high' | 'medium' | 'low' | 'blue' | 'green' | 'none';\n/** Icon of the round marker on the left. */\nexport type CardListIcon = 'call' | 'email' | 'sms' | 'task' | 'doc' | 'money' | 'deal' | 'survey' | 'property' | 'search' | 'heart' | 'calc' | 'repeat';\n\n/** SVG path data (24x24 viewBox, stroke icons) of every `CardListIcon`. */\nconst ICON_PATHS: Record<CardListIcon, string> = {\n call: 'M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07A19.5 19.5 0 0 1 4.69 12a19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 3.6 1.27h3a2 2 0 0 1 2 1.72c.127.96.361 1.903.7 2.81a2 2 0 0 1-.45 2.11L7.91 8.91a16 16 0 0 0 6 6l1-1a2 2 0 0 1 2.11-.45c.907.339 1.85.573 2.81.7A2 2 0 0 1 22 16.92z',\n email: 'M4 4h16a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2z M22 7l-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7',\n sms: 'M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z',\n task: 'M9 11l3 3L22 4 M21 12v7a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11',\n doc: 'M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z M14 2v6h6',\n money: 'M12 1v22 M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6',\n deal: 'M22 7l-8.5 8.5-5-5L2 17 M16 7h6v6',\n survey: 'M9 5H7a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2h-2 M10 3h4a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1h-4a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1z M9 12h6 M9 16h4',\n property: 'M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z M9 22V12h6v10',\n search: 'M11 3a8 8 0 1 0 0 16 8 8 0 0 0 0-16z M21 21l-4.35-4.35',\n heart: 'M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z',\n calc: 'M6 2h12a2 2 0 0 1 2 2v16a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2z M8 6h8 M8 10h2 M14 10h2 M8 14h2 M14 14h2 M8 18h2 M14 18h2',\n repeat: 'M17 1l4 4-4 4 M3 11V9a4 4 0 0 1 4-4h14 M7 23l-4-4 4-4 M21 13v2a4 4 0 0 1-4 4H3',\n};\nconst CALENDAR_PATH = 'M5 4h14a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2z M16 2v4 M8 2v4 M3 10h18';\nconst EDIT_PATH = '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';\nconst TRASH_PATH = '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';\n\n/**\n * Record row for the cards of a detail page (tasks, documents, deals, expenses, matches, surveys...). The layout is fixed;\n * pass inputs only:\n *\n * [dot | round icon] [title] [type badge] [status badge] [Edit] [View]\n * [description] [inline link]\n * [calendar icon + date]\n *\n * Each row is a bordered rounded box, 8px apart; put the rows straight in a `ui-detail-card` body (or in a `ui-list` template).\n *\n * <ui-card-list-item title=\"Call John\" indicator=\"high\" type=\"Meeting\" status=\"Pending\" statusVariant=\"gray\"\n * date=\"Due Aug 21, 2026\" description=\"Follow up about the offer\"\n * [editButton]=\"true\" (editClick)=\"edit(t)\" [viewButton]=\"true\" (viewClick)=\"view(t)\" />\n *\n * Links: the library has no router, so a link is content you project and the app owns (`routerLink` etc.):\n * - `<a card-list-action class=\"cli-chip cli-chip--view\" routerLink=\"/x\">View</a>` at the row end (blue chip, like the View button);\n * - `<a card-list-inline class=\"cli-inline-link\" routerLink=\"/x\">View ...</a>` at the end of the description line.\n * Other projected content (default slot) shows after the chips at the row end; `[card-stats]` and `[card-detail]` add a footer row\n * under the row (use the `.cli-stat`, `.cli-stat-label`, `.cli-stat-value`, `.cli-stat-divider` classes inside `[card-stats]`).\n *\n * Delete and a generic action (additive; unused = the row looks exactly as before). Row-end order: Edit, View, action, delete, then projected content.\n * - `[deletable]=\"true\"` shows a red icon-only trash button (28px, 44px hit area on touch) -> `(delete)`; name it with `deleteLabel` (default \"Delete\"), `deleteTestId` sets its `data-testid`.\n * The page owns the confirmation (the component never deletes anything itself).\n * - `actionLabel=\"Download\"` shows a grey chip button with that text -> `(action)`; `actionTestId`, `actionAriaLabel` as for the other buttons.\n *\n * Accessibility: the Edit / View buttons are real buttons; give them a longer name with `editAriaLabel` / `viewAriaLabel`\n * (\"Edit task Call John\") when the visible word alone is ambiguous in a list. The priority dot (`high`/`medium`/`low`) has a tooltip and an\n * accessible name (`High priority`, ...), is focusable so the tooltip works by keyboard; `blue`/`green` dots are decorative. The icon circle is decorative.\n */\n@Component({\n selector: 'ui-card-list-item',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [BadgeComponent, TooltipDirective],\n template: `\n @if (hasBadges()) {\n <div class=\"cli-badges\">\n @if (type()) { <ui-badge [label]=\"type()!\" [variant]=\"typeVariant()\" /> }\n @if (status() && statusVariant()) { <ui-badge [label]=\"status()!\" [variant]=\"statusVariant()!\" /> }\n </div>\n }\n <div class=\"cli-row\" [class.cli-row--badges]=\"hasBadges()\" [class.cli-row--badges-2]=\"hasBadges() && !!type() && !!status() && !!statusVariant()\" [class.cli-row--badges-chip]=\"hasBadges() && hasBuiltInChip()\">\n @if (iconPath(); as d) {\n <div class=\"cli-icon-circle\" [class]=\"'cli-icon-circle cli-icon-circle--' + icon()\" aria-hidden=\"true\">\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" focusable=\"false\"><path [attr.d]=\"d\" /></svg>\n </div>\n } @else if (indicator() !== 'none') {\n @if (indicatorLabel(); as label) {\n <div class=\"cli-dot\" [class]=\"'cli-dot cli-dot--' + indicator()\" [uiTooltip]=\"label\" tabindex=\"0\" role=\"img\" [attr.aria-label]=\"label\"></div>\n } @else {\n <div class=\"cli-dot\" [class]=\"'cli-dot cli-dot--' + indicator()\" aria-hidden=\"true\"></div>\n }\n }\n\n <div class=\"cli-body\">\n <div class=\"cli-title-row\">\n <span class=\"cli-title\">{{ title() }}</span>\n </div>\n <div class=\"cli-desc-row\">\n @if (description()) { <span class=\"cli-description\">{{ description() }}</span> }\n <ng-content select=\"[card-list-inline]\" />\n </div>\n @if (date()) {\n <span class=\"cli-date\">\n <svg width=\"11\" height=\"11\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\" focusable=\"false\"><path [attr.d]=\"calendarPath\" /></svg>\n {{ date() }}\n </span>\n }\n </div>\n\n @if (editButton()) {\n <button class=\"cli-chip cli-chip--edit\" type=\"button\" [attr.aria-label]=\"editAriaLabel() || null\" (click)=\"editClick.emit()\">\n <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 [attr.d]=\"editPath\" /></svg>{{ labels.t('common.edit') }}</button>\n }\n @if (viewButton()) {\n <button class=\"cli-chip cli-chip--view\" type=\"button\" [attr.aria-label]=\"viewAriaLabel() || null\" (click)=\"viewClick.emit()\">{{ labels.t('common.view') }}</button>\n }\n @if (actionLabel()) {\n <button class=\"cli-chip cli-chip--action\" type=\"button\" [attr.data-testid]=\"actionTestId() || null\" [attr.aria-label]=\"actionAriaLabel() || null\" (click)=\"action.emit()\">{{ actionLabel() }}</button>\n }\n @if (deletable()) {\n <button class=\"cli-chip cli-chip--delete\" type=\"button\" [attr.data-testid]=\"deleteTestId() || null\" [attr.aria-label]=\"deleteLabel() || labels.t('common.delete')\" (click)=\"delete.emit()\">\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\" focusable=\"false\"><path [attr.d]=\"trashPath\" /></svg>\n </button>\n }\n <ng-content select=\"[card-list-action]\" />\n <ng-content />\n </div>\n <ng-content select=\"[card-stats]\" />\n <ng-content select=\"[card-detail]\" />\n `,\n styles: [`\n ui-card-list-item { position: relative; display: block; border: 1px solid #e2e8f0; border-radius: 8px; overflow: hidden; margin-bottom: 8px; }\n ui-card-list-item:last-child { margin-bottom: 0; }\n ui-card-list-item .cli-row { display: flex; align-items: flex-start; gap: 12px; padding: 13px 18px; transition: background 0.12s; }\n ui-card-list-item .cli-row:hover { background: #f8fafc; }\n @media (prefers-reduced-motion: reduce) { ui-card-list-item .cli-row { transition: none; } }\n\n ui-card-list-item .cli-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; margin-top: 5px; }\n ui-card-list-item .cli-dot:focus-visible { outline: 2px solid #3b82f6; outline-offset: 2px; }\n ui-card-list-item .cli-dot--high { background: #ef4444; }\n ui-card-list-item .cli-dot--medium { background: #f59e0b; }\n ui-card-list-item .cli-dot--low { background: #94a3b8; }\n ui-card-list-item .cli-dot--blue { background: #3b82f6; }\n ui-card-list-item .cli-dot--green { background: #22c55e; }\n\n ui-card-list-item .cli-icon-circle { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }\n ui-card-list-item .cli-icon-circle--call { background: #dbeafe; color: #2563eb; }\n ui-card-list-item .cli-icon-circle--email { background: #dcfce7; color: #16a34a; }\n ui-card-list-item .cli-icon-circle--sms { background: #fef9c3; color: #ca8a04; }\n ui-card-list-item .cli-icon-circle--task { background: #dbeafe; color: #2563eb; }\n ui-card-list-item .cli-icon-circle--doc { background: #ffedd5; color: #ea580c; }\n ui-card-list-item .cli-icon-circle--money { background: #d1fae5; color: #059669; }\n ui-card-list-item .cli-icon-circle--deal { background: #e0f2fe; color: #0284c7; }\n ui-card-list-item .cli-icon-circle--survey { background: #dbeafe; color: #2563eb; }\n ui-card-list-item .cli-icon-circle--property { background: #fef3c7; color: #d97706; }\n ui-card-list-item .cli-icon-circle--search { background: #e0f2fe; color: #0284c7; }\n ui-card-list-item .cli-icon-circle--heart { background: #fce7f3; color: #db2777; }\n ui-card-list-item .cli-icon-circle--calc { background: #d1fae5; color: #059669; }\n ui-card-list-item .cli-icon-circle--repeat { background: #e0f2fe; color: #0284c7; }\n\n ui-card-list-item .cli-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; overflow-wrap: anywhere; word-break: break-word; } /* word-break: Safari < 15.4 has no overflow-wrap: anywhere */\n /* The type / status badges always sit in the upper right corner of the card; the text keeps clear of them and a View / Edit chip drops to the bottom right. */\n ui-card-list-item .cli-badges { position: absolute; top: 10px; right: 12px; display: flex; align-items: center; gap: 6px; z-index: 1; }\n ui-card-list-item .cli-row--badges .cli-body { padding-right: 96px; }\n ui-card-list-item .cli-row--badges-2 .cli-body { padding-right: 190px; }\n ui-card-list-item .cli-row--badges .cli-chip { align-self: flex-end; }\n /* A row with a badge AND a chip must be tall enough for both: the badge is pinned top-right (10px inset + ~22px) and the chip sits bottom-right, so in a short two-line row they overlapped.\n 13px row padding + 28px chip (44px on touch) + the badge's 33px => 76px (92px on touch). The built-in chips set the class; a projected [card-list-action] is matched with :has() (Chrome 105+, Safari 15.4+, Firefox 121+; older browsers keep the old layout). */\n ui-card-list-item .cli-row--badges-chip { box-sizing: border-box; min-height: 76px; }\n ui-card-list-item .cli-row--badges:has([card-list-action]) { box-sizing: border-box; min-height: 76px; }\n @media (pointer: coarse), (max-width: 480px) {\n ui-card-list-item .cli-row--badges-chip { min-height: 92px; }\n ui-card-list-item .cli-row--badges:has([card-list-action]) { min-height: 92px; }\n }\n ui-card-list-item .cli-title-row { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }\n ui-card-list-item .cli-title { font-size: 0.875rem; font-weight: 600; color: #1e293b; }\n ui-card-list-item .cli-desc-row { display: flex; align-items: center; gap: 8px; }\n ui-card-list-item .cli-desc-row:empty { display: none; }\n ui-card-list-item .cli-description { font-size: 0.8125rem; color: #64748b; min-width: 0; }\n ui-card-list-item .cli-date { display: flex; align-items: center; gap: 4px; font-size: 0.75rem; color: #64748b; } /* #64748b: 4.76:1 on white (WCAG AA); the old #94a3b8 was 2.6:1 */\n\n /* Row-end chips: the built-in Edit / View buttons, and any projected link given the same classes. */\n ui-card-list-item .cli-chip {\n flex-shrink: 0; display: inline-flex; align-items: center; gap: 5px; align-self: center; box-sizing: border-box;\n font-family: inherit; font-size: 0.8rem; font-weight: 500; line-height: 1.4; background: none; cursor: pointer;\n padding: 4px 10px; border-radius: 6px; text-decoration: none; transition: background 0.15s, color 0.15s, border-color 0.15s;\n }\n ui-card-list-item .cli-chip--edit { color: #64748b; border: 1px solid #e2e8f0; }\n ui-card-list-item .cli-chip--edit:hover { background: #f1f5f9; color: #1e293b; }\n ui-card-list-item .cli-chip--view { color: #2563eb; border: 1px solid #dbeafe; }\n ui-card-list-item .cli-chip--view:hover { background: #eff6ff; border-color: #bfdbfe; color: #1d4ed8; }\n ui-card-list-item .cli-chip--action { color: #475569; border: 1px solid #e2e8f0; }\n ui-card-list-item .cli-chip--action:hover { background: #f1f5f9; color: #1e293b; }\n /* Icon-only delete: 28px look; on touch screens the hit area grows to 44px with an invisible ::after (the look does not change). */\n ui-card-list-item .cli-chip--delete { position: relative; justify-content: center; width: 28px; height: 28px; padding: 0; color: #b91c1c; border: 1px solid #fecaca; }\n ui-card-list-item .cli-chip--delete:hover { background: #fef2f2; border-color: #fca5a5; color: #991b1b; }\n ui-card-list-item .cli-chip--delete::after { content: ''; position: absolute; top: 50%; left: 50%; width: 44px; height: 44px; transform: translate(-50%, -50%); }\n ui-card-list-item .cli-chip:focus-visible,\n ui-card-list-item .cli-inline-link:focus-visible { outline: 2px solid #3b82f6; outline-offset: 2px; }\n ui-card-list-item .cli-inline-link {\n flex-shrink: 0; margin-left: auto; display: inline-flex; align-items: center; gap: 4px;\n font-size: 0.8rem; font-weight: 500; color: #2563eb; text-decoration: none; transition: color 0.15s;\n }\n ui-card-list-item .cli-inline-link:hover { color: #1d4ed8; }\n @media (pointer: coarse), (max-width: 480px) {\n ui-card-list-item .cli-chip { min-height: 44px; padding: 4px 14px; } /* touch target */\n ui-card-list-item .cli-chip--delete { min-height: 28px; padding: 0; } /* 28px look, 44px hit area from ::after */\n }\n /* Narrow rows (phones, 320px): the badges leave the corner and sit in a row above the text (so the text keeps its full width instead of\n 96-190px of padding), the row padding shrinks and the 44px chips wrap under the text instead of squeezing it. Declared after the touch rules above so it wins. */\n @media (max-width: 480px) {\n ui-card-list-item .cli-row { flex-wrap: wrap; gap: 8px 12px; padding: 12px; }\n ui-card-list-item .cli-body { flex: 1 1 160px; }\n ui-card-list-item .cli-badges { position: static; flex-wrap: wrap; padding: 10px 12px 0; }\n ui-card-list-item .cli-row--badges .cli-body, ui-card-list-item .cli-row--badges-2 .cli-body { padding-right: 0; }\n ui-card-list-item .cli-row--badges .cli-chip { align-self: center; }\n ui-card-list-item .cli-row--badges-chip, ui-card-list-item .cli-row--badges:has([card-list-action]) { min-height: 0; }\n }\n\n ui-card-list-item [card-stats] { display: flex; align-items: stretch; background: #f8fafc; border-top: 1px solid #f1f5f9; }\n ui-card-list-item [card-detail] { background: #f8fafc; border-top: 1px solid #e2e8f0; }\n ui-card-list-item .cli-stat { flex: 1; display: flex; flex-direction: column; gap: 2px; padding: 10px 14px; }\n ui-card-list-item .cli-stat-label { font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: #64748b; }\n ui-card-list-item .cli-stat-value { font-size: 0.9375rem; font-weight: 600; color: #0f172a; }\n ui-card-list-item .cli-stat-divider { width: 1px; background: #e2e8f0; margin: 8px 0; }\n `],\n})\nexport class CardListItemComponent {\n protected readonly labels = inject(UiLabelsService);\n readonly title = input('');\n readonly description = input<string | undefined>(undefined);\n /** Date text with a small calendar icon, e.g. \"Due Aug 21, 2026\". Pre-formatted by the page. */\n readonly date = input<string | undefined>(undefined);\n /** Badge after the title; `typeVariant` colours it (default `gray`). */\n readonly type = input<string | undefined>(undefined);\n readonly typeVariant = input<BadgeVariant>('gray');\n /** Second badge; shown only together with `statusVariant`. */\n readonly status = input<string | undefined>(undefined);\n readonly statusVariant = input<BadgeVariant | undefined>(undefined);\n /** Priority dot on the left (ignored when `icon` is set). */\n readonly indicator = input<CardListIndicator>('none');\n /** Round icon on the left (wins over `indicator`). */\n readonly icon = input<CardListIcon | undefined>(undefined);\n /** A type badge or a status badge (with its variant) shows: they sit in the card's upper right corner. */\n protected readonly hasBadges = computed(() => !!this.type() || (!!this.status() && !!this.statusVariant()));\n /** Built-in \"Edit\" chip button -> `editClick`. */\n readonly editButton = input(false);\n /** Built-in \"View\" chip button -> `viewClick`. */\n readonly viewButton = input(false);\n /** Accessible names for the buttons when the visible word is not enough (\"Edit task Call John\"). */\n readonly editAriaLabel = input('');\n readonly viewAriaLabel = input('');\n /** Built-in icon-only trash button -> `delete`. The accessible name comes from `deleteLabel` (\"Delete task Call John\"). */\n readonly deletable = input(false);\n readonly deleteLabelInput = input<string | null>(null, { alias: 'deleteLabel' });\n readonly deleteLabel = computed(() => this.deleteLabelInput() ?? this.labels.t('cardListItem.deleteLabel'));\n /** `data-testid` of the delete button (none when empty). */\n readonly deleteTestId = input('');\n /** Built-in secondary chip button (text = `actionLabel`, e.g. \"Download\") -> `action`; shown only while `actionLabel` is not empty. */\n readonly actionLabel = input('');\n readonly actionTestId = input('');\n readonly actionAriaLabel = input('');\n /** A built-in Edit / View / action / delete button shows (the row then keeps a minimum height so a badge and a chip never overlap). */\n protected readonly hasBuiltInChip = computed(() => this.editButton() || this.viewButton() || !!this.actionLabel() || this.deletable());\n readonly editClick = output<void>();\n readonly viewClick = output<void>();\n readonly delete = output<void>();\n readonly action = output<void>();\n\n protected readonly calendarPath = CALENDAR_PATH;\n protected readonly editPath = EDIT_PATH;\n protected readonly trashPath = TRASH_PATH;\n protected readonly iconPath = computed(() => { const i = this.icon(); return i ? ICON_PATHS[i] ?? null : null; });\n protected readonly indicatorLabel = computed(() => {\n const key = ({ high: 'cardListItem.priorityHigh', medium: 'cardListItem.priorityMedium', low: 'cardListItem.priorityLow' } as Record<string, UiLabelKey>)[this.indicator()];\n return key ? this.labels.t(key) : '';\n });\n}\n"],"mappings":";;;;;AAYA,MAAM,aAA2C;CAC/C,MAAM;CACN,OAAO;CACP,KAAK;CACL,MAAM;CACN,KAAK;CACL,OAAO;CACP,MAAM;CACN,QAAQ;CACR,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwDT,UAAA;GAAA,QAAA,CAAA,g8LAAA;GAAA,cAAA,CAAA;IAAA,MAAA;IAAA,MAzDS;IAAc,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;GAAA,eAAA,GAAA,kBAAA;EAAA,CAAA;CAAA;;AA2J/B,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAqB,YAAA,CAAA;EAhKjC,MAAA;EACW,MAAA,CAAA;GAAA,UAAA;GAAmB,YACjB;GAAI,iBACC,wBAAwB;GAAM,eAChC,kBAAkB;GAAI,SAC5B,CAAC,gBAAgB,gBAAgB;GAAC,UACjC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwDT,QAAA,CAAA,g8LAAA;EAAA,CAAA"}
|
|
1
|
+
{"version":3,"file":"forgeroute-ui-card-list-item.mjs","names":[],"sources":["../../../projects/forgeroute-ui/card-list-item/src/lib/card-list-item/card-list-item.component.ts"],"sourcesContent":["import { Component, ChangeDetectionStrategy, ViewEncapsulation, computed, input, output, inject } from '@angular/core';\nimport { BadgeComponent } from '@forgeroute/ui/badge';\nimport { TooltipDirective } from '@forgeroute/ui/tooltip';\nimport { BadgeVariant } from '@forgeroute/ui/table-types';\nimport { UiLabelKey, UiLabelsService } from '@forgeroute/ui/core';\n\n/** Colour of the priority dot (`high` red, `medium` amber, `low` grey, `blue`, `green`); `none` = no dot. */\nexport type CardListIndicator = 'high' | 'medium' | 'low' | 'blue' | 'green' | 'none';\n/** Icon of the round marker on the left. */\nexport type CardListIcon = 'call' | 'email' | 'sms' | 'task' | 'doc' | 'money' | 'deal' | 'survey' | 'property' | 'search' | 'heart' | 'calc' | 'repeat';\n\n/** SVG path data (24x24 viewBox, stroke icons) of every `CardListIcon`. */\nconst ICON_PATHS: Record<CardListIcon, string> = {\n call: 'M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07A19.5 19.5 0 0 1 4.69 12a19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 3.6 1.27h3a2 2 0 0 1 2 1.72c.127.96.361 1.903.7 2.81a2 2 0 0 1-.45 2.11L7.91 8.91a16 16 0 0 0 6 6l1-1a2 2 0 0 1 2.11-.45c.907.339 1.85.573 2.81.7A2 2 0 0 1 22 16.92z',\n email: 'M4 4h16a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2z M22 7l-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7',\n sms: 'M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z',\n task: 'M9 11l3 3L22 4 M21 12v7a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11',\n doc: 'M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z M14 2v6h6',\n money: 'M12 1v22 M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6',\n deal: 'M22 7l-8.5 8.5-5-5L2 17 M16 7h6v6',\n survey: 'M9 5H7a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2h-2 M10 3h4a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1h-4a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1z M9 12h6 M9 16h4',\n property: 'M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z M9 22V12h6v10',\n search: 'M11 3a8 8 0 1 0 0 16 8 8 0 0 0 0-16z M21 21l-4.35-4.35',\n heart: 'M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z',\n calc: 'M6 2h12a2 2 0 0 1 2 2v16a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2z M8 6h8 M8 10h2 M14 10h2 M8 14h2 M14 14h2 M8 18h2 M14 18h2',\n repeat: 'M17 1l4 4-4 4 M3 11V9a4 4 0 0 1 4-4h14 M7 23l-4-4 4-4 M21 13v2a4 4 0 0 1-4 4H3',\n};\nconst CALENDAR_PATH = 'M5 4h14a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2z M16 2v4 M8 2v4 M3 10h18';\nconst EDIT_PATH = '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';\nconst EYE_PATH = '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';\nconst TRASH_PATH = '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';\n\n/**\n * Record row for the cards of a detail page (tasks, documents, deals, expenses, matches, surveys...). The layout is fixed;\n * pass inputs only:\n *\n * [dot | round icon] [title] [type badge] [status badge] [Edit] [View]\n * [description] [inline link]\n * [calendar icon + date]\n *\n * Each row is a bordered rounded box, 8px apart; put the rows straight in a `ui-detail-card` body (or in a `ui-list` template).\n *\n * <ui-card-list-item title=\"Call John\" indicator=\"high\" type=\"Meeting\" status=\"Pending\" statusVariant=\"gray\"\n * date=\"Due Aug 21, 2026\" description=\"Follow up about the offer\"\n * [editButton]=\"true\" (editClick)=\"edit(t)\" [viewButton]=\"true\" (viewClick)=\"view(t)\" />\n *\n * Links: the library has no router, so a link is content you project and the app owns (`routerLink` etc.):\n * - `<a card-list-action class=\"cli-chip cli-chip--view\" routerLink=\"/x\">View</a>` at the row end (blue chip, like the View button);\n * - `<a card-list-inline class=\"cli-inline-link\" routerLink=\"/x\">View ...</a>` at the end of the description line.\n * Other projected content (default slot) shows after the chips at the row end; `[card-stats]` and `[card-detail]` add a footer row\n * under the row (use the `.cli-stat`, `.cli-stat-label`, `.cli-stat-value`, `.cli-stat-divider` classes inside `[card-stats]`).\n *\n * Delete and a generic action (additive; unused = the row looks exactly as before). Row-end order: Edit, View, action, delete, then projected content.\n * - `[deletable]=\"true\"` shows a red chip with a trash icon and the word Delete, like the Edit chip (44px high on touch) -> `(delete)`; name it with `deleteLabel` (default \"Delete\"), `deleteTestId` sets its `data-testid`.\n * The page owns the confirmation (the component never deletes anything itself).\n * - `actionLabel=\"Download\"` shows a grey chip button with that text -> `(action)`; `actionIcon` (the `d` of a 24x24 stroke path) puts an icon before the text like every other chip; `actionTestId`, `actionAriaLabel` as for the other buttons.\n *\n * Accessibility: the Edit / View buttons are real buttons; give them a longer name with `editAriaLabel` / `viewAriaLabel`\n * (\"Edit task Call John\") when the visible word alone is ambiguous in a list. The priority dot (`high`/`medium`/`low`) has a tooltip and an\n * accessible name (`High priority`, ...), is focusable so the tooltip works by keyboard; `blue`/`green` dots are decorative. The icon circle is decorative.\n */\n@Component({\n selector: 'ui-card-list-item',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [BadgeComponent, TooltipDirective],\n template: `\n @if (hasBadges()) {\n <div class=\"cli-badges\">\n @if (type()) { <ui-badge [label]=\"type()!\" [variant]=\"typeVariant()\" /> }\n @if (status() && statusVariant()) { <ui-badge [label]=\"status()!\" [variant]=\"statusVariant()!\" /> }\n </div>\n }\n <div class=\"cli-row\" [class.cli-row--badges]=\"hasBadges()\" [class.cli-row--badges-2]=\"hasBadges() && !!type() && !!status() && !!statusVariant()\" [class.cli-row--badges-chip]=\"hasBadges() && hasBuiltInChip()\">\n @if (iconPath(); as d) {\n <div class=\"cli-icon-circle\" [class]=\"'cli-icon-circle cli-icon-circle--' + icon()\" aria-hidden=\"true\">\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" focusable=\"false\"><path [attr.d]=\"d\" /></svg>\n </div>\n } @else if (indicator() !== 'none') {\n @if (indicatorLabel(); as label) {\n <div class=\"cli-dot\" [class]=\"'cli-dot cli-dot--' + indicator()\" [uiTooltip]=\"label\" tabindex=\"0\" role=\"img\" [attr.aria-label]=\"label\"></div>\n } @else {\n <div class=\"cli-dot\" [class]=\"'cli-dot cli-dot--' + indicator()\" aria-hidden=\"true\"></div>\n }\n }\n\n <div class=\"cli-body\">\n <div class=\"cli-title-row\">\n <span class=\"cli-title\">{{ title() }}</span>\n </div>\n <div class=\"cli-desc-row\">\n @if (description()) { <span class=\"cli-description\">{{ description() }}</span> }\n <ng-content select=\"[card-list-inline]\" />\n </div>\n @if (date()) {\n <span class=\"cli-date\">\n <svg width=\"11\" height=\"11\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\" focusable=\"false\"><path [attr.d]=\"calendarPath\" /></svg>\n {{ date() }}\n </span>\n }\n </div>\n\n @if (editButton()) {\n <button class=\"cli-chip cli-chip--edit\" type=\"button\" [attr.aria-label]=\"editAriaLabel() || null\" (click)=\"editClick.emit()\">\n <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 [attr.d]=\"editPath\" /></svg>{{ labels.t('common.edit') }}</button>\n }\n @if (viewButton()) {\n <button class=\"cli-chip cli-chip--view\" type=\"button\" [attr.aria-label]=\"viewAriaLabel() || null\" (click)=\"viewClick.emit()\">\n <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 [attr.d]=\"eyePath\" /></svg>{{ labels.t('common.view') }}</button>\n }\n @if (actionLabel()) {\n <button class=\"cli-chip cli-chip--action\" type=\"button\" [attr.data-testid]=\"actionTestId() || null\" [attr.aria-label]=\"actionAriaLabel() || null\" (click)=\"action.emit()\">\n @if (actionIcon()) { <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 [attr.d]=\"actionIcon()\" /></svg> }{{ actionLabel() }}</button>\n }\n @if (deletable()) {\n <button class=\"cli-chip cli-chip--delete\" type=\"button\" [attr.data-testid]=\"deleteTestId() || null\" [attr.aria-label]=\"deleteLabel() || labels.t('common.delete')\" (click)=\"delete.emit()\">\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\" focusable=\"false\"><path [attr.d]=\"trashPath\" /></svg>{{ labels.t('common.delete') }}\n </button>\n }\n <ng-content select=\"[card-list-action]\" />\n <ng-content />\n </div>\n <ng-content select=\"[card-stats]\" />\n <ng-content select=\"[card-detail]\" />\n `,\n styles: [`\n ui-card-list-item { position: relative; display: block; border: 1px solid #e2e8f0; border-radius: 8px; overflow: hidden; margin-bottom: 8px; }\n ui-card-list-item:last-child { margin-bottom: 0; }\n ui-card-list-item .cli-row { display: flex; align-items: flex-start; gap: 12px; padding: 13px 18px; transition: background 0.12s; }\n ui-card-list-item .cli-row:hover { background: #f8fafc; }\n @media (prefers-reduced-motion: reduce) { ui-card-list-item .cli-row { transition: none; } }\n\n ui-card-list-item .cli-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; margin-top: 5px; }\n ui-card-list-item .cli-dot:focus-visible { outline: 2px solid #3b82f6; outline-offset: 2px; }\n ui-card-list-item .cli-dot--high { background: #ef4444; }\n ui-card-list-item .cli-dot--medium { background: #f59e0b; }\n ui-card-list-item .cli-dot--low { background: #94a3b8; }\n ui-card-list-item .cli-dot--blue { background: #3b82f6; }\n ui-card-list-item .cli-dot--green { background: #22c55e; }\n\n ui-card-list-item .cli-icon-circle { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }\n ui-card-list-item .cli-icon-circle--call { background: #dbeafe; color: #2563eb; }\n ui-card-list-item .cli-icon-circle--email { background: #dcfce7; color: #16a34a; }\n ui-card-list-item .cli-icon-circle--sms { background: #fef9c3; color: #ca8a04; }\n ui-card-list-item .cli-icon-circle--task { background: #dbeafe; color: #2563eb; }\n ui-card-list-item .cli-icon-circle--doc { background: #ffedd5; color: #ea580c; }\n ui-card-list-item .cli-icon-circle--money { background: #d1fae5; color: #059669; }\n ui-card-list-item .cli-icon-circle--deal { background: #e0f2fe; color: #0284c7; }\n ui-card-list-item .cli-icon-circle--survey { background: #dbeafe; color: #2563eb; }\n ui-card-list-item .cli-icon-circle--property { background: #fef3c7; color: #d97706; }\n ui-card-list-item .cli-icon-circle--search { background: #e0f2fe; color: #0284c7; }\n ui-card-list-item .cli-icon-circle--heart { background: #fce7f3; color: #db2777; }\n ui-card-list-item .cli-icon-circle--calc { background: #d1fae5; color: #059669; }\n ui-card-list-item .cli-icon-circle--repeat { background: #e0f2fe; color: #0284c7; }\n\n ui-card-list-item .cli-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; overflow-wrap: anywhere; word-break: break-word; } /* word-break: Safari < 15.4 has no overflow-wrap: anywhere */\n /* The type / status badges always sit in the upper right corner of the card; the text keeps clear of them and a View / Edit chip drops to the bottom right. */\n ui-card-list-item .cli-badges { position: absolute; top: 10px; right: 12px; display: flex; align-items: center; gap: 6px; z-index: 1; }\n ui-card-list-item .cli-row--badges .cli-body { padding-right: 96px; }\n ui-card-list-item .cli-row--badges-2 .cli-body { padding-right: 190px; }\n ui-card-list-item .cli-row--badges .cli-chip { align-self: flex-end; }\n /* A row with a badge AND a chip must be tall enough for both: the badge is pinned top-right (10px inset + ~22px) and the chip sits bottom-right, so in a short two-line row they overlapped.\n 13px row padding + 28px chip (44px on touch) + the badge's 33px + 14px of air between badge and chip => 90px (106px on touch). The built-in chips set the class; a projected [card-list-action] is matched with :has() (Chrome 105+, Safari 15.4+, Firefox 121+; older browsers keep the old layout). */\n ui-card-list-item .cli-row--badges-chip { box-sizing: border-box; min-height: 90px; }\n ui-card-list-item .cli-row--badges:has([card-list-action]) { box-sizing: border-box; min-height: 90px; }\n @media (pointer: coarse), (max-width: 480px) {\n ui-card-list-item .cli-row--badges-chip { min-height: 106px; }\n ui-card-list-item .cli-row--badges:has([card-list-action]) { min-height: 106px; }\n }\n ui-card-list-item .cli-title-row { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }\n ui-card-list-item .cli-title { font-size: 0.875rem; font-weight: 600; color: #1e293b; }\n ui-card-list-item .cli-desc-row { display: flex; align-items: center; gap: 8px; }\n ui-card-list-item .cli-desc-row:empty { display: none; }\n ui-card-list-item .cli-description { font-size: 0.8125rem; color: #64748b; min-width: 0; }\n ui-card-list-item .cli-date { display: flex; align-items: center; gap: 4px; font-size: 0.75rem; color: #64748b; } /* #64748b: 4.76:1 on white (WCAG AA); the old #94a3b8 was 2.6:1 */\n\n /* Row-end chips: the built-in Edit / View buttons, and any projected link given the same classes. */\n ui-card-list-item .cli-chip {\n flex-shrink: 0; display: inline-flex; align-items: center; gap: 5px; align-self: center; box-sizing: border-box;\n font-family: inherit; font-size: 0.8rem; font-weight: 500; line-height: 1.4; background: none; cursor: pointer;\n padding: 4px 10px; border-radius: 6px; text-decoration: none; transition: background 0.15s, color 0.15s, border-color 0.15s;\n }\n ui-card-list-item .cli-chip--edit { color: #64748b; border: 1px solid #e2e8f0; }\n ui-card-list-item .cli-chip--edit:hover { background: #f1f5f9; color: #1e293b; }\n ui-card-list-item .cli-chip--view { color: #2563eb; border: 1px solid #dbeafe; }\n ui-card-list-item .cli-chip--view:hover { background: #eff6ff; border-color: #bfdbfe; color: #1d4ed8; }\n ui-card-list-item .cli-chip--action { color: #475569; border: 1px solid #e2e8f0; }\n ui-card-list-item .cli-chip--action:hover { background: #f1f5f9; color: #1e293b; }\n /* Delete is a chip like Edit (trash icon + the word Delete, 4px 10px padding, 44px high on touch through the shared .cli-chip rule); only its colours are its own. */\n ui-card-list-item .cli-chip--delete { color: #b91c1c; border: 1px solid #fecaca; }\n ui-card-list-item .cli-chip--delete:hover { background: #fef2f2; border-color: #fca5a5; color: #991b1b; }\n ui-card-list-item .cli-chip:focus-visible,\n ui-card-list-item .cli-inline-link:focus-visible { outline: 2px solid #3b82f6; outline-offset: 2px; }\n ui-card-list-item .cli-inline-link {\n flex-shrink: 0; margin-left: auto; display: inline-flex; align-items: center; gap: 4px;\n font-size: 0.8rem; font-weight: 500; color: #2563eb; text-decoration: none; transition: color 0.15s;\n }\n ui-card-list-item .cli-inline-link:hover { color: #1d4ed8; }\n @media (pointer: coarse), (max-width: 480px) {\n ui-card-list-item .cli-chip { min-height: 44px; padding: 4px 14px; } /* touch target */\n }\n /* Narrow rows (phones, 320px): the badges leave the corner and sit in a row above the text (so the text keeps its full width instead of\n 96-190px of padding), the row padding shrinks and the 44px chips wrap under the text instead of squeezing it. Declared after the touch rules above so it wins. */\n @media (max-width: 480px) {\n ui-card-list-item .cli-row { flex-wrap: wrap; gap: 8px 12px; padding: 12px; }\n ui-card-list-item .cli-body { flex: 1 1 160px; }\n ui-card-list-item .cli-badges { position: static; flex-wrap: wrap; padding: 10px 12px 0; }\n ui-card-list-item .cli-row--badges .cli-body, ui-card-list-item .cli-row--badges-2 .cli-body { padding-right: 0; }\n ui-card-list-item .cli-row--badges .cli-chip { align-self: center; }\n ui-card-list-item .cli-row--badges-chip, ui-card-list-item .cli-row--badges:has([card-list-action]) { min-height: 0; }\n }\n\n ui-card-list-item [card-stats] { display: flex; align-items: stretch; background: #f8fafc; border-top: 1px solid #f1f5f9; }\n ui-card-list-item [card-detail] { background: #f8fafc; border-top: 1px solid #e2e8f0; }\n ui-card-list-item .cli-stat { flex: 1; display: flex; flex-direction: column; gap: 2px; padding: 10px 14px; }\n ui-card-list-item .cli-stat-label { font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: #64748b; }\n ui-card-list-item .cli-stat-value { font-size: 0.9375rem; font-weight: 600; color: #0f172a; }\n ui-card-list-item .cli-stat-divider { width: 1px; background: #e2e8f0; margin: 8px 0; }\n `],\n})\nexport class CardListItemComponent {\n protected readonly labels = inject(UiLabelsService);\n readonly title = input('');\n readonly description = input<string | undefined>(undefined);\n /** Date text with a small calendar icon, e.g. \"Due Aug 21, 2026\". Pre-formatted by the page. */\n readonly date = input<string | undefined>(undefined);\n /** Badge after the title; `typeVariant` colours it (default `gray`). */\n readonly type = input<string | undefined>(undefined);\n readonly typeVariant = input<BadgeVariant>('gray');\n /** Second badge; shown only together with `statusVariant`. */\n readonly status = input<string | undefined>(undefined);\n readonly statusVariant = input<BadgeVariant | undefined>(undefined);\n /** Priority dot on the left (ignored when `icon` is set). */\n readonly indicator = input<CardListIndicator>('none');\n /** Round icon on the left (wins over `indicator`). */\n readonly icon = input<CardListIcon | undefined>(undefined);\n /** A type badge or a status badge (with its variant) shows: they sit in the card's upper right corner. */\n protected readonly hasBadges = computed(() => !!this.type() || (!!this.status() && !!this.statusVariant()));\n /** Built-in \"Edit\" chip button -> `editClick`. */\n readonly editButton = input(false);\n /** Built-in \"View\" chip button -> `viewClick`. */\n readonly viewButton = input(false);\n /** Accessible names for the buttons when the visible word is not enough (\"Edit task Call John\"). */\n readonly editAriaLabel = input('');\n readonly viewAriaLabel = input('');\n /** Built-in red chip (trash icon + the word Delete, like the Edit chip) -> `delete`. The accessible name comes from `deleteLabel` (\"Delete task Call John\"). */\n readonly deletable = input(false);\n readonly deleteLabelInput = input<string | null>(null, { alias: 'deleteLabel' });\n readonly deleteLabel = computed(() => this.deleteLabelInput() ?? this.labels.t('cardListItem.deleteLabel'));\n /** `data-testid` of the delete button (none when empty). */\n readonly deleteTestId = input('');\n /** Built-in secondary chip button (text = `actionLabel`, e.g. \"Download\") -> `action`; shown only while `actionLabel` is not empty. */\n readonly actionLabel = input('');\n /** 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. */\n readonly actionIcon = input('');\n readonly actionTestId = input('');\n readonly actionAriaLabel = input('');\n /** A built-in Edit / View / action / delete button shows (the row then keeps a minimum height so a badge and a chip never overlap). */\n protected readonly hasBuiltInChip = computed(() => this.editButton() || this.viewButton() || !!this.actionLabel() || this.deletable());\n readonly editClick = output<void>();\n readonly viewClick = output<void>();\n readonly delete = output<void>();\n readonly action = output<void>();\n\n protected readonly calendarPath = CALENDAR_PATH;\n protected readonly editPath = EDIT_PATH;\n protected readonly eyePath = EYE_PATH;\n protected readonly trashPath = TRASH_PATH;\n protected readonly iconPath = computed(() => { const i = this.icon(); return i ? ICON_PATHS[i] ?? null : null; });\n protected readonly indicatorLabel = computed(() => {\n const key = ({ high: 'cardListItem.priorityHigh', medium: 'cardListItem.priorityMedium', low: 'cardListItem.priorityLow' } as Record<string, UiLabelKey>)[this.indicator()];\n return key ? this.labels.t(key) : '';\n });\n}\n"],"mappings":";;;;;AAYA,MAAM,aAA2C;CAC/C,MAAM;CACN,OAAO;CACP,KAAK;CACL,MAAM;CACN,KAAK;CACL,OAAO;CACP,MAAM;CACN,QAAQ;CACR,UAAU;CACV,QAAQ;CACR,OAAO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A;KAAA,mBAAA;KAAA,YAAA;KAAA,UAAA;KAAA,YAAA;KAAA,mBAAA;IAAA;GAAA;GAAA,SAAA;IAAA,WAAA;IAAA,WAAA;IAAA,QAAA;IAAA,QAAA;GAAA;GAAA,UAAA;GAAA,UA1JtB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0DT,UAAA;GAAA,QAAA,CAAA,0qLAAA;GAAA,cAAA,CAAA;IAAA,MAAA;IAAA,MA3DS;IAAc,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;GAAA,eAAA,GAAA,kBAAA;EAAA,CAAA;CAAA;;AA2J/B,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAqB,YAAA,CAAA;EAhKjC,MAAA;EACW,MAAA,CAAA;GAAA,UAAA;GAAmB,YACjB;GAAI,iBACC,wBAAwB;GAAM,eAChC,kBAAkB;GAAI,SAC5B,CAAC,gBAAgB,gBAAgB;GAAC,UACjC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0DT,QAAA,CAAA,0qLAAA;EAAA,CAAA"}
|
|
@@ -489,7 +489,7 @@ var CheckboxComponent = class CheckboxComponent {
|
|
|
489
489
|
}
|
|
490
490
|
`,
|
|
491
491
|
isInline: true,
|
|
492
|
-
styles: [".cb-field{display:inline-flex;flex-direction:column;gap:4px;vertical-align:top}.cb-group{display:flex;flex-direction:column;gap:8px;margin:0;padding:0;border:0;min-width:0}.cb-legend{padding:0;margin:0 0 8px;font-size:.8125rem;font-weight:600;color:#374151;line-height:1.2}.cb-required{color:#dc2626;margin-left:2px}.cb-sr-only{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.cb-options{display:flex;flex-direction:column;gap:10px}.cb-options.cb-horizontal{flex-direction:row;flex-wrap:wrap;gap:8px 20px}.cb-field.cb-has-trailing{display:flex}.cb-row{display:flex;align-items:center;justify-content:space-between;gap:12px}.cb-trailing{display:inline-flex;align-items:center;flex-shrink:0}.cb-option{display:flex;flex-direction:column;gap:4px}.cb-group-desc{margin-left:0}.cb-indent{margin-left:29px}.cb-desc{margin
|
|
492
|
+
styles: [".cb-field{display:inline-flex;flex-direction:column;gap:4px;vertical-align:top}.cb-group{display:flex;flex-direction:column;gap:8px;margin:0;padding:0;border:0;min-width:0}.cb-legend{padding:0;margin:0 0 8px;font-size:.8125rem;font-weight:600;color:#374151;line-height:1.2}.cb-required{color:#dc2626;margin-left:2px}.cb-sr-only{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.cb-options{display:flex;flex-direction:column;gap:10px}.cb-options.cb-horizontal{flex-direction:row;flex-wrap:wrap;gap:8px 20px}.cb-field.cb-has-trailing{display:flex}.cb-row{display:flex;align-items:center;justify-content:space-between;gap:12px}.cb-trailing{display:inline-flex;align-items:center;flex-shrink:0}.cb-option{display:flex;flex-direction:column;gap:4px}.cb-group-desc{margin-left:0}.cb-indent{margin-left:29px}.cb-desc{margin:-4px 0 0 29px;font-size:.75rem;line-height:1.4;color:#64748b}.cb-desc-error{color:#dc2626}.cb-group>.cb-group-desc{margin-top:-8px}.cb-error .cb-box:not(.cb-checked){border-color:#ef4444}.cb-wrap{position:relative;vertical-align:top;display:inline-flex;align-items:center;gap:9px;cursor:pointer;-webkit-user-select:none;user-select:none}.cb-wrap.cb-disabled{cursor:not-allowed;opacity:.5}.cb-hidden{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.cb-wrap:has(.cb-hidden:focus-visible) .cb-box{outline:2px solid #3b82f6;outline-offset:2px}@media(pointer:coarse),(max-width:480px){.cb-wrap{position:relative}.cb-hidden{width:44px;height:44px;margin:0;clip:auto;overflow:visible;left:-12px;top:50%;transform:translateY(-50%);opacity:0;cursor:pointer;z-index:1}.cb-wrap.cb-disabled .cb-hidden{cursor:not-allowed}.cb-wrap{min-height:44px}.cb-options:not(.cb-horizontal){gap:0}}.cb-box{flex-shrink:0;box-sizing:border-box;width:20px;height:20px;border:2px solid #7c8ba1;border-radius:5px;background:#fff;display:flex;align-items:center;justify-content:center;transition:background .12s,border-color .12s}.cb-box.cb-checked,.cb-box.cb-indeterminate{background:#3b82f6;border-color:#3b82f6}.cb-wrap:hover .cb-box:not(.cb-checked):not(.cb-disabled){border-color:#3b82f6}@media(max-width:640px),(pointer:coarse){.cb-box{position:relative}.cb-box:after{content:\"\";position:absolute;inset:-12px}}.cb-label{font-size:.875rem;color:#334155;line-height:1.4}.cb-link{color:#2563eb;text-decoration:underline;cursor:pointer;border-radius:2px}.cb-link:hover{color:#1d4ed8}.cb-link:focus-visible{outline:2px solid #3b82f6;outline-offset:2px}\n"],
|
|
493
493
|
dependencies: [{
|
|
494
494
|
kind: "directive",
|
|
495
495
|
type: NgTemplateOutlet,
|
|
@@ -629,7 +629,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
629
629
|
</div>
|
|
630
630
|
}
|
|
631
631
|
`,
|
|
632
|
-
styles: [".cb-field{display:inline-flex;flex-direction:column;gap:4px;vertical-align:top}.cb-group{display:flex;flex-direction:column;gap:8px;margin:0;padding:0;border:0;min-width:0}.cb-legend{padding:0;margin:0 0 8px;font-size:.8125rem;font-weight:600;color:#374151;line-height:1.2}.cb-required{color:#dc2626;margin-left:2px}.cb-sr-only{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.cb-options{display:flex;flex-direction:column;gap:10px}.cb-options.cb-horizontal{flex-direction:row;flex-wrap:wrap;gap:8px 20px}.cb-field.cb-has-trailing{display:flex}.cb-row{display:flex;align-items:center;justify-content:space-between;gap:12px}.cb-trailing{display:inline-flex;align-items:center;flex-shrink:0}.cb-option{display:flex;flex-direction:column;gap:4px}.cb-group-desc{margin-left:0}.cb-indent{margin-left:29px}.cb-desc{margin
|
|
632
|
+
styles: [".cb-field{display:inline-flex;flex-direction:column;gap:4px;vertical-align:top}.cb-group{display:flex;flex-direction:column;gap:8px;margin:0;padding:0;border:0;min-width:0}.cb-legend{padding:0;margin:0 0 8px;font-size:.8125rem;font-weight:600;color:#374151;line-height:1.2}.cb-required{color:#dc2626;margin-left:2px}.cb-sr-only{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.cb-options{display:flex;flex-direction:column;gap:10px}.cb-options.cb-horizontal{flex-direction:row;flex-wrap:wrap;gap:8px 20px}.cb-field.cb-has-trailing{display:flex}.cb-row{display:flex;align-items:center;justify-content:space-between;gap:12px}.cb-trailing{display:inline-flex;align-items:center;flex-shrink:0}.cb-option{display:flex;flex-direction:column;gap:4px}.cb-group-desc{margin-left:0}.cb-indent{margin-left:29px}.cb-desc{margin:-4px 0 0 29px;font-size:.75rem;line-height:1.4;color:#64748b}.cb-desc-error{color:#dc2626}.cb-group>.cb-group-desc{margin-top:-8px}.cb-error .cb-box:not(.cb-checked){border-color:#ef4444}.cb-wrap{position:relative;vertical-align:top;display:inline-flex;align-items:center;gap:9px;cursor:pointer;-webkit-user-select:none;user-select:none}.cb-wrap.cb-disabled{cursor:not-allowed;opacity:.5}.cb-hidden{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.cb-wrap:has(.cb-hidden:focus-visible) .cb-box{outline:2px solid #3b82f6;outline-offset:2px}@media(pointer:coarse),(max-width:480px){.cb-wrap{position:relative}.cb-hidden{width:44px;height:44px;margin:0;clip:auto;overflow:visible;left:-12px;top:50%;transform:translateY(-50%);opacity:0;cursor:pointer;z-index:1}.cb-wrap.cb-disabled .cb-hidden{cursor:not-allowed}.cb-wrap{min-height:44px}.cb-options:not(.cb-horizontal){gap:0}}.cb-box{flex-shrink:0;box-sizing:border-box;width:20px;height:20px;border:2px solid #7c8ba1;border-radius:5px;background:#fff;display:flex;align-items:center;justify-content:center;transition:background .12s,border-color .12s}.cb-box.cb-checked,.cb-box.cb-indeterminate{background:#3b82f6;border-color:#3b82f6}.cb-wrap:hover .cb-box:not(.cb-checked):not(.cb-disabled){border-color:#3b82f6}@media(max-width:640px),(pointer:coarse){.cb-box{position:relative}.cb-box:after{content:\"\";position:absolute;inset:-12px}}.cb-label{font-size:.875rem;color:#334155;line-height:1.4}.cb-link{color:#2563eb;text-decoration:underline;cursor:pointer;border-radius:2px}.cb-link:hover{color:#1d4ed8}.cb-link:focus-visible{outline:2px solid #3b82f6;outline-offset:2px}\n"]
|
|
633
633
|
}]
|
|
634
634
|
}],
|
|
635
635
|
ctorParameters: () => [],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"forgeroute-ui-checkbox.mjs","names":[],"sources":["../../../projects/forgeroute-ui/checkbox/src/lib/checkbox/checkbox-trailing.directive.ts","../../../projects/forgeroute-ui/checkbox/src/lib/checkbox/checkbox.component.ts"],"sourcesContent":["import { Directive } from '@angular/core';\n\n/**\n * Marks content that a single `ui-checkbox` shows at the END of its row, outside the clickable label (a badge, a price, a link):\n *\n * <ui-checkbox label=\"Priority handling\" description=\"Ships first\" [(ngModel)]=\"priority\">\n * <span checkbox-trailing>$5.00</span>\n * </ui-checkbox>\n *\n * Import this directive in the host component (it is how the checkbox knows a trailing slot is in use); without it the checkbox\n * renders exactly as before. Clicking the trailing content does not toggle the box.\n */\n@Directive({\n selector: '[checkbox-trailing]',\n standalone: true,\n})\nexport class CheckboxTrailingDirective {}\n","import { Component, input, model, output, signal, computed, effect, forwardRef, inject, contentChild, ElementRef, ChangeDetectionStrategy } from '@angular/core';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { AbstractControl, ControlValueAccessor, NG_VALIDATORS, NG_VALUE_ACCESSOR, ValidationErrors, Validator } from '@angular/forms';\nimport { CheckboxTrailingDirective } from './checkbox-trailing.directive';\nimport { FieldIssue, UiFieldValidity, createFieldReveal, issueToErrors, requiredIssue } from '@forgeroute/ui/core';\nimport { opensInNewTab, safeLinkHref } from '@forgeroute/ui/utils';\nimport { UiLabelsService } from '@forgeroute/ui/core';\n\n/** One checkbox of a group (`options`). */\nexport interface CheckboxOption {\n value: string;\n label: string;\n /** Helper text under the option. */\n description?: string;\n disabled?: boolean;\n /** `data-testid` of this option's native checkbox (e.g. for end-to-end tests); none when omitted. */\n testId?: string;\n /** `data-testid` of this option's label text; none when omitted. */\n labelTestId?: string;\n}\n\n/** A link a single `ui-checkbox` label can hold: the label text names it with `{key}`, `labelLinks` says what `{key}` shows and where it goes. */\nexport interface CheckboxLabelLink {\n /** The link's text (plain text, never HTML). A link with no text is not drawn. */\n label: string;\n /** Where it goes: `http:`, `https:`, `mailto:`, `tel:` or an in-app path (`/terms`, `#top`). Anything else (`javascript:`, `data:`, `//host`, empty) draws the text without a link. */\n url: string;\n /** `data-testid` of the link; none when omitted. */\n testId?: string;\n}\n\n/** One piece of a label that holds links: plain text, or a link when `href` is set. */\ninterface CheckboxLabelSegment {\n text: string;\n href?: string;\n newTab?: boolean;\n testId?: string;\n}\n\n@Component({\n selector: 'ui-checkbox, ui-checkbox-group',\n standalone: true,\n imports: [NgTemplateOutlet],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [{\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => CheckboxComponent),\n multi: true,\n }, {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => CheckboxComponent),\n multi: true,\n }, {\n provide: UiFieldValidity,\n useExisting: forwardRef(() => CheckboxComponent),\n }],\n template: `\n @if (groupMode()) {\n <fieldset class=\"cb-group\" [class.cb-indent]=\"indent()\" [class.cb-error]=\"_activeError()\" [disabled]=\"disabled()\"\n [attr.aria-invalid]=\"_activeError() ? 'true' : null\"\n [attr.aria-describedby]=\"(_activeError() || hint()) ? _descId : null\">\n @if (_legend()) {\n <!-- aria-required is not allowed on a fieldset / group, so \"required\" is part of the legend's text for assistive technology -->\n <legend class=\"cb-legend\">{{ _legend() }}@if (required()) { <span class=\"cb-required\" aria-hidden=\"true\">*</span><span class=\"cb-sr-only\"> {{ labels.t('common.required') }}</span> }</legend>\n }\n <div class=\"cb-options\" [class.cb-horizontal]=\"orientation() === 'horizontal'\">\n @for (opt of options(); track opt.value; let i = $index) {\n <div class=\"cb-option\">\n <label class=\"cb-wrap\" [class.cb-disabled]=\"disabled() || opt.disabled\">\n <span class=\"cb-box\" [class.cb-checked]=\"isSelected(opt.value)\" [class.cb-disabled]=\"disabled() || opt.disabled\">\n @if (isSelected(opt.value)) {\n <svg width=\"13\" height=\"13\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"#fff\" stroke-width=\"3\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\">\n <path d=\"M20 6 9 17l-5-5\"/>\n </svg>\n }\n </span>\n <input\n type=\"checkbox\"\n class=\"cb-hidden\"\n [checked]=\"isSelected(opt.value)\"\n [attr.value]=\"opt.value\"\n [attr.data-testid]=\"opt.testId || null\"\n [disabled]=\"disabled() || !!opt.disabled\"\n [attr.aria-describedby]=\"opt.description ? _descId + '-' + i : null\"\n (change)=\"onToggleOption(opt.value, $event)\"\n />\n <span class=\"cb-label\" [attr.data-testid]=\"opt.labelTestId || null\">{{ opt.label }}</span>\n </label>\n @if (opt.description) {\n <p class=\"cb-desc\" [id]=\"_descId + '-' + i\">{{ opt.description }}</p>\n }\n </div>\n }\n </div>\n @if (_activeError()) {\n <p class=\"cb-desc cb-desc-error cb-group-desc\" [id]=\"_descId\" role=\"alert\">{{ _activeError() }}</p>\n } @else if (hint()) {\n <p class=\"cb-desc cb-group-desc\" [id]=\"_descId\">{{ hint() }}</p>\n }\n </fieldset>\n } @else {\n <div class=\"cb-field\" [class.cb-indent]=\"indent()\" [class.cb-error]=\"_activeError()\" [class.cb-has-trailing]=\"_trailing()\">\n <ng-template #labelRow>\n <label class=\"cb-wrap\" [class.cb-disabled]=\"disabled()\">\n <span class=\"cb-box\" [class.cb-checked]=\"checked()\" [class.cb-indeterminate]=\"indeterminate() && !checked()\" [class.cb-disabled]=\"disabled()\">\n @if (checked()) {\n <svg width=\"13\" height=\"13\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"#fff\" stroke-width=\"3\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\">\n <path d=\"M20 6 9 17l-5-5\"/>\n </svg>\n } @else if (indeterminate()) {\n <svg width=\"10\" height=\"2\" viewBox=\"0 0 10 2\" fill=\"none\" aria-hidden=\"true\">\n <line x1=\"0\" y1=\"1\" x2=\"10\" y2=\"1\" stroke=\"#fff\" stroke-width=\"2\" stroke-linecap=\"round\"/>\n </svg>\n }\n </span>\n <input\n type=\"checkbox\"\n class=\"cb-hidden\"\n [checked]=\"checked()\"\n [disabled]=\"disabled()\"\n [attr.data-testid]=\"testId() || null\"\n [attr.aria-label]=\"ariaLabel() || null\"\n [attr.aria-checked]=\"indeterminate() && !checked() ? 'mixed' : null\"\n [attr.aria-required]=\"required() ? 'true' : null\"\n [attr.aria-invalid]=\"_activeError() ? 'true' : null\"\n [attr.aria-describedby]=\"_singleDescribedBy()\"\n (change)=\"onToggle($event)\"\n />\n @if (label()) {\n <span class=\"cb-label\" [attr.data-testid]=\"labelTestId() || null\" [attr.role]=\"headingLevel() ? 'heading' : null\" [attr.aria-level]=\"headingLevel() || null\">@if (_labelSegments(); as segments) {@for (seg of segments; track $index) {@if (seg.href) {<a class=\"cb-link\" [attr.href]=\"seg.href\" [attr.target]=\"seg.newTab ? '_blank' : null\" [attr.rel]=\"seg.newTab ? 'noopener noreferrer' : null\" [attr.data-testid]=\"seg.testId || null\">{{ seg.text }}@if (seg.newTab) {<span class=\"cb-sr-only\"> {{ labels.t('dataTable.opensInNewTab') }}</span>}</a>} @else {<ng-container>{{ seg.text }}</ng-container>}}} @else {<ng-container>{{ label() }}</ng-container>}</span>\n }\n <ng-content />\n </label>\n </ng-template>\n @if (_trailing()) {\n <div class=\"cb-row\">\n <ng-container [ngTemplateOutlet]=\"labelRow\" />\n <span class=\"cb-trailing\"><ng-content select=\"[checkbox-trailing]\" /></span>\n </div>\n } @else {\n <ng-container [ngTemplateOutlet]=\"labelRow\" />\n }\n @if (description()) {\n <p class=\"cb-desc\" [id]=\"_descId + '-d'\">{{ description() }}</p>\n }\n @if (_activeError()) {\n <p class=\"cb-desc cb-desc-error\" [id]=\"_descId\" role=\"alert\">{{ _activeError() }}</p>\n } @else if (hint()) {\n <p class=\"cb-desc\" [id]=\"_descId\">{{ hint() }}</p>\n }\n </div>\n }\n `,\n styles: [`\n /* vertical-align: top - an inline-flex box sits on the text baseline of the host's line, and the checkbox's baseline changes when it is ticked (the check mark\n appears), which moved the whole control by 2px. */\n .cb-field { display: inline-flex; flex-direction: column; gap: 4px; vertical-align: top; }\n\n /* Group mode: a native fieldset with a legend */\n .cb-group { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; border: 0; min-width: 0; }\n .cb-legend { padding: 0; margin: 0 0 8px; font-size: 0.8125rem; font-weight: 600; color: #374151; line-height: 1.2; }\n .cb-required { color: #dc2626; margin-left: 2px; }\n .cb-sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }\n .cb-options { display: flex; flex-direction: column; gap: 10px; }\n .cb-options.cb-horizontal { flex-direction: row; flex-wrap: wrap; gap: 8px 20px; }\n /* Single mode with [checkbox-trailing]: the label on the left, the trailing content pushed to the end of the row. */\n .cb-field.cb-has-trailing { display: flex; }\n .cb-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }\n .cb-trailing { display: inline-flex; align-items: center; flex-shrink: 0; }\n .cb-option { display: flex; flex-direction: column; gap: 4px; }\n .cb-group-desc { margin-left: 0; }\n /* A dependent option (single checkbox or whole group): lines up under the parent checkbox's label (20px box + 9px gap). After .cb-group so its margin reset does not win. */\n .cb-indent { margin-left: 29px; }\n .cb-desc { margin: 0 0 0 29px; font-size: 0.75rem; line-height: 1.4; color: #64748b; }\n .cb-desc-error { color: #dc2626; }\n .cb-error .cb-box:not(.cb-checked) { border-color: #ef4444; }\n\n .cb-wrap {\n position: relative; /* contains the absolutely positioned hidden input, so it can never extend a scroll container or the page */\n vertical-align: top; /* an inline-flex box sits on the text baseline; the box's baseline changes when it is ticked, which moved the row */\n display: inline-flex;\n align-items: center;\n gap: 9px;\n cursor: pointer;\n user-select: none;\n &.cb-disabled { cursor: not-allowed; opacity: 0.5; }\n }\n\n /* Visually hidden but accessible to keyboard/screen readers */\n .cb-hidden {\n position: absolute; width: 1px; height: 1px;\n margin: -1px; padding: 0; overflow: hidden;\n clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;\n }\n\n /* Show focus ring on the visual box when the hidden input is focused via keyboard */\n .cb-wrap:has(.cb-hidden:focus-visible) .cb-box {\n outline: 2px solid #3b82f6;\n outline-offset: 2px;\n }\n\n /* Touch targets: on touch devices and phones the real (otherwise 1px, clipped) input becomes a transparent 44px square\n centred on the 20px box, so the control has a >= 44px hit area; the box looks the same (desktop unchanged). */\n @media (pointer: coarse), (max-width: 480px) {\n .cb-wrap { position: relative; }\n .cb-hidden {\n width: 44px; height: 44px; margin: 0; clip: auto; overflow: visible;\n left: -12px; top: 50%; transform: translateY(-50%);\n opacity: 0; cursor: pointer; z-index: 1;\n }\n .cb-wrap.cb-disabled .cb-hidden { cursor: not-allowed; }\n /* The whole label row is the target: >= 44px high (the rows of a vertical group then touch, so their 10px gap goes). Desktop pointers keep the compact 20px row. */\n .cb-wrap { min-height: 44px; }\n .cb-options:not(.cb-horizontal) { gap: 0; }\n }\n\n .cb-box {\n flex-shrink: 0;\n box-sizing: border-box; /* the 20px box includes its 2px border, with or without a global border-box reset */\n width: 20px;\n height: 20px;\n border: 2px solid #7c8ba1;\n border-radius: 5px;\n background: #fff;\n display: flex;\n align-items: center;\n justify-content: center;\n transition: background 0.12s, border-color 0.12s;\n\n &.cb-checked, &.cb-indeterminate {\n background: #3b82f6;\n border-color: #3b82f6;\n }\n\n &:not(.cb-checked):not(.cb-disabled) {\n .cb-wrap:hover & { border-color: #3b82f6; }\n }\n }\n\n /* Touch: grow the hit area to 44x44 around the 20px box without moving it (no layout shift). */\n @media (max-width: 640px), (pointer: coarse) {\n .cb-box { position: relative; }\n .cb-box::after { content: ''; position: absolute; inset: -12px; }\n }\n\n .cb-label {\n font-size: 0.875rem;\n color: #334155;\n line-height: 1.4;\n }\n /* A link inside the label (labelLinks). Clicking it follows the link; it never toggles the box (a link inside a <label> is its own activation target). */\n .cb-link { color: #2563eb; text-decoration: underline; cursor: pointer; border-radius: 2px; }\n .cb-link:hover { color: #1d4ed8; }\n .cb-link:focus-visible { outline: 2px solid #3b82f6; outline-offset: 2px; }\n `],\n})\n/**\n * Styled checkbox (ControlValueAccessor, boolean value).\n * Optional validation (nothing changes when unused): `required` means the box must be ticked -> \"<label> is required.\"\n * (or `requiredMessage`); `error` is a host message that wins; `hint` is helper text. Messages (built-in and host `error`) show only after the user\n * toggled the box (or left the group); `[showErrors]=\"true\"` also reveals it on an untouched checkbox, and true -> false forgets the interaction. Angular `Validator`, signals `invalid` / `errorMessage`, `invalidChange`\n * output, provides `UiFieldValidity`. Disabled checkboxes are never invalid.\n */\nexport class CheckboxComponent implements ControlValueAccessor, Validator, UiFieldValidity {\n protected readonly labels = inject(UiLabelsService);\n readonly label = input('');\n /** Accessible name for the native checkbox when there is no visible `label` (e.g. a table row's selector). */\n readonly ariaLabel = input('');\n /** `data-testid` of the native checkbox (single mode), for end-to-end tests; none when empty. (Group options have their own `testId`.) */\n readonly testId = input('');\n /** `data-testid` of the label text (single mode), e.g. to find a product name that is also its checkbox label; none when empty. */\n readonly labelTestId = input('');\n /**\n * 1-6 makes the label text a real heading for screen readers (`role=\"heading\"` + `aria-level`) while it stays the checkbox's label and\n * clicking it still toggles the box - e.g. a product name that is both the heading of its card and the label of its checkbox.\n * Default null: plain label text, exactly as before. Single mode only.\n */\n readonly headingLevel = input<1 | 2 | 3 | 4 | 5 | 6 | null>(null);\n readonly indeterminate = input(false);\n readonly checked = model(false);\n /**\n * GROUP MODE (optional): with `options` the component renders a native `<fieldset>` with a `<legend>` and one checkbox per option,\n * and its value (ngModel / forms) is the array of ticked option values (in option order). Without `options` it is the single\n * boolean checkbox it always was. In group mode `label` / `checked` / `indeterminate` are not used; `required` means at least one\n * option must be ticked (\"<legend> is required.\").\n */\n readonly options = input<CheckboxOption[]>([]);\n /** Group heading (the fieldset's legend). */\n readonly legend = input('');\n /**\n * `ui-checkbox-group` is the same component under a group-friendly tag: `<ui-checkbox-group legend=\"Interests\" [options]=\"opts\" [(ngModel)]=\"picked\" />`\n * (value = array of ticked option values). On the `<ui-checkbox-group>` tag the legend falls back to `label` when `legend` is empty (`<ui-checkbox [options]>` ignores `label` as before).\n */\n protected readonly _legend = computed(() => this.legend() || (this._host.nativeElement.tagName === 'UI-CHECKBOX-GROUP' ? this.label() : ''));\n /** Group mode: lay the options out in a column (default) or in a wrapping row. */\n readonly orientation = input<'vertical' | 'horizontal'>('vertical');\n /**\n * Group mode: the ticked option values as a two-way model (`[(values)]`), an alternative to ngModel / forms. Unset (default) = the\n * group is driven by ngModel / FormControl only. Values that are not an option are dropped and the order follows `options`.\n */\n readonly values = model<string[] | undefined>(undefined);\n /**\n * Single mode: links inside the label. The label text names where each link goes with `{key}` and this object says what it is, so a sentence can hold links\n * without HTML and without the host assembling markup:\n *\n * <ui-checkbox label=\"I agree to the {terms} and the {privacy}\" [labelLinks]=\"{ terms: { label: 'Terms of Service', url: '/terms' }, privacy: { label: 'Privacy Policy', url: '/privacy' } }\" />\n *\n * Only `http:`, `https:`, `mailto:`, `tel:` addresses and in-app paths are linked (see `CheckboxLabelLink`); a link whose address is unsafe or empty still shows its text,\n * just not as a link, and a link without text is left out. An absolute http(s) address opens in a new tab (`noopener noreferrer`, with \"(opens in a new tab)\" for\n * screen readers). A `{key}` that is not in `labelLinks` stays as typed. Clicking a link follows it and does not toggle the box; clicking the rest of the label does.\n * The checkbox's name is the whole sentence; the \"required\" message uses the sentence with the link texts in place of the `{key}`s. Without `labelLinks` (default) the\n * label is plain text exactly as before.\n */\n readonly labelLinks = input<Record<string, CheckboxLabelLink>>({});\n /** The label as text and links, or null when the label has no `{key}` that `labelLinks` knows (then it is drawn as plain text, as before). */\n protected readonly _labelSegments = computed((): CheckboxLabelSegment[] | null => {\n const label = this.label();\n const links = this.labelLinks();\n if (!label || !links || Object.keys(links).length === 0) return null;\n const segments: CheckboxLabelSegment[] = [];\n let used = false;\n let last = 0;\n for (const m of label.matchAll(/\\{([A-Za-z0-9_-]+)\\}/g)) {\n const link = Object.prototype.hasOwnProperty.call(links, m[1]) ? links[m[1]] : undefined;\n if (!link) continue; // not a known link: the {key} stays as typed\n used = true;\n const at = m.index ?? 0;\n if (at > last) segments.push({ text: label.slice(last, at) });\n const text = link.label ?? '';\n const href = safeLinkHref(link.url);\n if (text.trim()) segments.push(href ? { text, href, newTab: opensInNewTab(href), testId: link.testId } : { text });\n last = at + m[0].length;\n }\n if (!used) return null;\n if (last < label.length) segments.push({ text: label.slice(last) });\n return segments;\n });\n /** The label as plain text: the link texts in place of their `{key}`s (used for the \"required\" message). */\n protected readonly _plainLabel = computed(() => this._labelSegments()?.map(s => s.text).join('') ?? this.label());\n /** Single mode: small helper text under the label, linked to the native checkbox with `aria-describedby`. None when empty (default). */\n readonly description = input('');\n /** Set when the host projects a `[checkbox-trailing]` element (see `CheckboxTrailingDirective`). */\n private readonly _trailingContent = contentChild(CheckboxTrailingDirective);\n protected readonly _trailing = computed(() => !this.groupMode() && !!this._trailingContent());\n private readonly _host = inject<ElementRef<HTMLElement>>(ElementRef);\n /** `aria-describedby` of the single checkbox: its description, then the error / hint; none when neither exists (as before). */\n protected readonly _singleDescribedBy = computed(() => {\n const ids = [\n this.description() ? this._descId + '-d' : '',\n (this._activeError() || this.hint()) ? this._descId : '',\n ].filter(Boolean);\n return ids.length ? ids.join(' ') : null;\n });\n /** Indent this checkbox (or the whole group) under its parent option, aligned with the parent's label. */\n readonly indent = input(false);\n protected readonly groupMode = computed(() => this.options().length > 0);\n private readonly _selected = signal<string[]>([]);\n protected isSelected(value: string): boolean { return this._selected().includes(value); }\n /** The box must be ticked. */\n readonly required = input(false);\n /** Replaces the built-in \"<label> is required.\" message. */\n readonly requiredMessage = input('');\n readonly hint = input('');\n /** Host-provided error message (wins over the built-in one). */\n readonly error = input('');\n /** The host's \"tried to submit\" flag (e.g. after a failed Save click). `true` reveals the message of an untouched control at once (it also shows after the user left THIS control); switching it from true back to false forgets that the control was left. */\n readonly showErrors = input(false);\n\n protected readonly _descId = `cb-${Math.random().toString(36).slice(2, 8)}-desc`;\n private readonly _reveal = createFieldReveal(this.showErrors);\n private readonly _issue = computed((): FieldIssue | null => this._check(this.groupMode() ? this._selected().length > 0 : this.checked()));\n /** True while a required box is unticked or the host passed an `[error]`. */\n readonly invalid = computed(() => !!this.error() || !!this._issue());\n /** Message of the broken built-in rule ('' when valid), shown or not. */\n readonly errorMessage = computed(() => this._issue()?.message ?? '');\n /** Emits whenever the field becomes invalid / valid. */\n readonly invalidChange = output<boolean>();\n protected readonly _activeError = computed(() => this._reveal.revealed() ? (this.error() || this.errorMessage()) : '');\n private _onValidatorChange = () => {};\n\n constructor() {\n // Kept unconditional on purpose: output subscribers are attached after construction (and an unobserved\n // OutputEmitterRef.emit is a no-op), so skipping the effect would need Angular-internal listener checks and risk\n // missing a late subscriber. Table row checkboxes pay one effect each; `invalid`/`errorMessage` computeds are lazy.\n effect(() => { this.invalidChange.emit(this.invalid()); });\n // `[(values)]` (group mode): follow the host's array; skipped while it is unset or already equal to the selection.\n effect(() => {\n const v = this.values();\n if (!v) return;\n const next = this.inOptionOrder(v);\n const cur = this._selected();\n if (next.length !== cur.length || next.some((x, i) => x !== cur[i])) this._selected.set(next);\n });\n }\n\n /**\n * Puts the box back to a state chosen by the host after it refused a change (e.g. a confirm was declined). Writes the model, the\n * native input(s) and the form control, which re-setting the same bound value cannot do (the one-way binding sees no change\n * while the DOM and the internal state already moved). Single mode: `reset(false)` / `reset(true)`; group mode: `reset(['a'])`.\n */\n reset(value: boolean | string[] = false): void {\n if (this.groupMode()) {\n const next = this.inOptionOrder(Array.isArray(value) ? value : []);\n this._selected.set(next);\n if (this.values() !== undefined) this.values.set(next);\n this._syncNative(opt => next.includes(opt));\n this.onChange(next);\n } else {\n const on = Array.isArray(value) ? value.length > 0 : !!value;\n this.checked.set(on);\n this._syncNative(() => on);\n this.onChange(on);\n }\n }\n\n /** Sets every native checkbox of this component to the state the component holds (the DOM may have moved ahead of it). */\n private _syncNative(isOn: (optionValue: string) => boolean): void {\n this._host.nativeElement.querySelectorAll<HTMLInputElement>('input[type=\"checkbox\"]').forEach(el => {\n el.checked = this.groupMode() ? isOn(el.getAttribute('value') ?? '') : isOn('');\n });\n }\n\n /** Re-run the form control's validation when a rule input (`required`, `requiredMessage`, `label`) changes. */\n ngOnChanges() { this._onValidatorChange(); }\n\n validate(control: AbstractControl): ValidationErrors | null {\n const v = control.value;\n return issueToErrors(this._check(Array.isArray(v) ? v.length > 0 : !!v));\n }\n registerOnValidatorChange(fn: () => void) { this._onValidatorChange = fn; }\n\n private _check(checked: boolean): FieldIssue | null {\n if (this.disabled() || !this.required() || checked) return null;\n const rm = this.requiredMessage();\n return rm ? { key: 'required', message: rm } : requiredIssue(this.groupMode() ? this._legend() : this._plainLabel());\n }\n\n /** Public so a host template can bind `[disabled]` (a protected input fails strict template type-checking, TS2445). */\n readonly _disabledInput = input(false, { alias: 'disabled' });\n private readonly _cvaDisabled = signal(false);\n protected readonly disabled = computed(() => this._disabledInput() || this._cvaDisabled());\n\n private onChange = (_: boolean | string[]) => {};\n private onTouched = () => {};\n\n writeValue(val: boolean | string[] | null) {\n if (Array.isArray(val)) this._selected.set(this.inOptionOrder(val));\n else if (this.groupMode()) this._selected.set([]); // form.reset() / null clears the group\n else this.checked.set(!!val);\n }\n registerOnChange(fn: (v: boolean | string[]) => void) { this.onChange = fn; }\n registerOnTouched(fn: () => void) { this.onTouched = fn; }\n setDisabledState(d: boolean) { this._cvaDisabled.set(d); }\n\n onToggle(event: Event) {\n if (this.disabled()) return;\n const val = (event.target as HTMLInputElement).checked;\n this.checked.set(val);\n this.onChange(val);\n this.onTouched();\n this._reveal.touched.set(true);\n }\n\n /** The values keep the option order, and values that are not an option are dropped. */\n private inOptionOrder(values: string[]): string[] {\n const opts = this.options();\n return opts.length === 0 ? [...values] : opts.map(o => o.value).filter(v => values.includes(v));\n }\n\n /** Group mode: ticks / unticks one option; the form gets the full list of ticked values. */\n onToggleOption(value: string, event: Event) {\n if (this.disabled() || this.options().find(o => o.value === value)?.disabled) return;\n const on = (event.target as HTMLInputElement).checked;\n const next = this.inOptionOrder(on ? [...this._selected(), value] : this._selected().filter(v => v !== value));\n this._selected.set(next);\n if (this.values() !== undefined) this.values.set(next);\n this.onChange(next);\n this.onTouched();\n this._reveal.touched.set(true);\n }\n}\n"],"mappings":";;;;;;AAgBA,IAAa,4BAAb,MAAa,0BAAyB;CAAzB;EAAA,KAAA,OAAA,GAAA,mBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,UAAA;GAAA,MAAA;GAAyB,MAAA,CAAA;GAAA,QAAA,GAAA,gBAAA;EAAA,CAAA;CAAA;CAAzB;EAAA,KAAA,OAAA,GAAA,qBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,MAAA;GAAyB,cAAA;GAAA,UAAA;GAAA,UAAA;EAAA,CAAA;CAAA;;AAAzB,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAyB,YAAA,CAAA;EAJrC,MAAA;EAAU,MAAA,CAAA;GACT,UAAU;GACV,YAAY;E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,gBAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;CAAA;AAAA,CAAA"}
|
|
1
|
+
{"version":3,"file":"forgeroute-ui-checkbox.mjs","names":[],"sources":["../../../projects/forgeroute-ui/checkbox/src/lib/checkbox/checkbox-trailing.directive.ts","../../../projects/forgeroute-ui/checkbox/src/lib/checkbox/checkbox.component.ts"],"sourcesContent":["import { Directive } from '@angular/core';\n\n/**\n * Marks content that a single `ui-checkbox` shows at the END of its row, outside the clickable label (a badge, a price, a link):\n *\n * <ui-checkbox label=\"Priority handling\" description=\"Ships first\" [(ngModel)]=\"priority\">\n * <span checkbox-trailing>$5.00</span>\n * </ui-checkbox>\n *\n * Import this directive in the host component (it is how the checkbox knows a trailing slot is in use); without it the checkbox\n * renders exactly as before. Clicking the trailing content does not toggle the box.\n */\n@Directive({\n selector: '[checkbox-trailing]',\n standalone: true,\n})\nexport class CheckboxTrailingDirective {}\n","import { Component, input, model, output, signal, computed, effect, forwardRef, inject, contentChild, ElementRef, ChangeDetectionStrategy } from '@angular/core';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { AbstractControl, ControlValueAccessor, NG_VALIDATORS, NG_VALUE_ACCESSOR, ValidationErrors, Validator } from '@angular/forms';\nimport { CheckboxTrailingDirective } from './checkbox-trailing.directive';\nimport { FieldIssue, UiFieldValidity, createFieldReveal, issueToErrors, requiredIssue } from '@forgeroute/ui/core';\nimport { opensInNewTab, safeLinkHref } from '@forgeroute/ui/utils';\nimport { UiLabelsService } from '@forgeroute/ui/core';\n\n/** One checkbox of a group (`options`). */\nexport interface CheckboxOption {\n value: string;\n label: string;\n /** Helper text under the option. */\n description?: string;\n disabled?: boolean;\n /** `data-testid` of this option's native checkbox (e.g. for end-to-end tests); none when omitted. */\n testId?: string;\n /** `data-testid` of this option's label text; none when omitted. */\n labelTestId?: string;\n}\n\n/** A link a single `ui-checkbox` label can hold: the label text names it with `{key}`, `labelLinks` says what `{key}` shows and where it goes. */\nexport interface CheckboxLabelLink {\n /** The link's text (plain text, never HTML). A link with no text is not drawn. */\n label: string;\n /** Where it goes: `http:`, `https:`, `mailto:`, `tel:` or an in-app path (`/terms`, `#top`). Anything else (`javascript:`, `data:`, `//host`, empty) draws the text without a link. */\n url: string;\n /** `data-testid` of the link; none when omitted. */\n testId?: string;\n}\n\n/** One piece of a label that holds links: plain text, or a link when `href` is set. */\ninterface CheckboxLabelSegment {\n text: string;\n href?: string;\n newTab?: boolean;\n testId?: string;\n}\n\n@Component({\n selector: 'ui-checkbox, ui-checkbox-group',\n standalone: true,\n imports: [NgTemplateOutlet],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [{\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => CheckboxComponent),\n multi: true,\n }, {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => CheckboxComponent),\n multi: true,\n }, {\n provide: UiFieldValidity,\n useExisting: forwardRef(() => CheckboxComponent),\n }],\n template: `\n @if (groupMode()) {\n <fieldset class=\"cb-group\" [class.cb-indent]=\"indent()\" [class.cb-error]=\"_activeError()\" [disabled]=\"disabled()\"\n [attr.aria-invalid]=\"_activeError() ? 'true' : null\"\n [attr.aria-describedby]=\"(_activeError() || hint()) ? _descId : null\">\n @if (_legend()) {\n <!-- aria-required is not allowed on a fieldset / group, so \"required\" is part of the legend's text for assistive technology -->\n <legend class=\"cb-legend\">{{ _legend() }}@if (required()) { <span class=\"cb-required\" aria-hidden=\"true\">*</span><span class=\"cb-sr-only\"> {{ labels.t('common.required') }}</span> }</legend>\n }\n <div class=\"cb-options\" [class.cb-horizontal]=\"orientation() === 'horizontal'\">\n @for (opt of options(); track opt.value; let i = $index) {\n <div class=\"cb-option\">\n <label class=\"cb-wrap\" [class.cb-disabled]=\"disabled() || opt.disabled\">\n <span class=\"cb-box\" [class.cb-checked]=\"isSelected(opt.value)\" [class.cb-disabled]=\"disabled() || opt.disabled\">\n @if (isSelected(opt.value)) {\n <svg width=\"13\" height=\"13\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"#fff\" stroke-width=\"3\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\">\n <path d=\"M20 6 9 17l-5-5\"/>\n </svg>\n }\n </span>\n <input\n type=\"checkbox\"\n class=\"cb-hidden\"\n [checked]=\"isSelected(opt.value)\"\n [attr.value]=\"opt.value\"\n [attr.data-testid]=\"opt.testId || null\"\n [disabled]=\"disabled() || !!opt.disabled\"\n [attr.aria-describedby]=\"opt.description ? _descId + '-' + i : null\"\n (change)=\"onToggleOption(opt.value, $event)\"\n />\n <span class=\"cb-label\" [attr.data-testid]=\"opt.labelTestId || null\">{{ opt.label }}</span>\n </label>\n @if (opt.description) {\n <p class=\"cb-desc\" [id]=\"_descId + '-' + i\">{{ opt.description }}</p>\n }\n </div>\n }\n </div>\n @if (_activeError()) {\n <p class=\"cb-desc cb-desc-error cb-group-desc\" [id]=\"_descId\" role=\"alert\">{{ _activeError() }}</p>\n } @else if (hint()) {\n <p class=\"cb-desc cb-group-desc\" [id]=\"_descId\">{{ hint() }}</p>\n }\n </fieldset>\n } @else {\n <div class=\"cb-field\" [class.cb-indent]=\"indent()\" [class.cb-error]=\"_activeError()\" [class.cb-has-trailing]=\"_trailing()\">\n <ng-template #labelRow>\n <label class=\"cb-wrap\" [class.cb-disabled]=\"disabled()\">\n <span class=\"cb-box\" [class.cb-checked]=\"checked()\" [class.cb-indeterminate]=\"indeterminate() && !checked()\" [class.cb-disabled]=\"disabled()\">\n @if (checked()) {\n <svg width=\"13\" height=\"13\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"#fff\" stroke-width=\"3\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\">\n <path d=\"M20 6 9 17l-5-5\"/>\n </svg>\n } @else if (indeterminate()) {\n <svg width=\"10\" height=\"2\" viewBox=\"0 0 10 2\" fill=\"none\" aria-hidden=\"true\">\n <line x1=\"0\" y1=\"1\" x2=\"10\" y2=\"1\" stroke=\"#fff\" stroke-width=\"2\" stroke-linecap=\"round\"/>\n </svg>\n }\n </span>\n <input\n type=\"checkbox\"\n class=\"cb-hidden\"\n [checked]=\"checked()\"\n [disabled]=\"disabled()\"\n [attr.data-testid]=\"testId() || null\"\n [attr.aria-label]=\"ariaLabel() || null\"\n [attr.aria-checked]=\"indeterminate() && !checked() ? 'mixed' : null\"\n [attr.aria-required]=\"required() ? 'true' : null\"\n [attr.aria-invalid]=\"_activeError() ? 'true' : null\"\n [attr.aria-describedby]=\"_singleDescribedBy()\"\n (change)=\"onToggle($event)\"\n />\n @if (label()) {\n <span class=\"cb-label\" [attr.data-testid]=\"labelTestId() || null\" [attr.role]=\"headingLevel() ? 'heading' : null\" [attr.aria-level]=\"headingLevel() || null\">@if (_labelSegments(); as segments) {@for (seg of segments; track $index) {@if (seg.href) {<a class=\"cb-link\" [attr.href]=\"seg.href\" [attr.target]=\"seg.newTab ? '_blank' : null\" [attr.rel]=\"seg.newTab ? 'noopener noreferrer' : null\" [attr.data-testid]=\"seg.testId || null\">{{ seg.text }}@if (seg.newTab) {<span class=\"cb-sr-only\"> {{ labels.t('dataTable.opensInNewTab') }}</span>}</a>} @else {<ng-container>{{ seg.text }}</ng-container>}}} @else {<ng-container>{{ label() }}</ng-container>}</span>\n }\n <ng-content />\n </label>\n </ng-template>\n @if (_trailing()) {\n <div class=\"cb-row\">\n <ng-container [ngTemplateOutlet]=\"labelRow\" />\n <span class=\"cb-trailing\"><ng-content select=\"[checkbox-trailing]\" /></span>\n </div>\n } @else {\n <ng-container [ngTemplateOutlet]=\"labelRow\" />\n }\n @if (description()) {\n <p class=\"cb-desc\" [id]=\"_descId + '-d'\">{{ description() }}</p>\n }\n @if (_activeError()) {\n <p class=\"cb-desc cb-desc-error\" [id]=\"_descId\" role=\"alert\">{{ _activeError() }}</p>\n } @else if (hint()) {\n <p class=\"cb-desc\" [id]=\"_descId\">{{ hint() }}</p>\n }\n </div>\n }\n `,\n styles: [`\n /* vertical-align: top - an inline-flex box sits on the text baseline of the host's line, and the checkbox's baseline changes when it is ticked (the check mark\n appears), which moved the whole control by 2px. */\n .cb-field { display: inline-flex; flex-direction: column; gap: 4px; vertical-align: top; }\n\n /* Group mode: a native fieldset with a legend */\n .cb-group { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; border: 0; min-width: 0; }\n .cb-legend { padding: 0; margin: 0 0 8px; font-size: 0.8125rem; font-weight: 600; color: #374151; line-height: 1.2; }\n .cb-required { color: #dc2626; margin-left: 2px; }\n .cb-sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }\n .cb-options { display: flex; flex-direction: column; gap: 10px; }\n .cb-options.cb-horizontal { flex-direction: row; flex-wrap: wrap; gap: 8px 20px; }\n /* Single mode with [checkbox-trailing]: the label on the left, the trailing content pushed to the end of the row. */\n .cb-field.cb-has-trailing { display: flex; }\n .cb-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }\n .cb-trailing { display: inline-flex; align-items: center; flex-shrink: 0; }\n .cb-option { display: flex; flex-direction: column; gap: 4px; }\n .cb-group-desc { margin-left: 0; }\n /* A dependent option (single checkbox or whole group): lines up under the parent checkbox's label (20px box + 9px gap). After .cb-group so its margin reset does not win. */\n .cb-indent { margin-left: 29px; }\n .cb-desc { margin: -4px 0 0 29px; font-size: 0.75rem; line-height: 1.4; color: #64748b; }\n .cb-desc-error { color: #dc2626; }\n .cb-group > .cb-group-desc { margin-top: -8px; } /* the group's 8px flex gap is cancelled too */\n .cb-error .cb-box:not(.cb-checked) { border-color: #ef4444; }\n\n .cb-wrap {\n position: relative; /* contains the absolutely positioned hidden input, so it can never extend a scroll container or the page */\n vertical-align: top; /* an inline-flex box sits on the text baseline; the box's baseline changes when it is ticked, which moved the row */\n display: inline-flex;\n align-items: center;\n gap: 9px;\n cursor: pointer;\n user-select: none;\n &.cb-disabled { cursor: not-allowed; opacity: 0.5; }\n }\n\n /* Visually hidden but accessible to keyboard/screen readers */\n .cb-hidden {\n position: absolute; width: 1px; height: 1px;\n margin: -1px; padding: 0; overflow: hidden;\n clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;\n }\n\n /* Show focus ring on the visual box when the hidden input is focused via keyboard */\n .cb-wrap:has(.cb-hidden:focus-visible) .cb-box {\n outline: 2px solid #3b82f6;\n outline-offset: 2px;\n }\n\n /* Touch targets: on touch devices and phones the real (otherwise 1px, clipped) input becomes a transparent 44px square\n centred on the 20px box, so the control has a >= 44px hit area; the box looks the same (desktop unchanged). */\n @media (pointer: coarse), (max-width: 480px) {\n .cb-wrap { position: relative; }\n .cb-hidden {\n width: 44px; height: 44px; margin: 0; clip: auto; overflow: visible;\n left: -12px; top: 50%; transform: translateY(-50%);\n opacity: 0; cursor: pointer; z-index: 1;\n }\n .cb-wrap.cb-disabled .cb-hidden { cursor: not-allowed; }\n /* The whole label row is the target: >= 44px high (the rows of a vertical group then touch, so their 10px gap goes). Desktop pointers keep the compact 20px row. */\n .cb-wrap { min-height: 44px; }\n .cb-options:not(.cb-horizontal) { gap: 0; }\n }\n\n .cb-box {\n flex-shrink: 0;\n box-sizing: border-box; /* the 20px box includes its 2px border, with or without a global border-box reset */\n width: 20px;\n height: 20px;\n border: 2px solid #7c8ba1;\n border-radius: 5px;\n background: #fff;\n display: flex;\n align-items: center;\n justify-content: center;\n transition: background 0.12s, border-color 0.12s;\n\n &.cb-checked, &.cb-indeterminate {\n background: #3b82f6;\n border-color: #3b82f6;\n }\n\n &:not(.cb-checked):not(.cb-disabled) {\n .cb-wrap:hover & { border-color: #3b82f6; }\n }\n }\n\n /* Touch: grow the hit area to 44x44 around the 20px box without moving it (no layout shift). */\n @media (max-width: 640px), (pointer: coarse) {\n .cb-box { position: relative; }\n .cb-box::after { content: ''; position: absolute; inset: -12px; }\n }\n\n .cb-label {\n font-size: 0.875rem;\n color: #334155;\n line-height: 1.4;\n }\n /* A link inside the label (labelLinks). Clicking it follows the link; it never toggles the box (a link inside a <label> is its own activation target). */\n .cb-link { color: #2563eb; text-decoration: underline; cursor: pointer; border-radius: 2px; }\n .cb-link:hover { color: #1d4ed8; }\n .cb-link:focus-visible { outline: 2px solid #3b82f6; outline-offset: 2px; }\n `],\n})\n/**\n * Styled checkbox (ControlValueAccessor, boolean value).\n * Optional validation (nothing changes when unused): `required` means the box must be ticked -> \"<label> is required.\"\n * (or `requiredMessage`); `error` is a host message that wins; `hint` is helper text. Messages (built-in and host `error`) show only after the user\n * toggled the box (or left the group); `[showErrors]=\"true\"` also reveals it on an untouched checkbox, and true -> false forgets the interaction. Angular `Validator`, signals `invalid` / `errorMessage`, `invalidChange`\n * output, provides `UiFieldValidity`. Disabled checkboxes are never invalid.\n */\nexport class CheckboxComponent implements ControlValueAccessor, Validator, UiFieldValidity {\n protected readonly labels = inject(UiLabelsService);\n readonly label = input('');\n /** Accessible name for the native checkbox when there is no visible `label` (e.g. a table row's selector). */\n readonly ariaLabel = input('');\n /** `data-testid` of the native checkbox (single mode), for end-to-end tests; none when empty. (Group options have their own `testId`.) */\n readonly testId = input('');\n /** `data-testid` of the label text (single mode), e.g. to find a product name that is also its checkbox label; none when empty. */\n readonly labelTestId = input('');\n /**\n * 1-6 makes the label text a real heading for screen readers (`role=\"heading\"` + `aria-level`) while it stays the checkbox's label and\n * clicking it still toggles the box - e.g. a product name that is both the heading of its card and the label of its checkbox.\n * Default null: plain label text, exactly as before. Single mode only.\n */\n readonly headingLevel = input<1 | 2 | 3 | 4 | 5 | 6 | null>(null);\n readonly indeterminate = input(false);\n readonly checked = model(false);\n /**\n * GROUP MODE (optional): with `options` the component renders a native `<fieldset>` with a `<legend>` and one checkbox per option,\n * and its value (ngModel / forms) is the array of ticked option values (in option order). Without `options` it is the single\n * boolean checkbox it always was. In group mode `label` / `checked` / `indeterminate` are not used; `required` means at least one\n * option must be ticked (\"<legend> is required.\").\n */\n readonly options = input<CheckboxOption[]>([]);\n /** Group heading (the fieldset's legend). */\n readonly legend = input('');\n /**\n * `ui-checkbox-group` is the same component under a group-friendly tag: `<ui-checkbox-group legend=\"Interests\" [options]=\"opts\" [(ngModel)]=\"picked\" />`\n * (value = array of ticked option values). On the `<ui-checkbox-group>` tag the legend falls back to `label` when `legend` is empty (`<ui-checkbox [options]>` ignores `label` as before).\n */\n protected readonly _legend = computed(() => this.legend() || (this._host.nativeElement.tagName === 'UI-CHECKBOX-GROUP' ? this.label() : ''));\n /** Group mode: lay the options out in a column (default) or in a wrapping row. */\n readonly orientation = input<'vertical' | 'horizontal'>('vertical');\n /**\n * Group mode: the ticked option values as a two-way model (`[(values)]`), an alternative to ngModel / forms. Unset (default) = the\n * group is driven by ngModel / FormControl only. Values that are not an option are dropped and the order follows `options`.\n */\n readonly values = model<string[] | undefined>(undefined);\n /**\n * Single mode: links inside the label. The label text names where each link goes with `{key}` and this object says what it is, so a sentence can hold links\n * without HTML and without the host assembling markup:\n *\n * <ui-checkbox label=\"I agree to the {terms} and the {privacy}\" [labelLinks]=\"{ terms: { label: 'Terms of Service', url: '/terms' }, privacy: { label: 'Privacy Policy', url: '/privacy' } }\" />\n *\n * Only `http:`, `https:`, `mailto:`, `tel:` addresses and in-app paths are linked (see `CheckboxLabelLink`); a link whose address is unsafe or empty still shows its text,\n * just not as a link, and a link without text is left out. An absolute http(s) address opens in a new tab (`noopener noreferrer`, with \"(opens in a new tab)\" for\n * screen readers). A `{key}` that is not in `labelLinks` stays as typed. Clicking a link follows it and does not toggle the box; clicking the rest of the label does.\n * The checkbox's name is the whole sentence; the \"required\" message uses the sentence with the link texts in place of the `{key}`s. Without `labelLinks` (default) the\n * label is plain text exactly as before.\n */\n readonly labelLinks = input<Record<string, CheckboxLabelLink>>({});\n /** The label as text and links, or null when the label has no `{key}` that `labelLinks` knows (then it is drawn as plain text, as before). */\n protected readonly _labelSegments = computed((): CheckboxLabelSegment[] | null => {\n const label = this.label();\n const links = this.labelLinks();\n if (!label || !links || Object.keys(links).length === 0) return null;\n const segments: CheckboxLabelSegment[] = [];\n let used = false;\n let last = 0;\n for (const m of label.matchAll(/\\{([A-Za-z0-9_-]+)\\}/g)) {\n const link = Object.prototype.hasOwnProperty.call(links, m[1]) ? links[m[1]] : undefined;\n if (!link) continue; // not a known link: the {key} stays as typed\n used = true;\n const at = m.index ?? 0;\n if (at > last) segments.push({ text: label.slice(last, at) });\n const text = link.label ?? '';\n const href = safeLinkHref(link.url);\n if (text.trim()) segments.push(href ? { text, href, newTab: opensInNewTab(href), testId: link.testId } : { text });\n last = at + m[0].length;\n }\n if (!used) return null;\n if (last < label.length) segments.push({ text: label.slice(last) });\n return segments;\n });\n /** The label as plain text: the link texts in place of their `{key}`s (used for the \"required\" message). */\n protected readonly _plainLabel = computed(() => this._labelSegments()?.map(s => s.text).join('') ?? this.label());\n /** Single mode: small helper text under the label, linked to the native checkbox with `aria-describedby`. None when empty (default). */\n readonly description = input('');\n /** Set when the host projects a `[checkbox-trailing]` element (see `CheckboxTrailingDirective`). */\n private readonly _trailingContent = contentChild(CheckboxTrailingDirective);\n protected readonly _trailing = computed(() => !this.groupMode() && !!this._trailingContent());\n private readonly _host = inject<ElementRef<HTMLElement>>(ElementRef);\n /** `aria-describedby` of the single checkbox: its description, then the error / hint; none when neither exists (as before). */\n protected readonly _singleDescribedBy = computed(() => {\n const ids = [\n this.description() ? this._descId + '-d' : '',\n (this._activeError() || this.hint()) ? this._descId : '',\n ].filter(Boolean);\n return ids.length ? ids.join(' ') : null;\n });\n /** Indent this checkbox (or the whole group) under its parent option, aligned with the parent's label. */\n readonly indent = input(false);\n protected readonly groupMode = computed(() => this.options().length > 0);\n private readonly _selected = signal<string[]>([]);\n protected isSelected(value: string): boolean { return this._selected().includes(value); }\n /** The box must be ticked. */\n readonly required = input(false);\n /** Replaces the built-in \"<label> is required.\" message. */\n readonly requiredMessage = input('');\n readonly hint = input('');\n /** Host-provided error message (wins over the built-in one). */\n readonly error = input('');\n /** The host's \"tried to submit\" flag (e.g. after a failed Save click). `true` reveals the message of an untouched control at once (it also shows after the user left THIS control); switching it from true back to false forgets that the control was left. */\n readonly showErrors = input(false);\n\n protected readonly _descId = `cb-${Math.random().toString(36).slice(2, 8)}-desc`;\n private readonly _reveal = createFieldReveal(this.showErrors);\n private readonly _issue = computed((): FieldIssue | null => this._check(this.groupMode() ? this._selected().length > 0 : this.checked()));\n /** True while a required box is unticked or the host passed an `[error]`. */\n readonly invalid = computed(() => !!this.error() || !!this._issue());\n /** Message of the broken built-in rule ('' when valid), shown or not. */\n readonly errorMessage = computed(() => this._issue()?.message ?? '');\n /** Emits whenever the field becomes invalid / valid. */\n readonly invalidChange = output<boolean>();\n protected readonly _activeError = computed(() => this._reveal.revealed() ? (this.error() || this.errorMessage()) : '');\n private _onValidatorChange = () => {};\n\n constructor() {\n // Kept unconditional on purpose: output subscribers are attached after construction (and an unobserved\n // OutputEmitterRef.emit is a no-op), so skipping the effect would need Angular-internal listener checks and risk\n // missing a late subscriber. Table row checkboxes pay one effect each; `invalid`/`errorMessage` computeds are lazy.\n effect(() => { this.invalidChange.emit(this.invalid()); });\n // `[(values)]` (group mode): follow the host's array; skipped while it is unset or already equal to the selection.\n effect(() => {\n const v = this.values();\n if (!v) return;\n const next = this.inOptionOrder(v);\n const cur = this._selected();\n if (next.length !== cur.length || next.some((x, i) => x !== cur[i])) this._selected.set(next);\n });\n }\n\n /**\n * Puts the box back to a state chosen by the host after it refused a change (e.g. a confirm was declined). Writes the model, the\n * native input(s) and the form control, which re-setting the same bound value cannot do (the one-way binding sees no change\n * while the DOM and the internal state already moved). Single mode: `reset(false)` / `reset(true)`; group mode: `reset(['a'])`.\n */\n reset(value: boolean | string[] = false): void {\n if (this.groupMode()) {\n const next = this.inOptionOrder(Array.isArray(value) ? value : []);\n this._selected.set(next);\n if (this.values() !== undefined) this.values.set(next);\n this._syncNative(opt => next.includes(opt));\n this.onChange(next);\n } else {\n const on = Array.isArray(value) ? value.length > 0 : !!value;\n this.checked.set(on);\n this._syncNative(() => on);\n this.onChange(on);\n }\n }\n\n /** Sets every native checkbox of this component to the state the component holds (the DOM may have moved ahead of it). */\n private _syncNative(isOn: (optionValue: string) => boolean): void {\n this._host.nativeElement.querySelectorAll<HTMLInputElement>('input[type=\"checkbox\"]').forEach(el => {\n el.checked = this.groupMode() ? isOn(el.getAttribute('value') ?? '') : isOn('');\n });\n }\n\n /** Re-run the form control's validation when a rule input (`required`, `requiredMessage`, `label`) changes. */\n ngOnChanges() { this._onValidatorChange(); }\n\n validate(control: AbstractControl): ValidationErrors | null {\n const v = control.value;\n return issueToErrors(this._check(Array.isArray(v) ? v.length > 0 : !!v));\n }\n registerOnValidatorChange(fn: () => void) { this._onValidatorChange = fn; }\n\n private _check(checked: boolean): FieldIssue | null {\n if (this.disabled() || !this.required() || checked) return null;\n const rm = this.requiredMessage();\n return rm ? { key: 'required', message: rm } : requiredIssue(this.groupMode() ? this._legend() : this._plainLabel());\n }\n\n /** Public so a host template can bind `[disabled]` (a protected input fails strict template type-checking, TS2445). */\n readonly _disabledInput = input(false, { alias: 'disabled' });\n private readonly _cvaDisabled = signal(false);\n protected readonly disabled = computed(() => this._disabledInput() || this._cvaDisabled());\n\n private onChange = (_: boolean | string[]) => {};\n private onTouched = () => {};\n\n writeValue(val: boolean | string[] | null) {\n if (Array.isArray(val)) this._selected.set(this.inOptionOrder(val));\n else if (this.groupMode()) this._selected.set([]); // form.reset() / null clears the group\n else this.checked.set(!!val);\n }\n registerOnChange(fn: (v: boolean | string[]) => void) { this.onChange = fn; }\n registerOnTouched(fn: () => void) { this.onTouched = fn; }\n setDisabledState(d: boolean) { this._cvaDisabled.set(d); }\n\n onToggle(event: Event) {\n if (this.disabled()) return;\n const val = (event.target as HTMLInputElement).checked;\n this.checked.set(val);\n this.onChange(val);\n this.onTouched();\n this._reveal.touched.set(true);\n }\n\n /** The values keep the option order, and values that are not an option are dropped. */\n private inOptionOrder(values: string[]): string[] {\n const opts = this.options();\n return opts.length === 0 ? [...values] : opts.map(o => o.value).filter(v => values.includes(v));\n }\n\n /** Group mode: ticks / unticks one option; the form gets the full list of ticked values. */\n onToggleOption(value: string, event: Event) {\n if (this.disabled() || this.options().find(o => o.value === value)?.disabled) return;\n const on = (event.target as HTMLInputElement).checked;\n const next = this.inOptionOrder(on ? [...this._selected(), value] : this._selected().filter(v => v !== value));\n this._selected.set(next);\n if (this.values() !== undefined) this.values.set(next);\n this.onChange(next);\n this.onTouched();\n this._reveal.touched.set(true);\n }\n}\n"],"mappings":";;;;;;AAgBA,IAAa,4BAAb,MAAa,0BAAyB;CAAzB;EAAA,KAAA,OAAA,GAAA,mBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,UAAA;GAAA,MAAA;GAAyB,MAAA,CAAA;GAAA,QAAA,GAAA,gBAAA;EAAA,CAAA;CAAA;CAAzB;EAAA,KAAA,OAAA,GAAA,qBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,MAAA;GAAyB,cAAA;GAAA,UAAA;GAAA,UAAA;EAAA,CAAA;CAAA;;AAAzB,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAyB,YAAA,CAAA;EAJrC,MAAA;EAAU,MAAA,CAAA;GACT,UAAU;GACV,YAAY;EACb,CAAA;;;ACyPD,IAAa,oBAAb,MAAa,kBAAiB;CA8FlB,WAAW,OAAa;EAAa,OAAO,KAAK,UAAS,CAAE,CAAC,SAAS,KAAK;CAAG;CAuBxF,cAAA;EApHmB,KAAA,SAAS,OAAO,eAAe;EACzC,KAAA,QAAQ,MAAM,IAAG,GAAA,YAAA,CAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;EAEjB,KAAA,YAAY,MAAM,IAAG,GAAA,YAAA,CAAA,EAAA,WAAA,YAAA,CAAA,+BAAA,CAAA,CAAA;EAErB,KAAA,SAAS,MAAM,IAAG,GAAA,YAAA,CAAA,EAAA,WAAA,SAAA,CAAA,+BAAA,CAAA,CAAA;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KAAA,CAAA;EAAA,CAAA;EAAA,QAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,UAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,iBAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,MAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,OAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,YAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,eAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,eAAA;EAAA,CAAA;EAAA,gBAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;CAAA;AAAA,CAAA"}
|
|
@@ -320,7 +320,7 @@ var ColorInputComponent = class ColorInputComponent {
|
|
|
320
320
|
</div>
|
|
321
321
|
`,
|
|
322
322
|
isInline: true,
|
|
323
|
-
styles: [":host{display:block}.co-field{display:flex;flex-direction:column;gap:6px}.co-label{font-size:.8125rem;font-weight:600;color:#374151;line-height:1}.co-required{color:#dc2626;margin-left:2px}.co-row{display:flex;align-items:center;gap:8px}.co-swatch{position:relative;flex-shrink:0;width:38px;height:38px;box-sizing:border-box;border:1px solid #7c8ba1;border-radius:8px;overflow:hidden;background:#fff;transition:border-color .15s,box-shadow .15s}.co-swatch-wide{flex:1;width:auto;min-width:0;height:40px;cursor:pointer}.co-swatch-wide:hover{border-color:#475569}.co-chip{position:absolute;top:50%;right:8px;transform:translateY(-50%);display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:6px;background:#fff;color:#334155;border:1px solid #94a3b8;pointer-events:none}.co-swatch:focus-within{border-color:#3b82f6;box-shadow:0 0 0 3px #3b82f61f}.co-preview{position:absolute;inset:0;display:block}.co-native{position:absolute;inset:0;width:100%;height:100%;margin:0;padding:0;border:0;opacity:0;cursor:pointer;-webkit-appearance:none;appearance:none;background:transparent}.co-native::-webkit-color-swatch-wrapper{padding:0}.co-native::-webkit-color-swatch{border:0;border-radius:0}.co-native::-moz-color-swatch{border:0;border-radius:0}.co-text{flex:1;min-width:0;box-sizing:border-box;padding:9px 12px;font-size:.875rem;font-family:inherit;color:#1e293b;background:#fff;border:1px solid #7c8ba1;border-radius:8px;outline:none;transition:border-color .15s,box-shadow .15s}.co-text::placeholder{color:#64748b;opacity:1}.co-text:focus{border-color:#3b82f6;box-shadow:0 0 0 3px #3b82f61f}.co-presets{display:flex;flex-wrap:wrap;gap:8px}.co-preset{width:28px;height:28px;padding:0;box-sizing:border-box;cursor:pointer;border:1px solid #7c8ba1;border-radius:50%}.co-preset-selected{box-shadow:0 0 0 2px #fff,0 0 0 4px #3b82f6}.co-preset:focus{outline:2px solid #3b82f6;outline-offset:2px}.co-preset:focus:not(:focus-visible){outline:none}.co-error .co-text,.co-error .co-swatch{border-color:#ef4444}.co-error .co-text:focus{box-shadow:0 0 0 3px #ef44441f}.co-disabled .co-text,.co-disabled .co-swatch,.co-disabled .co-preset{opacity:.5;cursor:not-allowed}.co-disabled .co-native{cursor:not-allowed}.co-desc{margin
|
|
323
|
+
styles: [":host{display:block}.co-field{display:flex;flex-direction:column;gap:6px}.co-label{font-size:.8125rem;font-weight:600;color:#374151;line-height:1}.co-required{color:#dc2626;margin-left:2px}.co-row{display:flex;align-items:center;gap:8px}.co-swatch{position:relative;flex-shrink:0;width:38px;height:38px;box-sizing:border-box;border:1px solid #7c8ba1;border-radius:8px;overflow:hidden;background:#fff;transition:border-color .15s,box-shadow .15s}.co-swatch-wide{flex:1;width:auto;min-width:0;height:40px;cursor:pointer}.co-swatch-wide:hover{border-color:#475569}.co-chip{position:absolute;top:50%;right:8px;transform:translateY(-50%);display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:6px;background:#fff;color:#334155;border:1px solid #94a3b8;pointer-events:none}.co-swatch:focus-within{border-color:#3b82f6;box-shadow:0 0 0 3px #3b82f61f}.co-preview{position:absolute;inset:0;display:block}.co-native{position:absolute;inset:0;width:100%;height:100%;margin:0;padding:0;border:0;opacity:0;cursor:pointer;-webkit-appearance:none;appearance:none;background:transparent}.co-native::-webkit-color-swatch-wrapper{padding:0}.co-native::-webkit-color-swatch{border:0;border-radius:0}.co-native::-moz-color-swatch{border:0;border-radius:0}.co-text{flex:1;min-width:0;box-sizing:border-box;padding:9px 12px;font-size:.875rem;font-family:inherit;color:#1e293b;background:#fff;border:1px solid #7c8ba1;border-radius:8px;outline:none;transition:border-color .15s,box-shadow .15s}.co-text::placeholder{color:#64748b;opacity:1}.co-text:focus{border-color:#3b82f6;box-shadow:0 0 0 3px #3b82f61f}.co-presets{display:flex;flex-wrap:wrap;gap:8px}.co-preset{width:28px;height:28px;padding:0;box-sizing:border-box;cursor:pointer;border:1px solid #7c8ba1;border-radius:50%}.co-preset-selected{box-shadow:0 0 0 2px #fff,0 0 0 4px #3b82f6}.co-preset:focus{outline:2px solid #3b82f6;outline-offset:2px}.co-preset:focus:not(:focus-visible){outline:none}.co-error .co-text,.co-error .co-swatch{border-color:#ef4444}.co-error .co-text:focus{box-shadow:0 0 0 3px #ef44441f}.co-disabled .co-text,.co-disabled .co-swatch,.co-disabled .co-preset{opacity:.5;cursor:not-allowed}.co-disabled .co-native{cursor:not-allowed}.co-desc{margin:-6px 0 0;font-size:.75rem;line-height:1.4;color:#64748b}.co-desc-error{color:#dc2626}@media(max-width:480px){.co-text{font-size:1rem}}@media(pointer:coarse),(max-width:480px){.co-text{min-height:44px}.co-swatch{width:44px;height:44px}.co-swatch-wide{width:auto;height:44px}.co-preset{width:44px;height:44px}}\n"],
|
|
324
324
|
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
325
325
|
});
|
|
326
326
|
}
|
|
@@ -422,7 +422,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
422
422
|
}
|
|
423
423
|
</div>
|
|
424
424
|
`,
|
|
425
|
-
styles: [":host{display:block}.co-field{display:flex;flex-direction:column;gap:6px}.co-label{font-size:.8125rem;font-weight:600;color:#374151;line-height:1}.co-required{color:#dc2626;margin-left:2px}.co-row{display:flex;align-items:center;gap:8px}.co-swatch{position:relative;flex-shrink:0;width:38px;height:38px;box-sizing:border-box;border:1px solid #7c8ba1;border-radius:8px;overflow:hidden;background:#fff;transition:border-color .15s,box-shadow .15s}.co-swatch-wide{flex:1;width:auto;min-width:0;height:40px;cursor:pointer}.co-swatch-wide:hover{border-color:#475569}.co-chip{position:absolute;top:50%;right:8px;transform:translateY(-50%);display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:6px;background:#fff;color:#334155;border:1px solid #94a3b8;pointer-events:none}.co-swatch:focus-within{border-color:#3b82f6;box-shadow:0 0 0 3px #3b82f61f}.co-preview{position:absolute;inset:0;display:block}.co-native{position:absolute;inset:0;width:100%;height:100%;margin:0;padding:0;border:0;opacity:0;cursor:pointer;-webkit-appearance:none;appearance:none;background:transparent}.co-native::-webkit-color-swatch-wrapper{padding:0}.co-native::-webkit-color-swatch{border:0;border-radius:0}.co-native::-moz-color-swatch{border:0;border-radius:0}.co-text{flex:1;min-width:0;box-sizing:border-box;padding:9px 12px;font-size:.875rem;font-family:inherit;color:#1e293b;background:#fff;border:1px solid #7c8ba1;border-radius:8px;outline:none;transition:border-color .15s,box-shadow .15s}.co-text::placeholder{color:#64748b;opacity:1}.co-text:focus{border-color:#3b82f6;box-shadow:0 0 0 3px #3b82f61f}.co-presets{display:flex;flex-wrap:wrap;gap:8px}.co-preset{width:28px;height:28px;padding:0;box-sizing:border-box;cursor:pointer;border:1px solid #7c8ba1;border-radius:50%}.co-preset-selected{box-shadow:0 0 0 2px #fff,0 0 0 4px #3b82f6}.co-preset:focus{outline:2px solid #3b82f6;outline-offset:2px}.co-preset:focus:not(:focus-visible){outline:none}.co-error .co-text,.co-error .co-swatch{border-color:#ef4444}.co-error .co-text:focus{box-shadow:0 0 0 3px #ef44441f}.co-disabled .co-text,.co-disabled .co-swatch,.co-disabled .co-preset{opacity:.5;cursor:not-allowed}.co-disabled .co-native{cursor:not-allowed}.co-desc{margin
|
|
425
|
+
styles: [":host{display:block}.co-field{display:flex;flex-direction:column;gap:6px}.co-label{font-size:.8125rem;font-weight:600;color:#374151;line-height:1}.co-required{color:#dc2626;margin-left:2px}.co-row{display:flex;align-items:center;gap:8px}.co-swatch{position:relative;flex-shrink:0;width:38px;height:38px;box-sizing:border-box;border:1px solid #7c8ba1;border-radius:8px;overflow:hidden;background:#fff;transition:border-color .15s,box-shadow .15s}.co-swatch-wide{flex:1;width:auto;min-width:0;height:40px;cursor:pointer}.co-swatch-wide:hover{border-color:#475569}.co-chip{position:absolute;top:50%;right:8px;transform:translateY(-50%);display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:6px;background:#fff;color:#334155;border:1px solid #94a3b8;pointer-events:none}.co-swatch:focus-within{border-color:#3b82f6;box-shadow:0 0 0 3px #3b82f61f}.co-preview{position:absolute;inset:0;display:block}.co-native{position:absolute;inset:0;width:100%;height:100%;margin:0;padding:0;border:0;opacity:0;cursor:pointer;-webkit-appearance:none;appearance:none;background:transparent}.co-native::-webkit-color-swatch-wrapper{padding:0}.co-native::-webkit-color-swatch{border:0;border-radius:0}.co-native::-moz-color-swatch{border:0;border-radius:0}.co-text{flex:1;min-width:0;box-sizing:border-box;padding:9px 12px;font-size:.875rem;font-family:inherit;color:#1e293b;background:#fff;border:1px solid #7c8ba1;border-radius:8px;outline:none;transition:border-color .15s,box-shadow .15s}.co-text::placeholder{color:#64748b;opacity:1}.co-text:focus{border-color:#3b82f6;box-shadow:0 0 0 3px #3b82f61f}.co-presets{display:flex;flex-wrap:wrap;gap:8px}.co-preset{width:28px;height:28px;padding:0;box-sizing:border-box;cursor:pointer;border:1px solid #7c8ba1;border-radius:50%}.co-preset-selected{box-shadow:0 0 0 2px #fff,0 0 0 4px #3b82f6}.co-preset:focus{outline:2px solid #3b82f6;outline-offset:2px}.co-preset:focus:not(:focus-visible){outline:none}.co-error .co-text,.co-error .co-swatch{border-color:#ef4444}.co-error .co-text:focus{box-shadow:0 0 0 3px #ef44441f}.co-disabled .co-text,.co-disabled .co-swatch,.co-disabled .co-preset{opacity:.5;cursor:not-allowed}.co-disabled .co-native{cursor:not-allowed}.co-desc{margin:-6px 0 0;font-size:.75rem;line-height:1.4;color:#64748b}.co-desc-error{color:#dc2626}@media(max-width:480px){.co-text{font-size:1rem}}@media(pointer:coarse),(max-width:480px){.co-text{min-height:44px}.co-swatch{width:44px;height:44px}.co-swatch-wide{width:auto;height:44px}.co-preset{width:44px;height:44px}}\n"]
|
|
426
426
|
}]
|
|
427
427
|
}],
|
|
428
428
|
ctorParameters: () => [],
|