@recursyve/nice-ui-kit.v2 13.2.0-beta.97 → 13.2.0-beta.99

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.
Files changed (38) hide show
  1. package/esm2020/lib/components/alert/alert.component.mjs +22 -10
  2. package/esm2020/lib/components/alert/alert.types.mjs +1 -1
  3. package/esm2020/lib/components/async-typeahead/async-typeahead.component.mjs +9 -5
  4. package/esm2020/lib/components/base-form/base-form.component.mjs +14 -3
  5. package/esm2020/lib/components/toast/toast.component.mjs +1 -1
  6. package/esm2020/lib/directives/chip-async-typeahead/chip-async-typeahead.directive.mjs +39 -0
  7. package/esm2020/lib/directives/chip-async-typeahead/index.mjs +2 -0
  8. package/esm2020/lib/directives/chip-async-typeahead/public-api.mjs +2 -0
  9. package/esm2020/lib/directives/chip-list/chip-list-items/chip-list-item-label.directive.mjs +14 -0
  10. package/esm2020/lib/directives/chip-list/chip-list-items/chip-list-items.component.mjs +32 -0
  11. package/esm2020/lib/directives/chip-list/chip-list.directive.mjs +100 -0
  12. package/esm2020/lib/directives/chip-list/chip-list.module.mjs +21 -0
  13. package/esm2020/lib/directives/chip-list/index.mjs +2 -0
  14. package/esm2020/lib/directives/chip-list/public-api.mjs +5 -0
  15. package/esm2020/lib/directives/public-api.mjs +3 -2
  16. package/fesm2015/recursyve-nice-ui-kit.v2.mjs +210 -16
  17. package/fesm2015/recursyve-nice-ui-kit.v2.mjs.map +1 -1
  18. package/fesm2020/recursyve-nice-ui-kit.v2.mjs +217 -16
  19. package/fesm2020/recursyve-nice-ui-kit.v2.mjs.map +1 -1
  20. package/lib/components/alert/alert.component.d.ts +3 -2
  21. package/lib/components/alert/alert.types.d.ts +1 -0
  22. package/lib/components/async-typeahead/async-typeahead.component.d.ts +3 -2
  23. package/lib/components/base-form/base-form.component.d.ts +1 -0
  24. package/lib/directives/chip-async-typeahead/chip-async-typeahead.directive.d.ts +14 -0
  25. package/lib/directives/chip-async-typeahead/index.d.ts +1 -0
  26. package/lib/directives/chip-async-typeahead/public-api.d.ts +1 -0
  27. package/lib/directives/chip-list/chip-list-items/chip-list-item-label.directive.d.ts +8 -0
  28. package/lib/directives/chip-list/chip-list-items/chip-list-items.component.d.ts +14 -0
  29. package/lib/directives/chip-list/chip-list.directive.d.ts +27 -0
  30. package/lib/directives/chip-list/chip-list.module.d.ts +11 -0
  31. package/lib/directives/chip-list/index.d.ts +1 -0
  32. package/lib/directives/chip-list/public-api.d.ts +4 -0
  33. package/lib/directives/public-api.d.ts +2 -1
  34. package/package.json +1 -1
  35. package/src/lib/components/chip-list/chip-list.theme.scss +14 -0
  36. package/src/lib/components/chip-list/components/item-list/item-list.theme.scss +37 -0
  37. package/src/lib/directives/chip-list/chip-list-items/chip-list-items.theme.scss +35 -0
  38. package/src/lib/nice.theme.scss +5 -0
@@ -2,7 +2,7 @@ import { BooleanInput } from "@angular/cdk/coercion";
2
2
  import { ChangeDetectorRef, EventEmitter, OnChanges, OnDestroy, OnInit, SimpleChanges } from "@angular/core";
3
3
  import { NiceUtilsService } from "../../providers/utils";
4
4
  import { NiceAlertService } from "./alert.service";
5
- import { NiceAlertType, NiceAlertAppearance } from "./alert.types";
5
+ import { NiceAlertType, NiceAlertAppearance, NiceAlertColor } from "./alert.types";
6
6
  import * as i0 from "@angular/core";
