@neuravision/ng-construct 0.3.1 → 0.3.2

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.
@@ -78,7 +78,7 @@ class AfAlertComponent {
78
78
  class="af-alert__dismiss"
79
79
  aria-label="Dismiss alert"
80
80
  (click)="dismiss()">
81
- ×
81
+ <span class="ct-icon ct-icon--sm" aria-hidden="true"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><line x1="18" y1="6" x2="6" y2="18"/><line x1="6" y1="6" x2="18" y2="18"/></svg></span>
82
82
  </button>
83
83
  }
84
84
  </div>
@@ -113,7 +113,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.2", ngImpor
113
113
  class="af-alert__dismiss"
114
114
  aria-label="Dismiss alert"
115
115
  (click)="dismiss()">
116
- ×
116
+ <span class="ct-icon ct-icon--sm" aria-hidden="true"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><line x1="18" y1="6" x2="6" y2="18"/><line x1="6" y1="6" x2="18" y2="18"/></svg></span>
117
117
  </button>
118
118
  }
119
119
  </div>
@@ -2081,10 +2081,11 @@ class AfModalComponent {
2081
2081
  <h2 [id]="titleId">{{ title() }}</h2>
2082
2082
  @if (showCloseButton()) {
2083
2083
  <button
2084
- class="ct-button ct-button--ghost"
2084
+ class="ct-button ct-button--ghost ct-button--icon"
2085
+ type="button"
2085
2086
  aria-label="Close"
2086
2087
  (click)="close()">
2087
- ×
2088
+ <span class="ct-icon" aria-hidden="true"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><line x1="18" y1="6" x2="6" y2="18"/><line x1="6" y1="6" x2="18" y2="18"/></svg></span>
2088
2089
  </button>
2089
2090
  }
2090
2091
  </div>
@@ -2123,10 +2124,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.2", ngImpor
2123
2124
  <h2 [id]="titleId">{{ title() }}</h2>
2124
2125
  @if (showCloseButton()) {
2125
2126
  <button
2126
- class="ct-button ct-button--ghost"
2127
+ class="ct-button ct-button--ghost ct-button--icon"
2128
+ type="button"
2127
2129
  aria-label="Close"
2128
2130
  (click)="close()">
2129
- ×
2131
+ <span class="ct-icon" aria-hidden="true"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><line x1="18" y1="6" x2="6" y2="18"/><line x1="6" y1="6" x2="18" y2="18"/></svg></span>
2130
2132
  </button>
2131
2133
  }
2132
2134
  </div>
@@ -2260,10 +2262,11 @@ class AfToastContainerComponent {
2260
2262
  </button>
2261
2263
  }
2262
2264
  <button
2263
- class="ct-button ct-button--ghost"
2265
+ class="ct-button ct-button--ghost ct-button--icon ct-button--sm"
2266
+ type="button"
2264
2267
  aria-label="Close"
2265
2268
  (click)="toastService.dismiss(toast.id)">
2266
- ×
2269
+ <span class="ct-icon ct-icon--sm" aria-hidden="true"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><line x1="18" y1="6" x2="6" y2="18"/><line x1="6" y1="6" x2="18" y2="18"/></svg></span>
2267
2270
  </button>
2268
2271
  </div>
2269
2272
  }
@@ -2294,10 +2297,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.2", ngImpor
2294
2297
  </button>
2295
2298
  }
2296
2299
  <button
2297
- class="ct-button ct-button--ghost"
2300
+ class="ct-button ct-button--ghost ct-button--icon ct-button--sm"
2301
+ type="button"
2298
2302
  aria-label="Close"
2299
2303
  (click)="toastService.dismiss(toast.id)">
2300
- ×
2304
+ <span class="ct-icon ct-icon--sm" aria-hidden="true"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><line x1="18" y1="6" x2="6" y2="18"/><line x1="6" y1="6" x2="18" y2="18"/></svg></span>
2301
2305
  </button>
2302
2306
  </div>
2303
2307
  }
