@haloduck/ui 2.0.16 → 2.0.18

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.
@@ -3018,6 +3018,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.4", ngImpor
3018
3018
  class TagViewerComponent {
3019
3019
  label;
3020
3020
  tags = [];
3021
+ shouldWrap = true;
3021
3022
  // Accept input as `value` for consistency with tag-input
3022
3023
  set value(tags) {
3023
3024
  if (Array.isArray(tags)) {
@@ -3039,14 +3040,16 @@ class TagViewerComponent {
3039
3040
  }
3040
3041
  }
3041
3042
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: TagViewerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
3042
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.4", type: TagViewerComponent, isStandalone: true, selector: "haloduck-tag-viewer", inputs: { value: "value" }, providers: [provideTranslocoScope('haloduck')], viewQueries: [{ propertyName: "label", first: true, predicate: ["label"], descendants: true }], ngImport: i0, template: "<div class=\"flex flex-col gap-2\">\n <label #label class=\"block text-sm/6 font-medium text-light-on-control dark:text-dark-on-control text-left\">\n <ng-content></ng-content>\n </label>\n\n <div class=\"block w-full rounded-md px-2 py-1.5 text-base text-light-on-control dark:text-dark-on-control sm:text-sm/6\">\n <div class=\"flex flex-wrap items-center gap-2\">\n <ng-container *ngFor=\"let tag of tags\">\n <span class=\"inline-flex items-center gap-1 rounded-md bg-light-secondary dark:bg-dark-secondary text-light-on-secondary dark:text-dark-on-secondary px-2 py-0.5 text-xs\">\n {{ tag }}\n </span>\n </ng-container>\n </div>\n </div>\n</div>\n", styles: [":host{display:block}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
3043
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.4", type: TagViewerComponent, isStandalone: true, selector: "haloduck-tag-viewer", inputs: { shouldWrap: "shouldWrap", value: "value" }, providers: [provideTranslocoScope('haloduck')], viewQueries: [{ propertyName: "label", first: true, predicate: ["label"], descendants: true }], ngImport: i0, template: "<div class=\"flex flex-col gap-2\">\n <label #label\n class=\"block text-sm/6 font-medium text-light-on-control dark:text-dark-on-control text-left\">\n <ng-content></ng-content>\n </label>\n\n <div\n class=\"block w-full rounded-md px-2 py-1.5 text-base text-light-on-control dark:text-dark-on-control sm:text-sm/6\">\n <div class=\"flex items-center gap-2\"\n [ngClass]=\"shouldWrap ? 'flex-wrap' : 'flex-nowrap'\">\n @for (tag of tags; track tag) {\n <span\n class=\"inline-flex items-center gap-1 rounded-md bg-light-secondary dark:bg-dark-secondary text-light-on-secondary dark:text-dark-on-secondary px-2 py-0.5 text-xs\">\n {{ tag }}\n </span>\n }\n </div>\n </div>\n</div>\n", styles: [":host{display:block}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
3043
3044
  }
3044
3045
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: TagViewerComponent, decorators: [{
3045
3046
  type: Component,
3046
- args: [{ selector: 'haloduck-tag-viewer', imports: [CommonModule], providers: [provideTranslocoScope('haloduck')], template: "<div class=\"flex flex-col gap-2\">\n <label #label class=\"block text-sm/6 font-medium text-light-on-control dark:text-dark-on-control text-left\">\n <ng-content></ng-content>\n </label>\n\n <div class=\"block w-full rounded-md px-2 py-1.5 text-base text-light-on-control dark:text-dark-on-control sm:text-sm/6\">\n <div class=\"flex flex-wrap items-center gap-2\">\n <ng-container *ngFor=\"let tag of tags\">\n <span class=\"inline-flex items-center gap-1 rounded-md bg-light-secondary dark:bg-dark-secondary text-light-on-secondary dark:text-dark-on-secondary px-2 py-0.5 text-xs\">\n {{ tag }}\n </span>\n </ng-container>\n </div>\n </div>\n</div>\n", styles: [":host{display:block}\n"] }]
3047
+ args: [{ selector: 'haloduck-tag-viewer', imports: [CommonModule], providers: [provideTranslocoScope('haloduck')], template: "<div class=\"flex flex-col gap-2\">\n <label #label\n class=\"block text-sm/6 font-medium text-light-on-control dark:text-dark-on-control text-left\">\n <ng-content></ng-content>\n </label>\n\n <div\n class=\"block w-full rounded-md px-2 py-1.5 text-base text-light-on-control dark:text-dark-on-control sm:text-sm/6\">\n <div class=\"flex items-center gap-2\"\n [ngClass]=\"shouldWrap ? 'flex-wrap' : 'flex-nowrap'\">\n @for (tag of tags; track tag) {\n <span\n class=\"inline-flex items-center gap-1 rounded-md bg-light-secondary dark:bg-dark-secondary text-light-on-secondary dark:text-dark-on-secondary px-2 py-0.5 text-xs\">\n {{ tag }}\n </span>\n }\n </div>\n </div>\n</div>\n", styles: [":host{display:block}\n"] }]
3047
3048
  }], propDecorators: { label: [{
3048
3049
  type: ViewChild,
3049
3050
  args: ['label']
3051
+ }], shouldWrap: [{
3052
+ type: Input
3050
3053
  }], value: [{
3051
3054
  type: Input
3052
3055
  }] } });
@@ -3069,6 +3072,7 @@ class GroupedDirective {
3069
3072
  }
3070
3073
  ngOnInit() {
3071
3074
  this.applyConfig();
3075
+ this.createLayout();
3072
3076
  this.createBorder();
3073
3077
  this.createLabel();
3074
3078
  }
@@ -3086,6 +3090,10 @@ class GroupedDirective {
3086
3090
  this.labelOffset = config.labelOffset ?? this.labelOffset;
3087
3091
  }
3088
3092
  }
3093
+ createLayout() {
3094
+ const element = this.elementRef.nativeElement;
3095
+ this.addClasses(element, this.layoutClasses);
3096
+ }
3089
3097
  createBorder() {
3090
3098
  const element = this.elementRef.nativeElement;
3091
3099
  // 기존 테두리 클래스 제거