7
7
  export declare class NiceAlertComponent implements OnChanges, OnInit, OnDestroy {
8
8
  private _changeDetectorRef;
@@ -19,6 +19,7 @@ export declare class NiceAlertComponent implements OnChanges, OnInit, OnDestroy
19
19
  name: string;
20
20
  showIcon: boolean;
21
21
  type: NiceAlertType;
22
+ color?: NiceAlertColor;
22
23
  readonly dismissedChanged: EventEmitter<boolean>;
23
24
  private _unsubscribeAll;
24
25
  /**
@@ -59,5 +60,5 @@ export declare class NiceAlertComponent implements OnChanges, OnInit, OnDestroy
59
60
  */
60
61
  private _toggleDismiss;
61
62
  static ɵfac: i0.ɵɵFactoryDeclaration<NiceAlertComponent, never>;
62
- static ɵcmp: i0.ɵɵComponentDeclaration<NiceAlertComponent, "nice-alert", ["niceAlert"], { "appearance": "appearance"; "dismissed": "dismissed"; "dismissible": "dismissible"; "disableAnimation": "disableAnimation"; "name": "name"; "showIcon": "showIcon"; "type": "type"; }, { "dismissedChanged": "dismissedChanged"; }, never, ["[niceAlertIcon]", "[niceAlertTitle]", "*"]>;
63
+ static ɵcmp: i0.ɵɵComponentDeclaration<NiceAlertComponent, "nice-alert", ["niceAlert"], { "appearance": "appearance"; "dismissed": "dismissed"; "dismissible": "dismissible"; "disableAnimation": "disableAnimation"; "name": "name"; "showIcon": "showIcon"; "type": "type"; "color": "color"; }, { "dismissedChanged": "dismissedChanged"; }, never, ["[niceAlertIcon]", "[niceAlertTitle]", "*"]>;
63
64
  }
@@ -1,2 +1,3 @@
1
1
  export declare type NiceAlertAppearance = "border" | "fill" | "outline" | "soft";
2
2
  export declare type NiceAlertType = "primary" | "accent" | "warn" | "basic" | "info" | "success" | "warning" | "error";
3
+ export declare type NiceAlertColor = "primary" | "accent" | "warn";
@@ -1,5 +1,5 @@
1
1
  import { BooleanInput } from "@angular/cdk/coercion";
2
- import { ChangeDetectorRef, DoCheck, ElementRef, NgZone, OnChanges, OnDestroy, OnInit, SimpleChanges, TemplateRef } from "@angular/core";
2
+ import { ChangeDetectorRef, DoCheck, ElementRef, EventEmitter, NgZone, OnChanges, OnDestroy, OnInit, SimpleChanges, TemplateRef } from "@angular/core";
3
3
  import { ControlValueAccessor, FormControl, FormGroupDirective, NgControl, NgForm } from "@angular/forms";
4
4
  import { MatAutocompleteActivatedEvent, MatAutocompleteSelectedEvent } from "@angular/material/autocomplete";
5
5
  import { ErrorStateMatcher, MatOption } from "@angular/material/core";
@@ -53,6 +53,7 @@ export declare class NiceAsyncTypeaheadComponent extends _BaseAsyncTypeaheadComp
53
53
  emptyPlaceholder: string;
54
54
  optionTemplate: TemplateRef<HTMLElement>;
55
55
  filterFn: (value: any) => boolean | Promise<boolean> | Observable<boolean>;
56
+ selected: EventEmitter<any>;
56
57
  set labelFormatFn(labelFormatFn: (item: any) => string);
57
58
  private _labelFormatFn;
