@brickclay-org/ui 0.0.49 → 0.0.51

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/index.d.ts CHANGED
@@ -6,7 +6,7 @@ import * as i1 from '@angular/common';
6
6
  import { ControlValueAccessor, NgControl, NgModel } from '@angular/forms';
7
7
  import { CdkDragDrop, CdkDragMove, CdkDragStart } from '@angular/cdk/drag-drop';
8
8
  import * as i1$2 from '@angular/cdk/dialog';
9
- import { CdkDialogContainer, DialogRef as DialogRef$1 } from '@angular/cdk/dialog';
9
+ import { CdkDialogContainer, DialogRef } from '@angular/cdk/dialog';
10
10
  import * as i2 from '@angular/cdk/overlay';
11
11
  import { ScrollStrategy } from '@angular/cdk/overlay';
12
12
  import * as i3 from '@angular/cdk/portal';
@@ -875,7 +875,7 @@ declare class BkTabs {
875
875
  }
876
876
 
877
877
  /**
878
- * DialogContainerComponent
878
+ * BkDialogContainerComponent
879
879
  *
880
880
  * Architecture Decision:
881
881
  * ─────────────────────
@@ -895,19 +895,19 @@ declare class BkTabs {
895
895
  * • Position-offset application via CSS margin.
896
896
  *
897
897
  * This component is **never** used directly — it is created internally
898
- * by `DialogService` via CDK's `Dialog.open()`.
898
+ * by `BkDialogService` via CDK's `Dialog.open()`.
899
899
  */
900
900
 
901
- declare class DialogContainerComponent extends CdkDialogContainer implements OnInit {
901
+ declare class BkDialogContainerComponent extends CdkDialogContainer implements OnInit {
902
902
  /**
903
903
  * Our full config (including animation fields).
904
- * Provided by DialogService via the INTERNAL_DIALOG_CONFIG token.
904
+ * Provided by BkDialogService via the INTERNAL_DIALOG_CONFIG token.
905
905
  */
906
906
  private readonly _dialogConfig;
907
907
  /**
908
908
  * Resolves when the enter animation finishes (or immediately for 'none').
909
- * `DialogService` subscribes via `.then()` to emit `afterOpened` on the
910
- * `DialogRef`.
909
+ * `BkDialogService` subscribes via `.then()` to emit `afterOpened` on the
910
+ * `BkDialogRef`.
911
911
  */
912
912
  private _resolveOpened;
913
913
  readonly opened: Promise<void>;
@@ -927,7 +927,7 @@ declare class DialogContainerComponent extends CdkDialogContainer implements OnI
927
927
  private _playEnterAnimation;
928
928
  /**
929
929
  * Play the leave animation. Returns a Promise that resolves when done.
930
- * Called by `DialogRef._runCloseSequence()` before CDK tears down the
930
+ * Called by `BkDialogRef._runCloseSequence()` before CDK tears down the
931
931
  * overlay.
932
932
  */
933
933
  playLeaveAnimation(): Promise<void>;
@@ -941,12 +941,12 @@ declare class DialogContainerComponent extends CdkDialogContainer implements OnI
941
941
  * Walk up from our host → pane → wrapper, then query for the backdrop.
942
942
  */
943
943
  private _getBackdropElement;
944
- static ɵfac: i0.ɵɵFactoryDeclaration<DialogContainerComponent, never>;
945
- static ɵcmp: i0.ɵɵComponentDeclaration<DialogContainerComponent, "bk-dialog-container", never, {}, {}, never, never, true, never>;
944
+ static ɵfac: i0.ɵɵFactoryDeclaration<BkDialogContainerComponent, never>;
945
+ static ɵcmp: i0.ɵɵComponentDeclaration<BkDialogContainerComponent, "bk-dialog-container", never, {}, {}, never, never, true, never>;
946
946
  }
947
947
 
948
948
  /**
949
- * DialogRef — Handle returned to callers by `DialogService.open()`.
949
+ * BkDialogRef — Handle returned to callers by `BkDialogService.open()`.
950
950
  *
951
951
  * Architecture Decision:
952
952
  * ─────────────────────
@@ -964,7 +964,7 @@ declare class DialogContainerComponent extends CdkDialogContainer implements OnI
964
964
 
965
965
  /**
966
966
  * Minimal interface for the container's capabilities.
967
- * Avoids a direct import of `DialogContainerComponent` in this file
967
+ * Avoids a direct import of `BkDialogContainerComponent` in this file
968
968
  * (container imports nothing from ref, so no cycle, but this keeps
969
969
  * the coupling lightweight).
970
970
  *
@@ -977,14 +977,14 @@ interface DialogAnimatable {
977
977
  _addAriaLabelledBy?(id: string): void;
978
978
  _removeAriaLabelledBy?(id: string): void;
979
979
  }
980
- declare class DialogRef<T = unknown, R = unknown> {
980
+ declare class BkDialogRef<T = unknown, R = unknown> {
981
981
  /**
982
982
  * @internal Wrapped CDK ref.
983
983
  * Typed as `CdkDialogRef<any>` to avoid deep generic-variance issues
984
984
  * that arise from CDK's `config.providers` callback signature.
985
985
  * The public API (`afterClosed`, etc.) re-types the observables.
986
986
  */
987
- readonly _cdkRef: DialogRef$1<any>;
987
+ readonly _cdkRef: DialogRef<any>;
988
988
  /** Unique dialog identifier (managed by CDK). */
989
989
  readonly id: string;
990
990
  /** Instance of the component rendered inside the dialog. */
@@ -1002,7 +1002,7 @@ declare class DialogRef<T = unknown, R = unknown> {
1002
1002
  * that arise from CDK's `config.providers` callback signature.
1003
1003
  * The public API (`afterClosed`, etc.) re-types the observables.
1004
1004
  */
1005
- _cdkRef: DialogRef$1<any>);
1005
+ _cdkRef: DialogRef<any>);
1006
1006
  /**
1007
1007
  * Close the dialog, optionally returning a result.
1008
1008
  * Plays the WAAPI leave animation, then delegates to CDK for cleanup.
@@ -1059,13 +1059,13 @@ declare class DialogRef<T = unknown, R = unknown> {
1059
1059
  */