@@ -3620,7 +3624,7 @@ class AfChipInputComponent {
3620
3624
  class="ct-chip__remove"
3621
3625
  [attr.aria-label]="'Remove ' + chip"
3622
3626
  (click)="remove(chip, $event)">
3623
- &times;
3627
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true"><line x1="18" y1="6" x2="6" y2="18"/><line x1="6" y1="6" x2="18" y2="18"/></svg>
3624
3628
  </button>
3625
3629
  }
3626
3630
  </span>
@@ -3691,7 +3695,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.2", ngImpor
3691
3695
  class="ct-chip__remove"
3692
3696
  [attr.aria-label]="'Remove ' + chip"
3693
3697
  (click)="remove(chip, $event)">
3694
- &times;
3698
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true"><line x1="18" y1="6" x2="6" y2="18"/><line x1="6" y1="6" x2="18" y2="18"/></svg>
3695
3699
  </button>
3696
3700
  }
3697
3701
  </span>
@@ -4215,7 +4219,7 @@ class AfSidebarComponent {
4215
4219
  type="button"
4216
4220
  aria-label="Close menu"
4217
4221
  (click)="close()">
4218
- <span class="ct-icon ct-icon--sm" aria-hidden="true">&times;</span>
4222
+ <span class="ct-icon ct-icon--sm" aria-hidden="true"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><line x1="18" y1="6" x2="6" y2="18"/><line x1="6" y1="6" x2="18" y2="18"/></svg></span>
4219
4223
  </button>
4220
4224
  }
4221
4225
  </div>
@@ -4246,7 +4250,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.2", ngImpor
4246
4250
  type="button"
4247
4251
  aria-label="Close menu"
4248
4252
  (click)="close()">
4249
- <span class="ct-icon ct-icon--sm" aria-hidden="true">&times;</span>
4253
+ <span class="ct-icon ct-icon--sm" aria-hidden="true"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><line x1="18" y1="6" x2="6" y2="18"/><line x1="6" y1="6" x2="18" y2="18"/></svg></span>
4250
4254
  </button>
4251
4255
  }
4252
4256
  </div>
@@ -4262,38 +4266,52 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.2", ngImpor
4262
4266
  }], propDecorators: { open: [{ type: i0.Input, args: [{ isSignal: true, alias: "open", required: false }] }, { type: i0.Output, args: ["openChange"] }], mode: [{ type: i0.Input, args: [{ isSignal: true, alias: "mode", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], showCloseButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "showCloseButton", required: false }] }] } });
4263
4267
 
4264
4268
  /**
4265
- * Icon component that abstracts the icon rendering strategy.
4269
+ * Icon wrapper that applies Construct Design System sizing via `ct-icon` classes.
4266
4270
  *
4267
- * Currently uses Material Icons font ligatures. The icon strategy
4268
- * can be changed centrally without modifying consumers.
4271
+ * Uses content projection so any icon source can be used:
4272
+ * Lucide, custom SVGs, or other icon libraries.
4269
4273
  *
4270
- * @example
4271
- * <af-icon name="delete" />
4272
- * <af-icon name="edit" size="sm" />
4274
+ * @example Using with Lucide
4275
+ * ```html
4276
+ * <af-icon size="sm">
4277
+ * <lucide-x />
4278
+ * </af-icon>
4279
+ * ```
4280
+ *
4281
+ * @example Using with inline SVG
4282
+ * ```html
4283
+ * <af-icon size="lg">
4284
+ * <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
4285
+ * <circle cx="12" cy="12" r="10" />
4286
+ * </svg>
4287
+ * </af-icon>
4288
+ * ```
4273
4289
  */
