@eagami/ui 0.4.1 → 0.5.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eagami/ui",
3
- "version": "0.4.1",
3
+ "version": "0.5.0",
4
4
  "description": "Lightweight, accessible Angular UI component library built on CSS custom properties",
5
5
  "author": "Michal Wiraszka <michal@eagami.com>",
6
6
  "license": "MIT",
@@ -17,6 +17,8 @@
17
17
 
18
18
  // Focus ring — used for keyboard accessibility across all interactive elements
19
19
  --shadow-focus-ring: 0 0 0 3px rgba(59, 130, 246, 0.45);
20
+ --shadow-focus-ring-error: 0 0 0 3px var(--color-error-200);
21
+ --shadow-focus-ring-success: 0 0 0 3px var(--color-success-200);
20
22
 
21
23
  // ---------------------------------------------------------------------------
22
24
  // Z-index scale
@@ -21,16 +21,19 @@ declare class AvatarEditorComponent implements OnDestroy {
21
21
  readonly exportQuality: _angular_core.InputSignal<number>;
22
22
  readonly exportType: _angular_core.InputSignal<string>;
23
23
  readonly cropped: _angular_core.OutputEmitterRef<AvatarEditorCropEvent>;
24
+ readonly removed: _angular_core.OutputEmitterRef<void>;
24
25
  readonly fileError: _angular_core.OutputEmitterRef<string>;
25
26
  readonly hasImage: _angular_core.WritableSignal<boolean>;
26
27
  readonly isDragOver: _angular_core.WritableSignal<boolean>;
27
28
  readonly zoom: _angular_core.WritableSignal<number>;
29
+ readonly canRevert: _angular_core.Signal<boolean>;
28
30
  private image;
29
31
  private offsetX;
30
32
  private offsetY;
31
33
  private dragStartX;
32
34
  private dragStartY;
33
35
  private isDragging;
36
+ private hasDragged;
34
37
  private initialOffsetX;
35
38
  private initialOffsetY;
36
39
  readonly hostClasses: _angular_core.Signal<{
@@ -38,6 +41,7 @@ declare class AvatarEditorComponent implements OnDestroy {
38
41
  'ea-avatar-editor--has-image': boolean;
39
42
  'ea-avatar-editor--drag-over': boolean;
40
43
  }>;
44
+ private readonly injector;
41
45
  private readonly boundWheel;
42
46
  constructor();
43
47
  ngOnDestroy(): void;
@@ -60,9 +64,11 @@ declare class AvatarEditorComponent implements OnDestroy {
60
64
  setZoom(value: number): void;
61
65
  onZoomInput(event: Event): void;
62
66
  removeImage(): void;
67
+ revertImage(): void;
63
68
  exportCrop(): void;
64
69
  private loadFromUrl;
65
70
  private loadFile;
71
+ private scheduleDrawAfterRender;
66
72
  private centerImage;
67
73
  private getScale;
68
74
  private getDrawParams;
@@ -70,7 +76,7 @@ declare class AvatarEditorComponent implements OnDestroy {
70
76
  private draw;
71
77
  private clearCanvas;
72
78
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<AvatarEditorComponent, never>;
73
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<AvatarEditorComponent, "ea-avatar-editor", never, { "shape": { "alias": "shape"; "required": false; "isSignal": true; }; "canvasSize": { "alias": "canvasSize"; "required": false; "isSignal": true; }; "currentSrc": { "alias": "currentSrc"; "required": false; "isSignal": true; }; "accept": { "alias": "accept"; "required": false; "isSignal": true; }; "maxFileSize": { "alias": "maxFileSize"; "required": false; "isSignal": true; }; "minZoom": { "alias": "minZoom"; "required": false; "isSignal": true; }; "maxZoom": { "alias": "maxZoom"; "required": false; "isSignal": true; }; "exportQuality": { "alias": "exportQuality"; "required": false; "isSignal": true; }; "exportType": { "alias": "exportType"; "required": false; "isSignal": true; }; }, { "cropped": "cropped"; "fileError": "fileError"; }, never, never, true, never>;
79
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<AvatarEditorComponent, "ea-avatar-editor", never, { "shape": { "alias": "shape"; "required": false; "isSignal": true; }; "canvasSize": { "alias": "canvasSize"; "required": false; "isSignal": true; }; "currentSrc": { "alias": "currentSrc"; "required": false; "isSignal": true; }; "accept": { "alias": "accept"; "required": false; "isSignal": true; }; "maxFileSize": { "alias": "maxFileSize"; "required": false; "isSignal": true; }; "minZoom": { "alias": "minZoom"; "required": false; "isSignal": true; }; "maxZoom": { "alias": "maxZoom"; "required": false; "isSignal": true; }; "exportQuality": { "alias": "exportQuality"; "required": false; "isSignal": true; }; "exportType": { "alias": "exportType"; "required": false; "isSignal": true; }; }, { "cropped": "cropped"; "removed": "removed"; "fileError": "fileError"; }, never, never, true, never>;
74
80
  }
75
81
 
76
82
  type AvatarSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
@@ -260,6 +266,11 @@ declare class AlertCircleIconComponent {
260
266
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<AlertCircleIconComponent, "ea-icon-alert-circle", never, {}, {}, never, never, true, never>;
261
267
  }
262
268
 
269
+ declare class CameraIconComponent {
270
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<CameraIconComponent, never>;
271
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<CameraIconComponent, "ea-icon-camera", never, {}, {}, never, never, true, never>;
272
+ }
273
+
263
274
  declare class CheckIconComponent {
264
275
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<CheckIconComponent, never>;
265
276
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<CheckIconComponent, "ea-icon-check", never, {}, {}, never, never, true, never>;
@@ -290,6 +301,31 @@ declare class LoaderIconComponent {
290
301
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<LoaderIconComponent, "ea-icon-loader", never, {}, {}, never, never, true, never>;
291
302
  }
292
303
 
304
+ declare class MinusIconComponent {
305
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<MinusIconComponent, never>;
306
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<MinusIconComponent, "ea-icon-minus", never, {}, {}, never, never, true, never>;
307
+ }
308
+
309
+ declare class PlusIconComponent {
310
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<PlusIconComponent, never>;
311
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<PlusIconComponent, "ea-icon-plus", never, {}, {}, never, never, true, never>;
312
+ }
313
+
314
+ declare class RotateCcwIconComponent {
315
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<RotateCcwIconComponent, never>;
316
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<RotateCcwIconComponent, "ea-icon-rotate-ccw", never, {}, {}, never, never, true, never>;
317
+ }
318
+
319
+ declare class TrashIconComponent {
320
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<TrashIconComponent, never>;
321
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<TrashIconComponent, "ea-icon-trash", never, {}, {}, never, never, true, never>;
322
+ }
323
+
324
+ declare class UploadIconComponent {
325
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<UploadIconComponent, never>;
326
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<UploadIconComponent, "ea-icon-upload", never, {}, {}, never, never, true, never>;
327
+ }
328
+
293
329
  declare class UserIconComponent {
294
330
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<UserIconComponent, never>;
295
331
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<UserIconComponent, "ea-icon-user", never, {}, {}, never, never, true, never>;
@@ -528,5 +564,5 @@ declare class TooltipDirective implements OnDestroy {
528
564
  static ɵdir: _angular_core.ɵɵDirectiveDeclaration<TooltipDirective, "[eaTooltip]", never, { "eaTooltip": { "alias": "eaTooltip"; "required": true; "isSignal": true; }; "tooltipPosition": { "alias": "tooltipPosition"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
529
565
  }
530
566
 
531
- export { AlertCircleIconComponent, AvatarComponent, AvatarEditorComponent, BadgeComponent, ButtonComponent, CardComponent, CheckIconComponent, CheckboxComponent, DialogComponent, DividerComponent, DropdownComponent, EyeIconComponent, EyeOffIconComponent, GoogleIconComponent, InfoIconComponent, InputComponent, LoaderIconComponent, RadioComponent, RadioGroupComponent, SpinnerComponent, SwitchComponent, TextareaComponent, ToastComponent, ToastService, TooltipDirective, UserIconComponent, XIconComponent };
567
+ export { AlertCircleIconComponent, AvatarComponent, AvatarEditorComponent, BadgeComponent, ButtonComponent, CameraIconComponent, CardComponent, CheckIconComponent, CheckboxComponent, DialogComponent, DividerComponent, DropdownComponent, EyeIconComponent, EyeOffIconComponent, GoogleIconComponent, InfoIconComponent, InputComponent, LoaderIconComponent, MinusIconComponent, PlusIconComponent, RadioComponent, RadioGroupComponent, RotateCcwIconComponent, SpinnerComponent, SwitchComponent, TextareaComponent, ToastComponent, ToastService, TooltipDirective, TrashIconComponent, UploadIconComponent, UserIconComponent, XIconComponent };
532
568
  export type { AvatarEditorCropEvent, AvatarEditorShape, AvatarShape, AvatarSize, BadgeSize, BadgeVariant, ButtonSize, ButtonType, ButtonVariant, CardHeaderAlign, CardPadding, CardVariant, CheckboxSize, DialogSize, DividerOrientation, DropdownOption, DropdownSize, InputSize, InputStatus, InputType, RadioOrientation, RadioSize, SpinnerSize, SwitchSize, TextareaResize, TextareaSize, TextareaStatus, Toast, ToastOptions, ToastVariant, TooltipPosition };