1060
1060
 
1061
1061
  /**
1062
- * Shared abstract base that resolves the owning `DialogRef` (via DI or
1062
+ * Shared abstract base that resolves the owning `BkDialogRef` (via DI or
1063
1063
  * DOM walk) and invokes `_onAdd()` / `_onRemove()` lifecycle hooks.
1064
1064
  *
1065
1065
  * Same pattern as Material's internal `MatDialogLayoutSection`.
1066
1066
  */
1067
1067
  declare abstract class BkDialogLayoutSection implements OnInit, OnDestroy {
1068
- protected _dialogRef: DialogRef | null;
1068
+ protected _dialogRef: BkDialogRef | null;
1069
1069
  protected _elementRef: ElementRef<any>;
1070
1070
  private _dialogService;
1071
1071
  ngOnInit(): void;
@@ -1184,7 +1184,7 @@ declare class BkDialogClose implements OnInit, OnChanges {
1184
1184
 
1185
1185
  declare class BkDialogModule {
1186
1186
  static ɵfac: i0.ɵɵFactoryDeclaration<BkDialogModule, never>;
1187
- static ɵmod: i0.ɵɵNgModuleDeclaration<BkDialogModule, never, [typeof i1$2.DialogModule, typeof i2.OverlayModule, typeof i3.PortalModule, typeof DialogContainerComponent, typeof BkDialogTitle, typeof BkDialogContent, typeof BkDialogActions, typeof BkDialogClose], [typeof BkDialogTitle, typeof BkDialogContent, typeof BkDialogActions, typeof BkDialogClose]>;
1187
+ static ɵmod: i0.ɵɵNgModuleDeclaration<BkDialogModule, never, [typeof i1$2.DialogModule, typeof i2.OverlayModule, typeof i3.PortalModule, typeof BkDialogContainerComponent, typeof BkDialogTitle, typeof BkDialogContent, typeof BkDialogActions, typeof BkDialogClose], [typeof BkDialogTitle, typeof BkDialogContent, typeof BkDialogActions, typeof BkDialogClose]>;
1188
1188
  static ɵinj: i0.ɵɵInjectorDeclaration<BkDialogModule>;
1189
1189
  }
1190
1190
 
@@ -1193,14 +1193,14 @@ declare class BkDialogModule {
1193
1193
  *
1194
1194
  * Architecture Decision:
1195
1195
  * ─────────────────────
1196
- * Our `DialogConfig` mirrors the fields from CDK's `DialogConfig` that we
1196
+ * Our `BkDialogConfig` mirrors the fields from CDK's `DialogConfig` that we
1197
1197
  * expose, plus adds custom animation properties powered by WAAPI.
1198
1198
  *
1199
- * When `DialogService.open()` is called these values are:
1199
+ * When `BkDialogService.open()` is called these values are:
1200
1200
  * 1. Merged with global defaults and per-call overrides.
1201
1201
  * 2. Mapped onto CDK's native `DialogConfig` for overlay, backdrop, scroll,
1202
1202
  * position, ARIA, and focus-trap management.
1203
- * 3. Passed to `DialogContainerComponent` via an internal token for
1203
+ * 3. Passed to `BkDialogContainerComponent` via an internal token for
1204
1204
  * animation playback and position offsets.
1205
1205
  *
1206
1206
  * CDK handles: unique IDs, z-index stacking, scroll blocking, focus trap,
@@ -1212,19 +1212,19 @@ declare class BkDialogModule {
1212
1212
  * Built-in WAAPI animation presets.
1213
1213
  * 'none' disables animation entirely.
1214
1214
  */
1215
- type DialogAnimation = 'none' | 'fade' | 'zoom' | 'slide-top' | 'slide-bottom' | 'slide-left' | 'slide-right';
1215
+ type BkDialogAnimation = 'none' | 'fade' | 'zoom' | 'slide-top' | 'slide-bottom' | 'slide-left' | 'slide-right';
1216
1216
  /**
1217
1217
  * Fine-grained position offsets.
1218
1218
  * When provided, the dialog shifts from the default centred position.
1219
1219
  * Internally this is mapped to CDK's `GlobalPositionStrategy`.
1220
1220
  */
1221
- interface DialogPosition {
1221
+ interface BkDialogPosition {
1222
1222
  top?: string;
1223
1223
  bottom?: string;
1224
1224
  left?: string;
1225
1225
  right?: string;
1226
1226
  }
1227
- interface DialogConfig<D = unknown> {
1227
+ interface BkDialogConfig<D = unknown> {
1228
1228
  /**
1229
1229
  * Unique dialog identifier.
1230
1230
  * CDK auto-generates one if omitted and validates uniqueness —
@@ -1266,13 +1266,13 @@ interface DialogConfig<D = unknown> {
1266
1266
  /** Payload injected into the dialog component via `DIALOG_DATA`. */
1267
1267
  data?: D;
1268
1268
  /** Panel animation preset. Default `'fade'`. */
1269
- animation?: DialogAnimation;
1269
+ animation?: BkDialogAnimation;
1270
1270
  /** Enter animation duration in ms. Default `200`. */
1271
1271
  animationDurationEnter?: number;
1272
1272
  /** Leave animation duration in ms. Default `150`. */
1273
1273
  animationDurationLeave?: number;
1274
1274
  /** Position offsets — moves the dialog from its default centred position. */
1275
- position?: DialogPosition;
1275
+ position?: BkDialogPosition;
1276
1276
  role?: 'dialog' | 'alertdialog';
1277
1277
  ariaLabel?: string;
1278
1278
  ariaLabelledBy?: string;
@@ -1289,10 +1289,10 @@ interface DialogConfig<D = unknown> {
1289
1289
  /** Override CDK's scroll strategy for this dialog. */
1290
1290
  scrollStrategy?: ScrollStrategy;
1291
1291
  }
1292
- declare const DEFAULT_DIALOG_CONFIG: DialogConfig;
1292
+ declare const BK_DEFAULT_DIALOG_CONFIG: BkDialogConfig;
1293
1293
 
1294
1294
  /**
1295
- * DialogService — The core engine of the custom dialog system.
1295
+ * BkDialogService — The core engine of the custom dialog system.
1296
1296
  *
1297
1297
  * Architecture Decision:
1298
1298
  * ─────────────────────
@@ -1303,10 +1303,10 @@ declare const DEFAULT_DIALOG_CONFIG: DialogConfig;
1303
1303
  * z-index stacking, and unique ID management — battle-tested infra
1304
1304
  * shared with every Angular Material dialog in the ecosystem.
1305
1305
  *
1306
- * 2. We provide our own `DialogContainerComponent` (extending
1306
+ * 2. We provide our own `BkDialogContainerComponent` (extending
1307
1307
  * `CdkDialogContainer`) for WAAPI animations and panel styling.
1308
1308
  *
1309
- * 3. We wrap CDK's `DialogRef` in our own `DialogRef` to add the
1309
+ * 3. We wrap CDK's `DialogRef` in our own `BkDialogRef` to add the
1310
1310
  * leave-animation step before CDK tears down the overlay, and to
1311
1311
  * expose the same familiar API shape (`afterClosed()`, etc.).
1312
1312
  *
@@ -1329,11 +1329,11 @@ declare const DEFAULT_DIALOG_CONFIG: DialogConfig;
1329
1329
  * ─────────────
1330
1330
  * CDK manages the full lifecycle: on close it detaches the overlay,
1331
1331
  * destroys the container, and disposes the overlay ref.
1332
- * Our DialogRef subjects complete via CDK's `closed` observable,
1332
+ * Our BkDialogRef subjects complete via CDK's `closed` observable,
1333
1333
  * preventing lingering subscriptions.
1334
1334
  */
1335
1335
 
1336
- declare class DialogService {
1336
+ declare class BkDialogService {
1337
1337
  private readonly _cdkDialog;
1338
1338
  private readonly _overlay;
1339
1339
  private readonly _globalConfig;
@@ -1345,7 +1345,7 @@ declare class DialogService {
1345
1345
  * @param component The component class to render inside the dialog.
1346
1346
  * @param config Optional per-dialog configuration (merged on top
1347
1347
  * of global and default settings).
1348
- * @returns A strongly-typed `DialogRef` to interact with.
1348
+ * @returns A strongly-typed `BkDialogRef` to interact with.
1349
1349
  *
1350
1350
  * @example
1351
1351
  * ```ts
@@ -1356,20 +1356,20 @@ declare class DialogService {
1356
1356
  * ref.afterClosed().subscribe(result => console.log(result));
1357
1357
  * ```
1358
1358
  */
1359
- open<T, D = unknown, R = unknown>(component: Type<T>, config?: DialogConfig<D>): DialogRef<T, R>;
1359
+ open<T, D = unknown, R = unknown>(component: Type<T>, config?: BkDialogConfig<D>): BkDialogRef<T, R>;
1360
1360
  /**
1361
1361
  * Close all currently open dialogs (most recent first).
1362
1362
  */
1363
1363
  closeAll(): void;
1364
1364
  /**
1365
- * Returns the `DialogRef` of the most recently opened dialog,
1365
+ * Returns the `BkDialogRef` of the most recently opened dialog,
1366
1366
  * or `undefined` if none are open.
1367
1367
  */
1368
- getTopDialog(): DialogRef | undefined;
1368
+ getTopDialog(): BkDialogRef | undefined;
1369
1369
  /**
1370
1370
  * Get a dialog by its CDK-managed unique ID.
1371
1371
  */
1372
- getDialogById(id: string): DialogRef | undefined;
1372
+ getDialogById(id: string): BkDialogRef | undefined;
1373
1373
  /**
1374
1374
  * Number of currently open dialogs.
1375
1375
  */
@@ -1377,10 +1377,10 @@ declare class DialogService {
1377
1377
  /**
1378
1378
  * Read-only snapshot of currently open dialog refs.
1379
1379
  * Used internally by content directives (`BkDialogTitle`, `BkDialogActions`,
1380
- * `BkDialogClose`) for the DOM-walk fallback when `DialogRef` is not
1380
+ * `BkDialogClose`) for the DOM-walk fallback when `BkDialogRef` is not
1381
1381
  * available via injection (e.g. inside `<ng-template>`).
1382
1382
  */
1383
- get openDialogsRef(): readonly DialogRef[];
1383
+ get openDialogsRef(): readonly BkDialogRef[];
1384
1384
  /**
1385
1385
  * Open a simple confirmation dialog.
1386
1386
  * Resolves `true` if the user confirms, `false` otherwise.
@@ -1401,7 +1401,7 @@ declare class DialogService {
1401
1401
  btnCancelText?: string;
1402
1402
  width?: string;
1403
1403
  component: Type<unknown>;
1404
- }): DialogRef<unknown, boolean>;
1404
+ }): BkDialogRef<unknown, boolean>;
1405
1405
  /**
1406
1406
  * Open a simple alert dialog.
1407
1407
  */
@@ -1411,7 +1411,7 @@ declare class DialogService {
1411
1411
  btnOkText?: string;
1412
1412
  width?: string;
1413
1413
  component: Type<unknown>;
1414
- }): DialogRef<unknown, void>;
1414
+ }): BkDialogRef<unknown, void>;
1415
1415
  /**
1416
1416
  * Subscribe to backdrop-click and ESC events on the CDK ref,
1417
1417
  * closing the dialog based on our config flags.
@@ -1431,8 +1431,8 @@ declare class DialogService {
1431
1431
  * Falls back to centred (both axes) when no position is specified.
1432
1432
  */
1433
1433
  private _buildPositionStrategy;
1434
- static ɵfac: i0.ɵɵFactoryDeclaration<DialogService, never>;
1435
- static ɵprov: i0.ɵɵInjectableDeclaration<DialogService>;
1434
+ static ɵfac: i0.ɵɵFactoryDeclaration<BkDialogService, never>;
1435
+ static ɵprov: i0.ɵɵInjectableDeclaration<BkDialogService>;
1436
1436
  }
1437
1437
 
1438
1438
  /**
@@ -1449,8 +1449,8 @@ declare class DialogService {
1449
1449
  * as before.
1450
1450
  *
1451
1451
  * • `INTERNAL_DIALOG_CONFIG` — Internal-only token used to pass our
1452
- * full `DialogConfig` (including animation fields) to the custom
1453
- * `DialogContainerComponent`. Not part of the public API.
1452
+ * full `BkDialogConfig` (including animation fields) to the custom
1453
+ * `BkDialogContainerComponent`. Not part of the public API.
1454
1454
  */
1455
1455
 
1456
1456
  /**
@@ -1462,10 +1462,10 @@ declare class DialogService {
1462
1462
  *
1463
1463
  * Usage inside a dialog component:
1464
1464
  * ```ts
1465
- * constructor(@Inject(DIALOG_DATA) public data: MyDataType) {}
1465
+ * constructor(@Inject(BK_DIALOG_DATA) public data: MyDataType) {}
1466
1466
  * ```
1467
1467
  */
1468
- declare const DIALOG_DATA: InjectionToken<any>;
1468
+ declare const BK_DIALOG_DATA: InjectionToken<any>;
1469
1469
  /**
1470
1470
  * Optional token for providing global dialog defaults at the
1471
1471
  * application level.
@@ -1473,11 +1473,11 @@ declare const DIALOG_DATA: InjectionToken<any>;
1473
1473
  * Usage in `app.config.ts` or a module's `providers` array:
1474
1474
  * ```ts
1475
1475
  * providers: [
1476
- * { provide: DIALOG_GLOBAL_CONFIG, useValue: { animation: 'zoom', width: '600px' } }
1476
+ * { provide: BK_DIALOG_GLOBAL_CONFIG, useValue: { animation: 'zoom', width: '600px' } }
1477
1477
  * ]
1478
1478
  * ```
1479
1479
  */
1480
- declare const DIALOG_GLOBAL_CONFIG: InjectionToken<DialogConfig<unknown>>;
1480
+ declare const BK_DIALOG_GLOBAL_CONFIG: InjectionToken<BkDialogConfig<unknown>>;
1481
1481
 
1482
1482
  /**
1483
1483
  * Dialog Animations
@@ -1492,20 +1492,20 @@ declare const DIALOG_GLOBAL_CONFIG: InjectionToken<DialogConfig<unknown>>;
1492
1492
  * 3. Future presets can be added without touching the component template.
1493
1493
  *
1494
1494
  * Each preset exports an `enter` and `leave` keyframe array plus a
1495
- * recommended timing object. The DialogContainerComponent plays these
1495
+ * recommended timing object. The BkDialogContainerComponent plays these
1496
1496
  * via `element.animate()`.
1497
1497
  */
1498
1498
 
1499
- interface AnimationKeyframes {
1499
+ interface BkAnimationKeyframes {
1500
1500
  keyframes: Keyframe[];
1501
1501
  options: KeyframeAnimationOptions;
1502
1502
  }
1503
1503
  /**
1504
1504
  * Build enter/leave WAAPI keyframes for the dialog **panel** element.
1505
1505
  */
1506
- declare function getDialogPanelAnimation(preset: DialogAnimation, enterDuration: number, leaveDuration: number): {
1507
- enter: AnimationKeyframes;
1508
- leave: AnimationKeyframes;
1506
+ declare function getDialogPanelAnimation(preset: BkDialogAnimation, enterDuration: number, leaveDuration: number): {
1507
+ enter: BkAnimationKeyframes;
1508
+ leave: BkAnimationKeyframes;
1509
1509
  };
1510
1510
  /**
1511
1511
  * Build enter/leave WAAPI keyframes for the **backdrop** element.
@@ -1513,8 +1513,8 @@ declare function getDialogPanelAnimation(preset: DialogAnimation, enterDuration:
1513
1513
  * panel animation preset.
1514
1514
  */
1515
1515
  declare function getDialogBackdropAnimation(enterDuration: number, leaveDuration: number): {
1516
- enter: AnimationKeyframes;
1517
- leave: AnimationKeyframes;
1516
+ enter: BkAnimationKeyframes;
1517
+ leave: BkAnimationKeyframes;
1518
1518
  };
1519
1519
 
1520
1520
  declare class BKTooltipDirective implements OnInit, OnChanges, OnDestroy {
@@ -1553,5 +1553,72 @@ declare class BkValidator implements OnInit {
1553
1553
  static ɵcmp: i0.ɵɵComponentDeclaration<BkValidator, "bk-validator", never, { "control": { "alias": "control"; "required": false; }; "label": { "alias": "label"; "required": false; }; "errorMessage": { "alias": "errorMessage"; "required": false; }; "showError": { "alias": "showError"; "required": false; }; }, {}, never, never, true, never>;
1554
1554
  }
1555
1555
 
1556
- export { BKTooltipDirective, BkBadge, BkButton, BkButtonGroup, BkCheckbox, BkCustomCalendar, BkDialogActions, BkDialogClose, BkDialogContent, BkDialogModule, BkDialogTitle, BkGrid, BkIconButton, BkInput, BkInputChips, BkPill, BkRadioButton, BkScheduledDatePicker, BkSelect, BkSpinner, BkTabs, BkTextarea, BkTimePicker, BkToggle, BkValidator, BrickclayIcons, BrickclayLib, CalendarManagerService, CalendarModule, DEFAULT_DIALOG_CONFIG, DIALOG_DATA, DIALOG_GLOBAL_CONFIG, DialogRef, DialogService, getDialogBackdropAnimation, getDialogPanelAnimation };
1557
- export type { AnimationKeyframes, BadgeColor, BadgeSize, BadgeVariant, BkInputAutoCapitalize, BkInputAutoComplete, BkInputMode, BkInputType, BkTextAreaAutoCapitalize, BkTextAreaAutoComplete, BkTextAreaInputMode, ButtonSize, ButtonVariant, CalendarRange, CalendarSelection, CountryOption, DialogAnimation, DialogConfig, DialogPosition, GroupItem, GroupMode, IconButtonSize, IconButtonVariant, IconOrientation, PillColor, PillSize, PillVariant, ScheduledDateSelection, SortDirection, SpinnerSize, TabItem, TableAction, TableColumn, TimeConfiguration };
1556
+ type AvatarSize = 'sm' | 'md' | 'lg' | 'xl';
1557
+ type AvatarFallback = 'auto' | 'initials' | 'icon' | 'camera';
1558
+ declare class AvatarProfile implements OnDestroy, ControlValueAccessor {
1559
+ src: string | null;
1560
+ alt: string;
1561
+ name: string;
1562
+ size: AvatarSize;
1563
+ fallback: AvatarFallback;
1564
+ /** Whether upload / remove actions are enabled */
1565
+ editable: boolean;
1566
+ /** Accepted file MIME types for the file picker */
1567
+ accept: string;
1568
+ /** Max file size in KB (0 = no limit) */
1569
+ maxFileSizeKB: number;
1570
+ /** Label shown on the upload button */
1571
+ uploadLabel: string;
1572
+ /** Hint text shown below the upload button */
1573
+ hint: string;
1574
+ /** External loading state (e.g. while uploading) */
1575
+ loading: boolean;
1576
+ /** Whether the remove badge is shown when an image is present */
1577
+ removable: boolean;
1578
+ /** Label displayed above the avatar */
1579
+ label: string;
1580
+ /** Whether the field is required (shows asterisk) */
1581
+ required: boolean;
1582
+ /** External error state flag */
1583
+ hasError: boolean;
1584
+ /** Error message to display when hasError is true */
1585
+ errorMessage: string;
1586
+ /** Disabled state (also set via CVA setDisabledState) */
1587
+ disabled: boolean;
1588
+ /** Emits the selected File after validation passes */
1589
+ fileSelected: EventEmitter<any>;
1590
+ /** Emits when the user clicks the remove badge */
1591
+ removed: EventEmitter<void>;
1592
+ /** Emits a human-readable error string on validation failure */
1593
+ fileError: EventEmitter<string>;
1594
+ initials: string;
1595
+ imageLoadFailed: boolean;
1596
+ /** Local blob URL for instant preview before server upload completes */
1597
+ private previewUrl;
1598
+ private onChange;
1599
+ private onTouched;
1600
+ writeValue(value: string | null): void;
1601
+ registerOnChange(fn: (value: string | null) => void): void;
1602
+ registerOnTouched(fn: () => void): void;
1603
+ setDisabledState(isDisabled: boolean): void;
1604
+ ngOnChanges(changes: SimpleChanges): void;
1605
+ ngOnDestroy(): void;
1606
+ onImageError(): void;
1607
+ /** The URL the template should display — local preview takes priority over the server src */
1608
+ get displaySrc(): string | null;
1609
+ get showInitials(): boolean;
1610
+ get containerClasses(): string;
1611
+ get sizeClasses(): AvatarSize[];
1612
+ get showRemoveButton(): boolean;
1613
+ onFileSelected(event: Event): void;
1614
+ onRemove(): void;
1615
+ /** Revoke the previous object URL to free memory */
1616
+ private revokePreview;
1617
+ private isFileTypeValid;
1618
+ private getInitials;
1619
+ static ɵfac: i0.ɵɵFactoryDeclaration<AvatarProfile, never>;
1620
+ static ɵcmp: i0.ɵɵComponentDeclaration<AvatarProfile, "bk-avatar-profile", never, { "src": { "alias": "src"; "required": false; }; "alt": { "alias": "alt"; "required": false; }; "name": { "alias": "name"; "required": false; }; "size": { "alias": "size"; "required": false; }; "fallback": { "alias": "fallback"; "required": false; }; "editable": { "alias": "editable"; "required": false; }; "accept": { "alias": "accept"; "required": false; }; "maxFileSizeKB": { "alias": "maxFileSizeKB"; "required": false; }; "uploadLabel": { "alias": "uploadLabel"; "required": false; }; "hint": { "alias": "hint"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; "removable": { "alias": "removable"; "required": false; }; "label": { "alias": "label"; "required": false; }; "required": { "alias": "required"; "required": false; }; "hasError": { "alias": "hasError"; "required": false; }; "errorMessage": { "alias": "errorMessage"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, { "fileSelected": "fileSelected"; "removed": "removed"; "fileError": "fileError"; }, never, never, true, never>;
1621
+ }
1622
+
1623
+ export { AvatarProfile, BKTooltipDirective, BK_DEFAULT_DIALOG_CONFIG, BK_DIALOG_DATA, BK_DIALOG_GLOBAL_CONFIG, BkBadge, BkButton, BkButtonGroup, BkCheckbox, BkCustomCalendar, BkDialogActions, BkDialogClose, BkDialogContent, BkDialogModule, BkDialogRef, BkDialogService, BkDialogTitle, BkGrid, BkIconButton, BkInput, BkInputChips, BkPill, BkRadioButton, BkScheduledDatePicker, BkSelect, BkSpinner, BkTabs, BkTextarea, BkTimePicker, BkToggle, BkValidator, BrickclayIcons, BrickclayLib, CalendarManagerService, CalendarModule, getDialogBackdropAnimation, getDialogPanelAnimation };
1624
+ export type { AvatarFallback, AvatarSize, BadgeColor, BadgeSize, BadgeVariant, BkAnimationKeyframes, BkDialogAnimation, BkDialogConfig, BkDialogPosition, BkInputAutoCapitalize, BkInputAutoComplete, BkInputMode, BkInputType, BkTextAreaAutoCapitalize, BkTextAreaAutoComplete, BkTextAreaInputMode, ButtonSize, ButtonVariant, CalendarRange, CalendarSelection, CountryOption, GroupItem, GroupMode, IconButtonSize, IconButtonVariant, IconOrientation, PillColor, PillSize, PillVariant, ScheduledDateSelection, SortDirection, SpinnerSize, TabItem, TableAction, TableColumn, TimeConfiguration };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brickclay-org/ui",
3
- "version": "0.0.49",
3
+ "version": "0.0.51",
4
4
  "schematics": "./schematics/collection.json",
5
5
  "ng-add": {
6
6
  "save": "dependencies"
@@ -0,0 +1,80 @@
1
+ /* =========================
2
+ Container
3
+ ========================= */
4
+ .avatar-profile-container {
5
+ @apply flex flex-col gap-1.5;
6
+ }
7
+
8
+ /* =========================
9
+ Label
10
+ ========================= */
11
+ .avatar-profile-label {
12
+ @apply text-sm font-medium text-[#141414];
13
+ }
14
+
15
+ .avatar-profile-label-required {
16
+ @apply text-[#E7000B] ml-0.5;
17
+ }
18
+
19
+ /* =========================
20
+ Error message
21
+ ========================= */
22
+ .avatar-profile-error {
23
+ @apply text-xs text-[#E7000B] font-normal;
24
+ }
25
+
26
+ /* =========================
27
+ Base Avatar
28
+ ========================= */
29
+ .avatar-profile {
30
+ @apply relative inline-flex items-center justify-center
31
+ rounded-full flex-shrink-0 select-none shadow-lg
32
+ transition-all duration-200 border-[3px] border-white bg-[#F9FAFA];
33
+ }
34
+
35
+ .avatar-profile .avatar-img {
36
+ @apply w-full h-full object-cover rounded-full;
37
+ }
38
+ .upload-button { @apply font-medium text-[#6B7080] border border-[#E3E3E7] rounded shadow-sm;}
39
+ .sm .upload-button { @apply text-[12px] leading-[18px] px-2 py-3;}
40
+ .md .upload-button { @apply text-[14px] leading-[20px] px-[10px] py-2.5;}
41
+ .lg .upload-button { @apply text-[16px] leading-[24px] px-[18px] py-2.5;}
42
+ .xl .upload-button { @apply text-[16px] leading-[24px] px-5 py-3;}
43
+
44
+ .profile-size { @apply font-medium text-[#6B7080];}
45
+ .sm .profile-size { @apply text-[10px] leading-[14px];}
46
+ .md .profile-size { @apply text-[12px] leading-[18px] ;}
47
+ .lg .profile-size { @apply text-[14px] leading-[20px];}
48
+ .xl .profile-size { @apply text-[16px] leading-[24px] ;}
49
+
50
+
51
+ .avatar-profile.sm .avatar-text { @apply font-medium text-[30px] leading-[38px];}
52
+ .avatar-profile.md .avatar-text { @apply font-medium text-[36px] leading-[44px];}
53
+ .avatar-profile.lg .avatar-text { @apply font-medium text-[45px] leading-[55px];}
54
+ .avatar-profile.xl .avatar-text { @apply font-medium text-[60px] leading-[72px];}
55
+
56
+ /* =========================
57
+ Sizes (container + text)
58
+ ========================= */
59
+ .avatar-profile{ @apply font-medium text-[#6B7080];}
60
+ .avatar-profile.sm { @apply size-[72px] text-sm; }
61
+ .avatar-profile.md { @apply size-[96px] text-base; }
62
+ .avatar-profile.lg { @apply size-[120px] text-[18px] leading-[26px]; }
63
+ .avatar-profile.xl { @apply size-[160px] text-xl; }
64
+
65
+ /* =========================
66
+ Placeholder Icon Sizes
67
+ ========================= */
68
+ .avatar-profile.sm .placeholder-icon { @apply size-[28px]; }
69
+ .avatar-profile.md .placeholder-icon { @apply size-[42px]; }
70
+ .avatar-profile.lg .placeholder-icon { @apply size-[52px]; }
71
+ .avatar-profile.xl .placeholder-icon { @apply size-[65px]; }
72
+
73
+ /* =========================
74
+ Remove Badge
75
+ ========================= */
76
+ .remove-badge {
77
+ @apply absolute top-0 right-0 w-5 h-5 bg-white rounded-full shadow-md
78
+ flex items-center justify-center cursor-pointer
79
+ hover:bg-gray-50 transition z-20 border-0 p-0;
80
+ }
package/src/styles.css CHANGED
@@ -16,3 +16,4 @@
16
16
  @import './lib/tabs/tabs.css';
17
17
  @import './lib/dialog/dialog-container.css';
18
18
  @import './lib/tooltip/tooltip-directive.css';
19
+ @import './lib/avatar-profile/avatar-profile.css';