@luzmo/ngx-lucero 1.0.1-alpha.85 → 1.0.2

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.
@@ -1,7 +1,8 @@
1
1
  import { OnChanges, SimpleChanges } from '@angular/core';
2
2
  import '@luzmo/lucero/tags';
3
- import type { LuzmoTag as LuzmoTagHostElement } from '@luzmo/lucero/tags';
3
+ import type { LuzmoTag as LuzmoTagHostElement, TagTreatments, TagVariants } from '@luzmo/lucero/tags';
4
4
  import * as i0 from "@angular/core";
5
+ export type { TagNonSemanticVariants, TagSemanticVariants, TagTreatments, TagVariants } from '@luzmo/lucero/tags';
5
6
  export declare class LuzmoTag implements OnChanges {
6
7
  private readonly elementRef;
7
8
  private readonly renderer;
@@ -10,6 +11,10 @@ export declare class LuzmoTag implements OnChanges {
10
11
  private readonly listenerCleanup;
11
12
  /** The underlying custom element instance. Use to call imperative methods. */
12
13
  get nativeElement(): LuzmoTagHostElement;
14
+ /** Color variant. Optional — when unset the tag keeps its neutral default appearance. Accepts the same semantic and non-semantic palette as `luzmo-badge`. Invalid values reset the tag to its variantless default. */
15
+ variant?: TagVariants;
16
+ /** Visual treatment of the color variant: `outline` (default) draws the variant color as border and text, `fill` paints it as the background. Only takes effect when `variant` is set. */
17
+ treatment?: TagTreatments;
13
18
  deletable?: boolean;
14
19
  disabled?: boolean;
15
20
  readonly?: boolean;
@@ -26,7 +31,7 @@ export declare class LuzmoTag implements OnChanges {
26
31
  private setHostProperty;
27
32
  private bindEvents;
28
33
  static ɵfac: i0.ɵɵFactoryDeclaration<LuzmoTag, never>;
29
- static ɵcmp: i0.ɵɵComponentDeclaration<LuzmoTag, "luzmo-tag", ["luzmoTag"], { "deletable": { "alias": "deletable"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "size": { "alias": "size"; "required": false; }; }, { "deleteEvent": "delete"; }, never, ["*"], true, never>;
34
+ static ɵcmp: i0.ɵɵComponentDeclaration<LuzmoTag, "luzmo-tag", ["luzmoTag"], { "variant": { "alias": "variant"; "required": false; }; "treatment": { "alias": "treatment"; "required": false; }; "deletable": { "alias": "deletable"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "size": { "alias": "size"; "required": false; }; }, { "deleteEvent": "delete"; }, never, ["*"], true, never>;
30
35
  }
31
36
  /** The underlying custom element type for LuzmoTag */
32
37
  export type LuzmoTagElement = LuzmoTagHostElement;
@@ -19,6 +19,10 @@ export class LuzmoTag {
19
19
  get nativeElement() {
20
20
  return this.host;
21
21
  }
22
+ /** Color variant. Optional — when unset the tag keeps its neutral default appearance. Accepts the same semantic and non-semantic palette as `luzmo-badge`. Invalid values reset the tag to its variantless default. */
23
+ variant;
24
+ /** Visual treatment of the color variant: `outline` (default) draws the variant color as border and text, `fill` paints it as the background. Only takes effect when `variant` is set. */
25
+ treatment;
22
26
  deletable;
23
27
  disabled;
24
28
  readonly;
@@ -35,6 +39,12 @@ export class LuzmoTag {
35
39
  ngOnChanges(changes) {
36
40
  for (const key of Object.keys(changes)) {
37
41
  switch (key) {
42
+ case 'variant':
43
+ this.setHostProperty('variant', changes['variant'].currentValue);
44
+ break;
45
+ case 'treatment':
46
+ this.setHostProperty('treatment', changes['treatment'].currentValue);
47
+ break;
38
48
  case 'deletable':
39
49
  this.setHostProperty('deletable', changes['deletable'].currentValue);
40
50
  break;
@@ -67,7 +77,7 @@ export class LuzmoTag {
67
77
  }));
68
78
  }
69
79
  static ɵfac = function LuzmoTag_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || LuzmoTag)(); };
70
- static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: LuzmoTag, selectors: [["luzmo-tag"]], inputs: { deletable: "deletable", disabled: "disabled", readonly: "readonly", size: "size" }, outputs: { deleteEvent: "delete" }, exportAs: ["luzmoTag"], features: [i0.ɵɵNgOnChangesFeature], ngContentSelectors: _c0, decls: 1, vars: 0, template: function LuzmoTag_Template(rf, ctx) { if (rf & 1) {
80
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: LuzmoTag, selectors: [["luzmo-tag"]], inputs: { variant: "variant", treatment: "treatment", deletable: "deletable", disabled: "disabled", readonly: "readonly", size: "size" }, outputs: { deleteEvent: "delete" }, exportAs: ["luzmoTag"], features: [i0.ɵɵNgOnChangesFeature], ngContentSelectors: _c0, decls: 1, vars: 0, template: function LuzmoTag_Template(rf, ctx) { if (rf & 1) {
71
81
  i0.ɵɵprojectionDef();
72
82
  i0.ɵɵprojection(0);
73
83
  } }, encapsulation: 2, changeDetection: 0 });
@@ -81,7 +91,13 @@ export class LuzmoTag {
81
91
  changeDetection: ChangeDetectionStrategy.OnPush,
82
92
  template: '<ng-content />'
83
93
  }]
84
- }], () => [], { deletable: [{
94
+ }], () => [], { variant: [{
95
+ type: Input,
96
+ args: [{ alias: 'variant' }]
97
+ }], treatment: [{
98
+ type: Input,
99
+ args: [{ alias: 'treatment' }]
100
+ }], deletable: [{
85
101
  type: Input,
86
102
  args: [{ alias: 'deletable' }]
87
103
  }], disabled: [{
@@ -94,4 +110,4 @@ export class LuzmoTag {
94
110
  type: Input,
95
111
  args: [{ alias: 'size' }]
96
112
  }], deleteEvent: [{ type: i0.Output, args: ["delete"] }] }); })();