58
59
  /**
@@ -106,6 +107,6 @@ export declare class NiceAsyncTypeaheadComponent extends _BaseAsyncTypeaheadComp
106
107
  private updateSearchInput;
107
108
  private checkIfValueStillExist;
108
109
  static ɵfac: i0.ɵɵFactoryDeclaration<NiceAsyncTypeaheadComponent, [{ optional: true; self: true; }, { optional: true; }, { optional: true; }, null, null, null, null]>;
109
- static ɵcmp: i0.ɵɵComponentDeclaration<NiceAsyncTypeaheadComponent, "nice-async-typeahead", never, { "resource": "resource"; "searchOptions": "searchOptions"; "preloadResource": "preloadResource"; "allowNotFoundItems": "allowNotFoundItems"; "panelClass": "panelClass"; "bindValue": "bindValue"; "bindLabel": "bindLabel"; "placeholder": "placeholder"; "emptyPlaceholder": "emptyPlaceholder"; "optionTemplate": "optionTemplate"; "filterFn": "filterFn"; "labelFormatFn": "labelFormatFn"; "disabled": "disabled"; "value": "value"; "required": "required"; }, {}, never, never>;
110
+ static ɵcmp: i0.ɵɵComponentDeclaration<NiceAsyncTypeaheadComponent, "nice-async-typeahead", never, { "resource": "resource"; "searchOptions": "searchOptions"; "preloadResource": "preloadResource"; "allowNotFoundItems": "allowNotFoundItems"; "panelClass": "panelClass"; "bindValue": "bindValue"; "bindLabel": "bindLabel"; "placeholder": "placeholder"; "emptyPlaceholder": "emptyPlaceholder"; "optionTemplate": "optionTemplate"; "filterFn": "filterFn"; "labelFormatFn": "labelFormatFn"; "disabled": "disabled"; "value": "value"; "required": "required"; }, { "selected": "selected"; }, never, never>;
110
111
  }
111
112
  export {};
@@ -11,6 +11,7 @@ export declare abstract class NiceBaseFormComponent<Form> implements OnInit, OnD
11
11
  protected unsubscribeAll$: Subject<void>;
12
12
  private propagate;
13
13
  constructor(formGroup: GeneratedFormGroup<Form>);
14
+ onChange(event: KeyboardEvent): void;
14
15
  ngOnInit(): void;
15
16
  ngOnDestroy(): void;
16
17
  registerOnChange(fn: (form: Form) => void): void;
@@ -0,0 +1,14 @@
1
+ import { ElementRef, EventEmitter, OnDestroy, OnInit } from "@angular/core";
2
+ import { NiceAsyncTypeaheadComponent } from "../../components";
3
+ import * as i0 from "@angular/core";
4
+ export declare class NiceChipAsyncTypeaheadDirective implements OnInit, OnDestroy {
5
+ private typeahead;
6
+ private elementRef;
7
+ niceChipAsyncTypeaheadTokenEnd: EventEmitter<any>;
8
+ private unsubscribeAll$;
9
+ constructor(typeahead: NiceAsyncTypeaheadComponent, elementRef: ElementRef<HTMLElement>);
10
+ ngOnInit(): void;
11
+ ngOnDestroy(): void;
12
+ static ɵfac: i0.ɵɵFactoryDeclaration<NiceChipAsyncTypeaheadDirective, never>;
13
+ static ɵdir: i0.ɵɵDirectiveDeclaration<NiceChipAsyncTypeaheadDirective, "[niceChipAsyncTypeahead]", ["niceChipAsyncTypeahead"], {}, { "niceChipAsyncTypeaheadTokenEnd": "niceChipAsyncTypeaheadTokenEnd"; }, never>;
14
+ }
@@ -0,0 +1 @@
1
+ export * from "./public-api";
@@ -0,0 +1 @@
1
+ export * from "./chip-async-typeahead.directive";
@@ -0,0 +1,8 @@
1
+ import { TemplateRef } from "@angular/core";
2
+ import * as i0 from "@angular/core";
3
+ export declare class ChipListItemLabelDirective {
4
+ template: TemplateRef<any>;
5
+ constructor(template: TemplateRef<any>);
6
+ static ɵfac: i0.ɵɵFactoryDeclaration<ChipListItemLabelDirective, never>;
7
+ static ɵdir: i0.ɵɵDirectiveDeclaration<ChipListItemLabelDirective, "[niceChipListItemLabel]", never, {}, {}, never>;
8
+ }
@@ -0,0 +1,14 @@
1
+ import { EventEmitter, TemplateRef } from "@angular/core";
2
+ import { CanColor, ThemePalette } from "@angular/material/core";
3
+ import { Observable } from "rxjs";
4
+ import * as i0 from "@angular/core";
5
+ export declare class NiceChipListItemsComponent implements CanColor {
6
+ itemLabel: TemplateRef<any>;
7
+ color: ThemePalette;
8
+ removeChip: EventEmitter<number>;
9
+ items$: Observable<any[]>;
10
+ defaultColor: ThemePalette;
11
+ remove(index: number): void;
12
+ static ɵfac: i0.ɵɵFactoryDeclaration<NiceChipListItemsComponent, never>;
13
+ static ɵcmp: i0.ɵɵComponentDeclaration<NiceChipListItemsComponent, "nice-chip-list-items", never, { "color": "color"; "items$": "items$"; }, { "removeChip": "removeChip"; }, ["itemLabel"], never>;
14
+ }
@@ -0,0 +1,27 @@
1
+ import { ElementRef, OnChanges, OnInit, SimpleChanges } from "@angular/core";
2
+ import { ControlValueAccessor, NgControl } from "@angular/forms";
3
+ import { NiceAsyncTypeaheadComponent } from "../../components";
4
+ import { NiceChipListItemsComponent } from "./chip-list-items/chip-list-items.component";
5
+ import * as i0 from "@angular/core";
6
+ export declare class NiceChipListDirective implements ControlValueAccessor, OnInit, OnChanges {
7
+ private asyncTypeahead;
8
+ private ngControl;
9
+ private elementRef;
10
+ withItemList: NiceChipListItemsComponent;
11
+ private unsubscribeAll$;
12
+ private values$;
13
+ private _values;
14
+ private propagateChanges;
15
+ get values(): any[];
16
+ constructor(asyncTypeahead: NiceAsyncTypeaheadComponent, ngControl: NgControl, elementRef: ElementRef<HTMLInputElement>);
17
+ onKeyDown(event: KeyboardEvent): void;
18
+ ngOnInit(): void;
19
+ ngOnChanges(changes: SimpleChanges): void;
20
+ writeValue(obj: any[]): void;
21
+ registerOnChange(fn: any): void;
22
+ registerOnTouched(fn: any): void;
23
+ private setupAsyncTypeahead;
24
+ private addValue;
25
+ static ɵfac: i0.ɵɵFactoryDeclaration<NiceChipListDirective, [{ optional: true; }, { optional: true; }, null]>;
26
+ static ɵdir: i0.ɵɵDirectiveDeclaration<NiceChipListDirective, "input[niceChipList], nice-async-typeahead[niceChipList]", never, { "withItemList": "withItemList"; }, {}, never>;
27
+ }
@@ -0,0 +1,11 @@
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "./chip-list.directive";
3
+ import * as i2 from "./chip-list-items/chip-list-items.component";
4
+ import * as i3 from "./chip-list-items/chip-list-item-label.directive";
5
+ import * as i4 from "@angular/common";
6
+ import * as i5 from "@angular/material/icon";
7
+ export declare class NiceChipListDirectiveModule {
8
+ static ɵfac: i0.ɵɵFactoryDeclaration<NiceChipListDirectiveModule, never>;
9
+ static ɵmod: i0.ɵɵNgModuleDeclaration<NiceChipListDirectiveModule, [typeof i1.NiceChipListDirective, typeof i2.NiceChipListItemsComponent, typeof i3.ChipListItemLabelDirective], [typeof i4.CommonModule, typeof i5.MatIconModule], [typeof i1.NiceChipListDirective, typeof i2.NiceChipListItemsComponent, typeof i3.ChipListItemLabelDirective]>;
10
+ static ɵinj: i0.ɵɵInjectorDeclaration<NiceChipListDirectiveModule>;
11
+ }
@@ -0,0 +1 @@
1
+ export * from "./public-api";
@@ -0,0 +1,4 @@
1
+ export * from "./chip-list-items/chip-list-item-label.directive";
2
+ export * from "./chip-list-items/chip-list-items.component";
3
+ export * from "./chip-list.directive";
4
+ export * from "./chip-list.module";
@@ -1,6 +1,7 @@
1
1
  export * from "./autofocus";
2
2
  export * from "./autogrow";
3
- export * from "./dropzone";
3
+ export * from "./chip-async-typeahead";
4
+ export * from "./chip-list";
4
5
  export * from "./image-error-placeholder";
5
6
  export * from "./material";
6
7
  export * from "./modals";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@recursyve/nice-ui-kit.v2",
3
- "version": "13.2.0-beta.97",
3
+ "version": "13.2.0-beta.99",
4
4
  "exports": {
5
5
  ".": {
6
6
  "sass": "./_index.scss",
@@ -0,0 +1,14 @@
1
+ @use "../../nice.utils" as nice;
2
+ @import "components/item-list/item-list.theme";
3
+
4
+ @mixin nice-chip-list-theme($theme) {
5
+ @include nice-item-list-theme($theme);
6
+
7
+ nice-chip-list {
8
+ @apply w-full;
9
+
10
+ .nice-chip-row {
11
+ @apply gap-2;
12
+ }
13
+ }
14
+ }
@@ -0,0 +1,37 @@
1
+ @use "../../../../nice.utils" as nice;
2
+
3
+ @mixin nice-item-list-theme($theme) {
4
+ mat-form-field {
5
+ nice-item-list {
6
+ .nice-items-row {
7
+ @apply mt-4;
8
+ }
9
+ }
10
+ }
11
+
12
+ nice-item-list {
13
+ .nice-items-row {
14
+ @apply flex flex-row flex-wrap items-center gap-2;
15
+
16
+ .nice-chip {
17
+ @apply flex flex-row items-center justify-start rounded-3xl gap-3 px-3 py-0.5 min-w-24;
18
+
19
+ .close-icon {
20
+ @apply mt-1 opacity-70;
21
+ }
22
+
23
+ &.primary {
24
+ @apply bg-primary;
25
+ }
26
+
27
+ &.accent {
28
+ @apply bg-accent;
29
+ }
30
+
31
+ &.warn {
32
+ @apply bg-warn;
33
+ }
34
+ }
35
+ }
36
+ }
37
+ }
@@ -0,0 +1,35 @@
1
+ @mixin nice-chip-list-items-theme($theme) {
2
+ mat-form-field {
3
+ nice-chip-list-items {
4
+ .nice-items-row {
5
+ @apply mt-4;
6
+ }
7
+ }
8
+ }
9
+
10
+ nice-chip-list-items {
11
+ .nice-items-row {
12
+ @apply flex flex-row flex-wrap items-center gap-2;
13
+
14
+ .nice-chip {
15
+ @apply flex flex-row items-center justify-start rounded-3xl gap-3 px-3 py-0.5 min-w-24;
16
+
17
+ .close-icon {
18
+ @apply mt-1 opacity-70;
19
+ }
20
+
21
+ &.primary {
22
+ @apply bg-primary;
23
+ }
24
+
25
+ &.accent {
26
+ @apply bg-accent;
27
+ }
28
+
29
+ &.warn {
30
+ @apply bg-warn;
31
+ }
32
+ }
33
+ }
34
+ }
35
+ }
@@ -13,6 +13,9 @@
13
13
  @import "./components/navigation/horizontal/horizontal.theme";
14
14
  @import "./components/navigation/vertical/vertical.theme";
15
15
  @import "./components/toggle-button-group/toggle-button-group.theme";
16
+ @import "./components/chip-list/chip-list.theme";
17
+ @import "./directives/chip-list/chip-list-items/chip-list-items.theme";
18
+
16
19
  @mixin nice-components-theme($theme) {
17
20
  @include nice-alert-theme($theme);
18
21
  @include nice-assets-carousel-theme($theme);
@@ -21,6 +24,8 @@
21
24
  @include nice-drawer-theme($theme);
22
25
  @include nice-horizontal-stepper-theme($theme);
23
26
  @include nice-toggle-button-group-theme($theme);
27
+ @include nice-chip-list-theme($theme);
28
+ @include nice-chip-list-items-theme($theme);
24
29
  }
25
30
 
26
31
  @mixin nice-custom-theme($theme) {