asksuite-citrus 0.5.4 → 0.6.1

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.
@@ -14,13 +14,14 @@ import * as i12 from "./components/date-picker/date-picker-calendar/date-picker-
14
14
  import * as i13 from "./components/skeleton/skeleton.component";
15
15
  import * as i14 from "./directives/spinner/spinner.component";
16
16
  import * as i15 from "./directives/spinner/spinner.directive";
17
- import * as i16 from "@angular/common";
18
- import * as i17 from "@angular/forms";
19
- import * as i18 from "@angular/cdk/overlay";
20
- import * as i19 from "@ngx-translate/core";
21
- import * as i20 from "ngx-skeleton-loader";
17
+ import * as i16 from "./directives/badge/badge.directive";
18
+ import * as i17 from "@angular/common";
19
+ import * as i18 from "@angular/forms";
20
+ import * as i19 from "@angular/cdk/overlay";
21
+ import * as i20 from "@ngx-translate/core";
22
+ import * as i21 from "ngx-skeleton-loader";
22
23
  export declare class AsksuiteCitrusModule {
23
24
  static ɵfac: i0.ɵɵFactoryDeclaration<AsksuiteCitrusModule, never>;
24
- static ɵmod: i0.ɵɵNgModuleDeclaration<AsksuiteCitrusModule, [typeof i1.ButtonComponent, typeof i2.InputComponent, typeof i3.SelectComponent, typeof i4.BoxComponent, typeof i5.AvatarComponent, typeof i6.DropdownContainerComponent, typeof i7.AskDropdownDirective, typeof i8.AutocompleteComponent, typeof i9.ChipsComponent, typeof i10.CheckboxComponent, typeof i11.DatePickerComponent, typeof i12.DatePickerCalendarComponent, typeof i13.SkeletonComponent, typeof i14.SpinnerComponent, typeof i15.SpinnerDirective], [typeof i16.CommonModule, typeof i17.FormsModule, typeof i17.ReactiveFormsModule, typeof i18.CdkOverlayOrigin, typeof i18.CdkConnectedOverlay, typeof i18.OverlayModule, typeof i19.TranslateModule, typeof i20.NgxSkeletonLoaderModule], [typeof i1.ButtonComponent, typeof i2.InputComponent, typeof i3.SelectComponent, typeof i4.BoxComponent, typeof i5.AvatarComponent, typeof i6.DropdownContainerComponent, typeof i7.AskDropdownDirective, typeof i8.AutocompleteComponent, typeof i9.ChipsComponent, typeof i10.CheckboxComponent, typeof i11.DatePickerComponent, typeof i12.DatePickerCalendarComponent, typeof i13.SkeletonComponent, typeof i15.SpinnerDirective]>;
25
+ static ɵmod: i0.ɵɵNgModuleDeclaration<AsksuiteCitrusModule, [typeof i1.ButtonComponent, typeof i2.InputComponent, typeof i3.SelectComponent, typeof i4.BoxComponent, typeof i5.AvatarComponent, typeof i6.DropdownContainerComponent, typeof i7.AskDropdownDirective, typeof i8.AutocompleteComponent, typeof i9.ChipsComponent, typeof i10.CheckboxComponent, typeof i11.DatePickerComponent, typeof i12.DatePickerCalendarComponent, typeof i13.SkeletonComponent, typeof i14.SpinnerComponent, typeof i15.SpinnerDirective, typeof i16.BadgeDirective], [typeof i17.CommonModule, typeof i18.FormsModule, typeof i18.ReactiveFormsModule, typeof i19.CdkOverlayOrigin, typeof i19.CdkConnectedOverlay, typeof i19.OverlayModule, typeof i20.TranslateModule, typeof i21.NgxSkeletonLoaderModule], [typeof i1.ButtonComponent, typeof i2.InputComponent, typeof i3.SelectComponent, typeof i4.BoxComponent, typeof i5.AvatarComponent, typeof i6.DropdownContainerComponent, typeof i7.AskDropdownDirective, typeof i8.AutocompleteComponent, typeof i9.ChipsComponent, typeof i10.CheckboxComponent, typeof i11.DatePickerComponent, typeof i12.DatePickerCalendarComponent, typeof i13.SkeletonComponent, typeof i15.SpinnerDirective, typeof i16.BadgeDirective]>;
25
26
  static ɵinj: i0.ɵɵInjectorDeclaration<AsksuiteCitrusModule>;
26
27
  }
@@ -47,6 +47,7 @@ export declare class AutocompleteComponent implements AfterViewInit, ControlValu
47
47
  placeholder: string;
48
48
  emptyMessage: string;
49
49
  selectAll: boolean;
50
+ allOptionsSelectedText: string | null;
50
51
  constructor(formBuilder: FormBuilder, overlay: Overlay, viewContainerRef: ViewContainerRef, change: ChangeDetectorRef);
51
52
  ngAfterViewInit(): void;
52
53
  private handleInputChange;
@@ -75,5 +76,5 @@ export declare class AutocompleteComponent implements AfterViewInit, ControlValu
75
76
  registerOnTouched(fn: any): void;
76
77
  setDisabledState(isDisabled: boolean): void;
77
78
  static ɵfac: i0.ɵɵFactoryDeclaration<AutocompleteComponent, never>;
78
- static ɵcmp: i0.ɵɵComponentDeclaration<AutocompleteComponent, "ask-autocomplete", never, { "filterFn": { "alias": "filterFn"; "required": false; }; "displayFn": { "alias": "displayFn"; "required": false; }; "multiple": { "alias": "multiple"; "required": false; }; "valueProp": { "alias": "valueProp"; "required": false; }; "options": { "alias": "options"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "emptyMessage": { "alias": "emptyMessage"; "required": false; }; "selectAll": { "alias": "selectAll"; "required": false; }; }, {}, never, never, false, never>;
79
+ static ɵcmp: i0.ɵɵComponentDeclaration<AutocompleteComponent, "ask-autocomplete", never, { "filterFn": { "alias": "filterFn"; "required": false; }; "displayFn": { "alias": "displayFn"; "required": false; }; "multiple": { "alias": "multiple"; "required": false; }; "valueProp": { "alias": "valueProp"; "required": false; }; "options": { "alias": "options"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "emptyMessage": { "alias": "emptyMessage"; "required": false; }; "selectAll": { "alias": "selectAll"; "required": false; }; "allOptionsSelectedText": { "alias": "allOptionsSelectedText"; "required": false; }; }, {}, never, never, false, never>;
79
80
  }
@@ -9,11 +9,12 @@ export declare enum AvatarStatus {
9
9
  export declare class AvatarComponent {
10
10
  src: string;
11
11
  status: AvatarStatus | 'none' | 'online' | 'busy' | 'absent';
12
+ statusTitle: string;
12
13
  background: 'primary' | 'secondary' | 'dark';
13
14
  set name(value: string);
14
15
  static readonly BOT_ICON: string;
15
16
  protected _initials: string;
16
17
  get image(): string;
17
18
  static ɵfac: i0.ɵɵFactoryDeclaration<AvatarComponent, never>;
18
- static ɵcmp: i0.ɵɵComponentDeclaration<AvatarComponent, "ask-avatar", never, { "src": { "alias": "src"; "required": false; }; "status": { "alias": "status"; "required": false; }; "background": { "alias": "background"; "required": false; }; "name": { "alias": "name"; "required": false; }; }, {}, never, never, false, never>;
19
+ static ɵcmp: i0.ɵɵComponentDeclaration<AvatarComponent, "ask-avatar", never, { "src": { "alias": "src"; "required": false; }; "status": { "alias": "status"; "required": false; }; "statusTitle": { "alias": "statusTitle"; "required": false; }; "background": { "alias": "background"; "required": false; }; "name": { "alias": "name"; "required": false; }; }, {}, never, never, false, never>;
19
20
  }
@@ -0,0 +1,20 @@
1
+ import { ElementRef, OnChanges, OnDestroy, SimpleChanges } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export declare class BadgeDirective implements OnChanges, OnDestroy {
4
+ private elRef;
5
+ private document;
6
+ askBadge: number | null;
7
+ badgePosition: 'top-right' | 'top-left' | 'bottom-left' | 'bottom-right';
8
+ badgeCustomClasses?: string;
9
+ badgeVariant: 'secondary' | 'primary';
10
+ badgeSize: 'regular' | 'large' | 'small';
11
+ badgeElement: HTMLElement | null;
12
+ constructor(elRef: ElementRef, document: Document);
13
+ ngOnChanges(changes: SimpleChanges): void;
14
+ ngOnDestroy(): void;
15
+ private updateBadgeText;
16
+ private createBadge;
17
+ private addClasses;
18
+ static ɵfac: i0.ɵɵFactoryDeclaration<BadgeDirective, never>;
19
+ static ɵdir: i0.ɵɵDirectiveDeclaration<BadgeDirective, "[askBadge]", never, { "askBadge": { "alias": "askBadge"; "required": false; }; "badgePosition": { "alias": "badgePosition"; "required": false; }; "badgeCustomClasses": { "alias": "badgeCustomClasses"; "required": false; }; "badgeVariant": { "alias": "badgeVariant"; "required": false; }; "badgeSize": { "alias": "badgeSize"; "required": false; }; }, {}, never, never, false, never>;
20
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "asksuite-citrus",
3
- "version": "0.5.4",
3
+ "version": "0.6.1",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^16.1.0",
6
6
  "@angular/core": "^16.1.0",
package/public-api.d.ts CHANGED
@@ -13,3 +13,4 @@ export * from './lib/components/date-picker/date-picker-calendar/date-picker-cal
13
13
  export * from './lib/components/skeleton/skeleton.component';
14
14
  export * from './lib/directives/ask-dropdown.directive';
15
15
  export * from './lib/directives/spinner/spinner.directive';
16
+ export * from './lib/directives/badge/badge.directive';
@@ -0,0 +1,83 @@
1
+ .scale-in-center {
2
+ -webkit-animation: scale-in-center 0.3s ease-in-out both;
3
+ animation: scale-in-center 0.3s ease-in-out both;
4
+ }
5
+
6
+ /* ----------------------------------------------
7
+ * Generated by Animista on 2023-9-6 16:3:54
8
+ * Licensed under FreeBSD License.
9
+ * See http://animista.net/license for more info.
10
+ * w: http://animista.net, t: @cssanimista
11
+ * ---------------------------------------------- */
12
+
13
+ /**
14
+ * ----------------------------------------
15
+ * animation scale-in-center
16
+ * ----------------------------------------
17
+ */
18
+ @-webkit-keyframes scale-in-center {
19
+ 0% {
20
+ -webkit-transform: scale(0);
21
+ transform: scale(0);
22
+ opacity: 1;
23
+ }
24
+ 100% {
25
+ -webkit-transform: scale(1);
26
+ transform: scale(1);
27
+ opacity: 1;
28
+ }
29
+ }
30
+ @keyframes scale-in-center {
31
+ 0% {
32
+ -webkit-transform: scale(0);
33
+ transform: scale(0);
34
+ opacity: 1;
35
+ }
36
+ 100% {
37
+ -webkit-transform: scale(1);
38
+ transform: scale(1);
39
+ opacity: 1;
40
+ }
41
+ }
42
+
43
+ .scale-out-center {
44
+ -webkit-animation: scale-out-center 0.3s ease-in-out both;
45
+ animation: scale-out-center 0.3s ease-in-out both;
46
+ }
47
+
48
+ /* ----------------------------------------------
49
+ * Generated by Animista on 2023-9-6 16:4:36
50
+ * Licensed under FreeBSD License.
51
+ * See http://animista.net/license for more info.
52
+ * w: http://animista.net, t: @cssanimista
53
+ * ---------------------------------------------- */
54
+
55
+ /**
56
+ * ----------------------------------------
57
+ * animation scale-out-center
58
+ * ----------------------------------------
59
+ */
60
+ @-webkit-keyframes scale-out-center {
61
+ 0% {
62
+ -webkit-transform: scale(1);
63
+ transform: scale(1);
64
+ opacity: 1;
65
+ }
66
+ 100% {
67
+ -webkit-transform: scale(0);
68
+ transform: scale(0);
69
+ opacity: 1;
70
+ }
71
+ }
72
+ @keyframes scale-out-center {
73
+ 0% {
74
+ -webkit-transform: scale(1);
75
+ transform: scale(1);
76
+ opacity: 1;
77
+ }
78
+ 100% {
79
+ -webkit-transform: scale(0);
80
+ transform: scale(0);
81
+ opacity: 1;
82
+ }
83
+ }
@@ -68,3 +68,67 @@
68
68
  input {
69
69
  font-size: $font-md;
70
70
  }
71
+
72
+ /**
73
+ Badge
74
+ */
75
+
76
+ .ask-badge {
77
+ position: relative;
78
+
79
+ > .badge {
80
+ position: absolute;
81
+ display: flex;
82
+ justify-content: center;
83
+ align-items: center;
84
+ background-color: var(--bg-color);
85
+ color: #fff;
86
+ font-size: 12px;
87
+ text-overflow: ellipsis;
88
+ white-space: nowrap;
89
+ overflow: hidden;
90
+ border-radius: 50%;
91
+ box-shadow: 0 2px 6px -1px rgb(0 0 0 / 50%);
92
+ }
93
+
94
+ > .badge.-primary {
95
+ --bg-color: var(--asksuite-orange);
96
+ }
97
+
98
+ > .badge.-secondary {
99
+ --bg-color: var(--grey-800);
100
+ }
101
+
102
+ > .badge.-top {
103
+ top: -10px;
104
+ }
105
+ > .badge.-bottom {
106
+ bottom: -10px;
107
+ }
108
+
109
+ > .badge.-left {
110
+ left: -10px;
111
+ }
112
+
113
+ > .badge.-right {
114
+ right: -10px;
115
+ }
116
+
117
+ > .badge.-small {
118
+ width: 18px;
119
+ height: 18px;
120
+ font-size: 10px;
121
+ }
122
+ > .badge.-regular {
123
+ width: 22px;
124
+ height: 22px;
125
+ font-size: 11px;
126
+ }
127
+
128
+ > .badge.-large {
129
+ width: 28px;
130
+ height: 28px;
131
+ font-size: 12px;
132
+ }
133
+ }
134
+
@@ -7,3 +7,4 @@
7
7
  @import './font-weights';
8
8
  @import './radii';
9
9
  @import './helpers';
10
+ @import './animations';