@underlayerdev/ui 0.14.5 → 0.14.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -293,15 +293,23 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.0", ngImpor
293
293
  }], propDecorators: { content: [{ type: i0.Input, args: [{ isSignal: true, alias: "content", required: false }] }], showLineNumbers: [{ type: i0.Input, args: [{ isSignal: true, alias: "showLineNumbers", required: false }] }], maxHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxHeight", required: false }] }] } });
294
294
 
295
295
  // <ul-icon class="ul-icon ul-icon-size-${size} ul-icon-weight-${weight} ul-icon-${icon}" />
296
+ // (no ul-icon-weight-* class when weight is null)
296
297
  class IconComponent {
297
298
  size = input('8', /* @ts-ignore */
298
299
  ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
300
+ /**
301
+ * Stroke weight of the glyph. Pass `null` to leave it out entirely, so the
302
+ * icon takes the surrounding `font-weight` (e.g. inside bold text) instead
303
+ * of always forcing `medium`.
304
+ */
299
305
  weight = input('medium', /* @ts-ignore */
300
306
  ...(ngDevMode ? [{ debugName: "weight" }] : /* istanbul ignore next */ []));
301
307
  icon = input.required(/* @ts-ignore */
302
308
  ...(ngDevMode ? [{ debugName: "icon" }] : /* istanbul ignore next */ []));
303
309
  hostClasses = computed(() => {
304
- return `ul-icon ul-icon-size-${this.size()} ul-icon-weight-${this.weight()} ul-icon-${this.icon()}`;
310
+ const weight = this.weight();
311
+ const weightClass = weight ? ` ul-icon-weight-${weight}` : '';
312
+ return `ul-icon ul-icon-size-${this.size()}${weightClass} ul-icon-${this.icon()}`;
305
313
  }, /* @ts-ignore */
306
314
  ...(ngDevMode ? [{ debugName: "hostClasses" }] : /* istanbul ignore next */ []));
307
315
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: IconComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });