@dereekb/dbx-web 13.6.1 → 13.6.3

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.
@@ -13390,12 +13390,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.3", ngImpor
13390
13390
  *
13391
13391
  * Use the `center` input to vertically center the badge with the content.
13392
13392
  *
13393
+ * Accepts either individual inputs or a single `config` object. Individual inputs
13394
+ * take precedence over config values when both are provided.
13395
+ *
13393
13396
  * @example
13394
13397
  * ```html
13395
13398
  * <dbx-step-block [step]="1" header="Create Account" hint="Fill in the registration form.">
13396
13399
  * <p>Enter your email and password to get started.</p>
13397
13400
  * </dbx-step-block>
13398
13401
  *
13402
+ * <dbx-step-block [config]="stepConfig">
13403
+ * <p>Content using a config object.</p>
13404
+ * </dbx-step-block>
13405
+ *
13399
13406
  * <dbx-step-block [step]="2" color="accent" header="Custom Header Content">
13400
13407
  * <span header>Extra header content</span>
13401
13408
  * <p>Detail content goes here.</p>
@@ -13403,30 +13410,37 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.3", ngImpor
13403
13410
  * ```
13404
13411
  */
13405
13412
  class DbxStepBlockComponent {
13406
- step = input(1, ...(ngDevMode ? [{ debugName: "step" }] : /* istanbul ignore next */ []));
13413
+ config = input(...(ngDevMode ? [undefined, { debugName: "config" }] : /* istanbul ignore next */ []));
13414
+ step = input(...(ngDevMode ? [undefined, { debugName: "step" }] : /* istanbul ignore next */ []));
13407
13415
  icon = input(...(ngDevMode ? [undefined, { debugName: "icon" }] : /* istanbul ignore next */ []));
13408
13416
  header = input(...(ngDevMode ? [undefined, { debugName: "header" }] : /* istanbul ignore next */ []));
13409
13417
  hint = input(...(ngDevMode ? [undefined, { debugName: "hint" }] : /* istanbul ignore next */ []));
13410
- color = input('primary', ...(ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []));
13411
- center = input(false, ...(ngDevMode ? [{ debugName: "center" }] : /* istanbul ignore next */ []));
13418
+ color = input(...(ngDevMode ? [undefined, { debugName: "color" }] : /* istanbul ignore next */ []));
13419
+ center = input(...(ngDevMode ? [undefined, { debugName: "center" }] : /* istanbul ignore next */ []));
13420
+ stepSignal = computed(() => this.step() ?? this.config()?.step ?? 1, ...(ngDevMode ? [{ debugName: "stepSignal" }] : /* istanbul ignore next */ []));
13421
+ iconSignal = computed(() => this.icon() ?? this.config()?.icon, ...(ngDevMode ? [{ debugName: "iconSignal" }] : /* istanbul ignore next */ []));
13422
+ headerSignal = computed(() => this.header() ?? this.config()?.header, ...(ngDevMode ? [{ debugName: "headerSignal" }] : /* istanbul ignore next */ []));
13423
+ hintSignal = computed(() => this.hint() ?? this.config()?.hint, ...(ngDevMode ? [{ debugName: "hintSignal" }] : /* istanbul ignore next */ []));
13424
+ colorSignal = computed(() => this.color() ?? this.config()?.color ?? 'primary', ...(ngDevMode ? [{ debugName: "colorSignal" }] : /* istanbul ignore next */ []));
13425
+ centerSignal = computed(() => this.center() ?? this.config()?.center ?? false, ...(ngDevMode ? [{ debugName: "centerSignal" }] : /* istanbul ignore next */ []));
13412
13426
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.3", ngImport: i0, type: DbxStepBlockComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
13413
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.3", type: DbxStepBlockComponent, isStandalone: true, selector: "dbx-step-block", inputs: { step: { classPropertyName: "step", publicName: "step", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, header: { classPropertyName: "header", publicName: "header", isSignal: true, isRequired: false, transformFunction: null }, hint: { classPropertyName: "hint", publicName: "hint", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, center: { classPropertyName: "center", publicName: "center", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.dbx-step-block-center": "center()" }, classAttribute: "dbx-step-block d-block" }, ngImport: i0, template: `
13414
- <div class="dbx-step-block-badge" [dbxColor]="color()">
13415
- @if (icon()) {
13416
- <mat-icon>{{ icon() }}</mat-icon>
13427
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.3", type: DbxStepBlockComponent, isStandalone: true, selector: "dbx-step-block", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: false, transformFunction: null }, step: { classPropertyName: "step", publicName: "step", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, header: { classPropertyName: "header", publicName: "header", isSignal: true, isRequired: false, transformFunction: null }, hint: { classPropertyName: "hint", publicName: "hint", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, center: { classPropertyName: "center", publicName: "center", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.dbx-step-block-center": "centerSignal()" }, classAttribute: "dbx-step-block d-block" }, ngImport: i0, template: `
13428
+ <div class="dbx-step-block-badge" [dbxColor]="colorSignal()">
13429
+ @if (iconSignal()) {
13430
+ <mat-icon>{{ iconSignal() }}</mat-icon>
13417
13431
  } @else {
13418
- {{ step() }}
13432
+ {{ stepSignal() }}
13419
13433
  }
13420
13434
  </div>
13421
13435
  <div class="dbx-step-block-content">
13422
- @if (header()) {
13436
+ @if (headerSignal()) {
13423
13437
  <div class="dbx-step-block-header">
13424
- <span class="dbx-step-block-header-label">{{ header() }}</span>
13438
+ <span class="dbx-step-block-header-label">{{ headerSignal() }}</span>
13425
13439
  <ng-content select="[header]"></ng-content>
13426
13440
  </div>
13427
13441
  }
13428
- @if (hint()) {
13429
- <span class="dbx-step-block-hint">{{ hint() }}</span>
13442
+ @if (hintSignal()) {
13443
+ <span class="dbx-step-block-hint">{{ hintSignal() }}</span>
13430
13444
  }
13431
13445
  <ng-content></ng-content>
13432
13446
  </div>
@@ -13437,35 +13451,35 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.3", ngImpor
13437
13451
  args: [{
13438
13452
  selector: 'dbx-step-block',
13439
13453
  template: `
13440
- <div class="dbx-step-block-badge" [dbxColor]="color()">
13441
- @if (icon()) {
13442
- <mat-icon>{{ icon() }}</mat-icon>
13454
+ <div class="dbx-step-block-badge" [dbxColor]="colorSignal()">
13455
+ @if (iconSignal()) {
13456
+ <mat-icon>{{ iconSignal() }}</mat-icon>
13443
13457
  } @else {
13444
- {{ step() }}
13458
+ {{ stepSignal() }}
13445
13459
  }
13446
13460
  </div>
13447
13461
  <div class="dbx-step-block-content">
13448
- @if (header()) {
13462
+ @if (headerSignal()) {
13449
13463
  <div class="dbx-step-block-header">
13450
- <span class="dbx-step-block-header-label">{{ header() }}</span>
13464
+ <span class="dbx-step-block-header-label">{{ headerSignal() }}</span>
13451
13465
  <ng-content select="[header]"></ng-content>
13452
13466
  </div>
13453
13467
  }
13454
- @if (hint()) {
13455
- <span class="dbx-step-block-hint">{{ hint() }}</span>
13468
+ @if (hintSignal()) {
13469
+ <span class="dbx-step-block-hint">{{ hintSignal() }}</span>
13456
13470
  }
13457
13471
  <ng-content></ng-content>
13458
13472
  </div>
13459
13473
  `,
13460
13474
  host: {
13461
13475
  class: 'dbx-step-block d-block',
13462
- '[class.dbx-step-block-center]': 'center()'
13476
+ '[class.dbx-step-block-center]': 'centerSignal()'
13463
13477
  },
13464
13478
  imports: [MatIconModule, DbxColorDirective],
13465
13479
  standalone: true,
13466
13480
  changeDetection: ChangeDetectionStrategy.OnPush
13467
13481
  }]
13468
- }], propDecorators: { step: [{ type: i0.Input, args: [{ isSignal: true, alias: "step", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], header: [{ type: i0.Input, args: [{ isSignal: true, alias: "header", required: false }] }], hint: [{ type: i0.Input, args: [{ isSignal: true, alias: "hint", required: false }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], center: [{ type: i0.Input, args: [{ isSignal: true, alias: "center", required: false }] }] } });
13482
+ }], propDecorators: { config: [{ type: i0.Input, args: [{ isSignal: true, alias: "config", required: false }] }], step: [{ type: i0.Input, args: [{ isSignal: true, alias: "step", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], header: [{ type: i0.Input, args: [{ isSignal: true, alias: "header", required: false }] }], hint: [{ type: i0.Input, args: [{ isSignal: true, alias: "hint", required: false }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], center: [{ type: i0.Input, args: [{ isSignal: true, alias: "center", required: false }] }] } });
13469
13483
 
13470
13484
  /**
13471
13485
  * Adds inline spacing sized for icons, typically used to align text that sits next to icon-bearing siblings.