4274
4290
  class AfIconComponent {
4275
- /** Material Icon name (ligature) */
4276
- name = input.required(...(ngDevMode ? [{ debugName: "name" }] : []));
4277
4291
  /** Icon size variant */
4278
4292
  size = input('md', ...(ngDevMode ? [{ debugName: "size" }] : []));
4279
4293
  iconClasses = computed(() => {
4280
- const classes = ['ct-icon', 'material-icons'];
4294
+ const classes = ['ct-icon'];
4281
4295
  if (this.size() !== 'md') {
4282
4296
  classes.push(`ct-icon--${this.size()}`);
4283
4297
  }
4284
4298
  return classes.join(' ');
4285
4299
  }, ...(ngDevMode ? [{ debugName: "iconClasses" }] : []));
4286
4300
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.2", ngImport: i0, type: AfIconComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
4287
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.1.2", type: AfIconComponent, isStandalone: true, selector: "af-icon", inputs: { name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: true, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
4288
- <span [class]="iconClasses()" aria-hidden="true">{{ name() }}</span>
4301
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.1.2", type: AfIconComponent, isStandalone: true, selector: "af-icon", inputs: { size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
4302
+ <span [class]="iconClasses()" aria-hidden="true">
4303
+ <ng-content />
4304
+ </span>
4289
4305
  `, isInline: true, styles: [":host{display:inline-flex;align-items:center;justify-content:center}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
4290
4306
  }
4291
4307
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.2", ngImport: i0, type: AfIconComponent, decorators: [{
4292
4308
  type: Component,
4293
4309
  args: [{ selector: 'af-icon', changeDetection: ChangeDetectionStrategy.OnPush, template: `
4294
- <span [class]="iconClasses()" aria-hidden="true">{{ name() }}</span>
4310
+ <span [class]="iconClasses()" aria-hidden="true">
4311
+ <ng-content />
4312
+ </span>
4295
4313
  `, styles: [":host{display:inline-flex;align-items:center;justify-content:center}\n"] }]
4296
- }], propDecorators: { name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: true }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }] } });
4314
+ }], propDecorators: { size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }] } });
4297
4315
 
4298
4316
  /**
4299
4317
  * Slider component with full form control and accessibility support.
@@ -4601,7 +4619,7 @@ class AfDrawerComponent {
4601
4619
  type="button"
4602
4620
  [attr.aria-label]="closeButtonAriaLabel()"
4603
4621
  (click)="close()">
4604
- <span class="ct-icon ct-icon--sm" aria-hidden="true">&times;</span>
4622
+ <span class="ct-icon ct-icon--sm" aria-hidden="true"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><line x1="18" y1="6" x2="6" y2="18"/><line x1="6" y1="6" x2="18" y2="18"/></svg></span>
4605
4623
  </button>
4606
4624
  }
4607
4625
  </div>
@@ -4643,7 +4661,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.2", ngImpor
4643
4661
  type="button"
4644
4662
  [attr.aria-label]="closeButtonAriaLabel()"
4645
4663
  (click)="close()">
4646
- <span class="ct-icon ct-icon--sm" aria-hidden="true">&times;</span>
4664
+ <span class="ct-icon ct-icon--sm" aria-hidden="true"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><line x1="18" y1="6" x2="6" y2="18"/><line x1="6" y1="6" x2="18" y2="18"/></svg></span>
4647
4665
  </button>
4648
4666
  }
4649
4667
  </div>
@@ -7046,7 +7064,7 @@ class AfBannerComponent {
7046
7064
  type="button"
7047
7065
  [attr.aria-label]="closeAriaLabel()"
7048
7066
  (click)="dismiss()">
7049
- &times;
7067
+ <span class="ct-icon ct-icon--sm" aria-hidden="true"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><line x1="18" y1="6" x2="6" y2="18"/><line x1="6" y1="6" x2="18" y2="18"/></svg></span>
7050
7068
  </button>
7051
7069
  }
7052
7070
  </div>
@@ -7081,7 +7099,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.2", ngImpor
7081
7099
  type="button"
7082
7100
  [attr.aria-label]="closeAriaLabel()"
7083
7101
  (click)="dismiss()">
7084
- &times;
7102
+ <span class="ct-icon ct-icon--sm" aria-hidden="true"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><line x1="18" y1="6" x2="6" y2="18"/><line x1="6" y1="6" x2="18" y2="18"/></svg></span>
7085
7103
  </button>
7086
7104
  }
7087
7105
  </div>