97
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(LuzmoTag, { className: "LuzmoTag", filePath: "components/tag.ts", lineNumber: 19 }); })();
113
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(LuzmoTag, { className: "LuzmoTag", filePath: "components/tag.ts", lineNumber: 20 }); })();
@@ -2,6 +2,7 @@ import { OnChanges, SimpleChanges } from '@angular/core';
2
2
  import '@luzmo/lucero/tags';
3
3
  import type { LuzmoTags as LuzmoTagsHostElement } from '@luzmo/lucero/tags';
4
4
  import * as i0 from "@angular/core";
5
+ export type { TagNonSemanticVariants, TagSemanticVariants, TagTreatments, TagVariants } from '@luzmo/lucero/tags';
5
6
  export declare class LuzmoTags implements OnChanges {
6
7
  private readonly elementRef;
7
8
  private readonly renderer;
@@ -85,4 +85,4 @@ export class LuzmoTags {
85
85
  type: Input,
86
86
  args: [{ alias: 'size' }]
87
87
  }] }); })();
88
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(LuzmoTags, { className: "LuzmoTags", filePath: "components/tags.ts", lineNumber: 17 }); })();
88
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(LuzmoTags, { className: "LuzmoTags", filePath: "components/tags.ts", lineNumber: 18 }); })();
package/package.json CHANGED
@@ -29,9 +29,9 @@
29
29
  "peerDependencies": {
30
30
  "@angular/core": "^17.3.0 || ^18.0.0 || ^19.0.0 || ^20.0.0 || ^21.0.0",
31
31
  "@angular/forms": "^17.3.0 || ^18.0.0 || ^19.0.0 || ^20.0.0 || ^21.0.0",
32
- "@luzmo/lucero": "1.0.1-alpha.85"
32
+ "@luzmo/lucero": "1.0.2"
33
33
  },
34
- "version": "1.0.1-alpha.85",
34
+ "version": "1.0.2",
35
35
  "peerDependenciesMeta": {
36
36
  "@angular/forms": {
37
37
  "optional": true