@luzmo/ngx-lucero 1.0.1-alpha.78

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 (136) hide show
  1. package/README.md +41 -0
  2. package/esm/components/accordion-item.d.ts +32 -0
  3. package/esm/components/accordion-item.js +89 -0
  4. package/esm/components/accordion.d.ts +38 -0
  5. package/esm/components/accordion.js +107 -0
  6. package/esm/components/action-bar.d.ts +32 -0
  7. package/esm/components/action-bar.js +83 -0
  8. package/esm/components/action-button.d.ts +59 -0
  9. package/esm/components/action-button.js +205 -0
  10. package/esm/components/action-group.d.ts +42 -0
  11. package/esm/components/action-group.js +155 -0
  12. package/esm/components/action-menu.d.ts +75 -0
  13. package/esm/components/action-menu.js +337 -0
  14. package/esm/components/avatar.d.ts +35 -0
  15. package/esm/components/avatar.js +94 -0
  16. package/esm/components/badge.d.ts +31 -0
  17. package/esm/components/badge.js +86 -0
  18. package/esm/components/button-group.d.ts +28 -0
  19. package/esm/components/button-group.js +71 -0
  20. package/esm/components/button.d.ts +40 -0
  21. package/esm/components/button.js +140 -0
  22. package/esm/components/calendar.d.ts +64 -0
  23. package/esm/components/calendar.js +218 -0
  24. package/esm/components/chat-message-group.d.ts +29 -0
  25. package/esm/components/chat-message-group.js +76 -0
  26. package/esm/components/chat-message.d.ts +50 -0
  27. package/esm/components/chat-message.js +156 -0
  28. package/esm/components/checkbox.d.ts +55 -0
  29. package/esm/components/checkbox.js +196 -0
  30. package/esm/components/clear-button.d.ts +32 -0
  31. package/esm/components/clear-button.js +88 -0
  32. package/esm/components/close-button.d.ts +33 -0
  33. package/esm/components/close-button.js +95 -0
  34. package/esm/components/color-area.d.ts +45 -0
  35. package/esm/components/color-area.js +167 -0
  36. package/esm/components/color-field.d.ts +91 -0
  37. package/esm/components/color-field.js +321 -0
  38. package/esm/components/color-handle.d.ts +31 -0
  39. package/esm/components/color-handle.js +90 -0
  40. package/esm/components/color-loupe.d.ts +29 -0
  41. package/esm/components/color-loupe.js +76 -0
  42. package/esm/components/color-menu.d.ts +36 -0
  43. package/esm/components/color-menu.js +97 -0
  44. package/esm/components/color-palette-group.d.ts +40 -0
  45. package/esm/components/color-palette-group.js +117 -0
  46. package/esm/components/color-palette.d.ts +43 -0
  47. package/esm/components/color-palette.js +126 -0
  48. package/esm/components/color-picker.d.ts +49 -0
  49. package/esm/components/color-picker.js +143 -0
  50. package/esm/components/color-slider.d.ts +53 -0
  51. package/esm/components/color-slider.js +215 -0
  52. package/esm/components/date-range-picker.d.ts +69 -0
  53. package/esm/components/date-range-picker.js +228 -0
  54. package/esm/components/date-time-picker.d.ts +71 -0
  55. package/esm/components/date-time-picker.js +249 -0
  56. package/esm/components/divider.d.ts +31 -0
  57. package/esm/components/divider.js +78 -0
  58. package/esm/components/field-group.d.ts +32 -0
  59. package/esm/components/field-group.js +101 -0
  60. package/esm/components/field-label.d.ts +37 -0
  61. package/esm/components/field-label.js +104 -0
  62. package/esm/components/help-text.d.ts +30 -0
  63. package/esm/components/help-text.js +77 -0
  64. package/esm/components/icon.d.ts +33 -0
  65. package/esm/components/icon.js +104 -0
  66. package/esm/components/infield-button.d.ts +35 -0
  67. package/esm/components/infield-button.js +103 -0
  68. package/esm/components/label.d.ts +29 -0
  69. package/esm/components/label.js +76 -0
  70. package/esm/components/menu.d.ts +53 -0
  71. package/esm/components/menu.js +218 -0
  72. package/esm/components/multi-language-field.d.ts +58 -0
  73. package/esm/components/multi-language-field.js +263 -0
  74. package/esm/components/number-field.d.ts +103 -0
  75. package/esm/components/number-field.js +372 -0
  76. package/esm/components/options.d.ts +58 -0
  77. package/esm/components/options.js +207 -0
  78. package/esm/components/overlay.d.ts +67 -0
  79. package/esm/components/overlay.js +212 -0
  80. package/esm/components/picker-button.d.ts +32 -0
  81. package/esm/components/picker-button.js +94 -0
  82. package/esm/components/picker.d.ts +79 -0
  83. package/esm/components/picker.js +340 -0
  84. package/esm/components/popover.d.ts +33 -0
  85. package/esm/components/popover.js +93 -0
  86. package/esm/components/progress-bar.d.ts +35 -0
  87. package/esm/components/progress-bar.js +121 -0
  88. package/esm/components/progress-circle.d.ts +35 -0
  89. package/esm/components/progress-circle.js +94 -0
  90. package/esm/components/progress-steps.d.ts +46 -0
  91. package/esm/components/progress-steps.js +127 -0
  92. package/esm/components/prompt-box.d.ts +88 -0
  93. package/esm/components/prompt-box.js +280 -0
  94. package/esm/components/radio-group.d.ts +39 -0
  95. package/esm/components/radio-group.js +136 -0
  96. package/esm/components/radio.d.ts +46 -0
  97. package/esm/components/radio.js +172 -0
  98. package/esm/components/search.d.ts +95 -0
  99. package/esm/components/search.js +351 -0
  100. package/esm/components/select.d.ts +82 -0
  101. package/esm/components/select.js +351 -0
  102. package/esm/components/slider.d.ts +47 -0
  103. package/esm/components/slider.js +185 -0
  104. package/esm/components/status-light.d.ts +30 -0
  105. package/esm/components/status-light.js +78 -0
  106. package/esm/components/swatch-group.d.ts +37 -0
  107. package/esm/components/swatch-group.js +126 -0
  108. package/esm/components/swatch.d.ts +49 -0
  109. package/esm/components/swatch.js +197 -0
  110. package/esm/components/switch.d.ts +48 -0
  111. package/esm/components/switch.js +160 -0
  112. package/esm/components/tab-panel.d.ts +29 -0
  113. package/esm/components/tab-panel.js +78 -0
  114. package/esm/components/tab.d.ts +32 -0
  115. package/esm/components/tab.js +100 -0
  116. package/esm/components/tabs-overflow.d.ts +33 -0
  117. package/esm/components/tabs-overflow.js +97 -0
  118. package/esm/components/tabs.d.ts +43 -0
  119. package/esm/components/tabs.js +150 -0
  120. package/esm/components/tag.d.ts +31 -0
  121. package/esm/components/tag.js +90 -0
  122. package/esm/components/tags.d.ts +30 -0
  123. package/esm/components/tags.js +81 -0
  124. package/esm/components/text-field.d.ts +87 -0
  125. package/esm/components/text-field.js +308 -0
  126. package/esm/components/toast.d.ts +30 -0
  127. package/esm/components/toast.js +68 -0
  128. package/esm/components/tooltip.d.ts +44 -0
  129. package/esm/components/tooltip.js +154 -0
  130. package/esm/components/top-nav-item.d.ts +35 -0
  131. package/esm/components/top-nav-item.js +120 -0
  132. package/esm/components/top-nav.d.ts +35 -0
  133. package/esm/components/top-nav.js +110 -0
  134. package/esm/index.d.ts +135 -0
  135. package/esm/index.js +269 -0
  136. package/package.json +40 -0
@@ -0,0 +1,97 @@
1
+ import { ChangeDetectionStrategy, Component, DestroyRef, ElementRef, inject, Input, output, Renderer2 } from '@angular/core';
2
+ import '@luzmo/lucero/color-menu';
3
+ import * as i0 from "@angular/core";
4
+ const _c0 = ["*"];
5
+ /**
6
+ * Angular wrapper component for <luzmo-color-menu>
7
+ */
8
+ export class LuzmoColorMenu {
9
+ elementRef = inject(ElementRef);
10
+ renderer = inject(Renderer2);
11
+ destroyRef = inject(DestroyRef);
12
+ host = this.elementRef.nativeElement;
13
+ listenerCleanup = [];
14
+ /** The underlying custom element instance. Use to call imperative methods. */
15
+ get nativeElement() {
16
+ return this.host;
17
+ }
18
+ /** The color value of the Color Menu */
19
+ color;
20
+ /** Whether the alpha channel is available */
21
+ noAlphaChannel;
22
+ /** The swatches available in the color menu */
23
+ swatches;
24
+ areaElement;
25
+ /** An alteration to the value of the Color Menu has been committed by the user. */
26
+ changeEvent = output({ alias: 'change' });
27
+ constructor() {
28
+ this.bindEvents();
29
+ this.destroyRef.onDestroy(() => {
30
+ for (const cleanup of this.listenerCleanup) {
31
+ cleanup();
32
+ }
33
+ });
34
+ }
35
+ ngOnChanges(changes) {
36
+ for (const key of Object.keys(changes)) {
37
+ switch (key) {
38
+ case 'color':
39
+ this.setHostProperty('color', changes['color'].currentValue);
40
+ break;
41
+ case 'noAlphaChannel':
42
+ this.setHostProperty('noAlphaChannel', changes['noAlphaChannel'].currentValue);
43
+ break;
44
+ case 'swatches':
45
+ this.setHostProperty('swatches', changes['swatches'].currentValue);
46
+ break;
47
+ case 'areaElement':
48
+ this.setHostProperty('areaElement', changes['areaElement'].currentValue);
49
+ break;
50
+ default:
51
+ break;
52
+ }
53
+ }
54
+ }
55
+ /**
56
+ * Forward a wrapper @Input to the underlying host element via Renderer2 so
57
+ * the wrapper stays compatible with non-DOM Angular platforms (SSR, tests).
58
+ * Unlike a "skip undefined" guard, this lets consumers reset values back to
59
+ * undefined / null by clearing their bindings.
60
+ */
61
+ setHostProperty(key, value) {
62
+ this.renderer.setProperty(this.host, key, value);
63
+ }
64
+ bindEvents() {
65
+ this.listenerCleanup.push(this.renderer.listen(this.host, 'change', (event) => {
66
+ this.changeEvent.emit(event);
67
+ }));
68
+ }
69
+ static ɵfac = function LuzmoColorMenu_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || LuzmoColorMenu)(); };
70
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: LuzmoColorMenu, selectors: [["luzmo-color-menu"]], inputs: { color: "color", noAlphaChannel: [0, "no-alpha-channel", "noAlphaChannel"], swatches: "swatches", areaElement: [0, "area-element", "areaElement"] }, outputs: { changeEvent: "change" }, exportAs: ["luzmoColorMenu"], features: [i0.ɵɵNgOnChangesFeature], ngContentSelectors: _c0, decls: 1, vars: 0, template: function LuzmoColorMenu_Template(rf, ctx) { if (rf & 1) {
71
+ i0.ɵɵprojectionDef();
72
+ i0.ɵɵprojection(0);
73
+ } }, encapsulation: 2, changeDetection: 0 });
74
+ }
75
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(LuzmoColorMenu, [{
76
+ type: Component,
77
+ args: [{
78
+ selector: 'luzmo-color-menu',
79
+ exportAs: 'luzmoColorMenu',
80
+ standalone: true,
81
+ changeDetection: ChangeDetectionStrategy.OnPush,
82
+ template: '<ng-content />'
83
+ }]
84
+ }], () => [], { color: [{
85
+ type: Input,
86
+ args: [{ alias: 'color' }]
87
+ }], noAlphaChannel: [{
88
+ type: Input,
89
+ args: [{ alias: 'no-alpha-channel' }]
90
+ }], swatches: [{
91
+ type: Input,
92
+ args: [{ alias: 'swatches' }]
93
+ }], areaElement: [{
94
+ type: Input,
95
+ args: [{ alias: 'area-element' }]
96
+ }], changeEvent: [{ type: i0.Output, args: ["change"] }] }); })();
97
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(LuzmoColorMenu, { className: "LuzmoColorMenu", filePath: "components/color-menu.ts", lineNumber: 15 }); })();
@@ -0,0 +1,40 @@
1
+ import { OnChanges, SimpleChanges } from '@angular/core';
2
+ import '@luzmo/lucero/color-palette-group';
3
+ import type { LuzmoColorPaletteGroup as LuzmoColorPaletteGroupHostElement } from '@luzmo/lucero/color-palette-group';
4
+ import * as i0 from "@angular/core";
5
+ export declare class LuzmoColorPaletteGroup implements OnChanges {
6
+ private readonly elementRef;
7
+ private readonly renderer;
8
+ private readonly destroyRef;
9
+ private readonly host;
10
+ private readonly listenerCleanup;
11
+ /** The underlying custom element instance. Use to call imperative methods. */
12
+ get nativeElement(): LuzmoColorPaletteGroupHostElement;
13
+ /** Set the color palette group to a disabled state */
14
+ disabled?: boolean;
15
+ /** Set the color palette group to a horizontal state */
16
+ horizontal?: boolean;
17
+ rovingTabindexController?: unknown;
18
+ /** The aria-label of the color palette group */
19
+ label?: string;
20
+ /** The selected color palette value */
21
+ selected?: string;
22
+ slotElement?: unknown;
23
+ /** Announces the color palette value has been changed by user */
24
+ readonly changeEvent: import("@angular/core").OutputEmitterRef<Event>;
25
+ constructor();
26
+ ngOnChanges(changes: SimpleChanges): void;
27
+ /**
28
+ * Forward a wrapper @Input to the underlying host element via Renderer2 so
29
+ * the wrapper stays compatible with non-DOM Angular platforms (SSR, tests).
30
+ * Unlike a "skip undefined" guard, this lets consumers reset values back to
31
+ * undefined / null by clearing their bindings.
32
+ */
33
+ private setHostProperty;
34
+ private bindEvents;
35
+ focus(options?: FocusOptions): void;
36
+ static ɵfac: i0.ɵɵFactoryDeclaration<LuzmoColorPaletteGroup, never>;
37
+ static ɵcmp: i0.ɵɵComponentDeclaration<LuzmoColorPaletteGroup, "luzmo-color-palette-group", ["luzmoColorPaletteGroup"], { "disabled": { "alias": "disabled"; "required": false; }; "horizontal": { "alias": "horizontal"; "required": false; }; "rovingTabindexController": { "alias": "roving-tabindex-controller"; "required": false; }; "label": { "alias": "label"; "required": false; }; "selected": { "alias": "selected"; "required": false; }; "slotElement": { "alias": "slot-element"; "required": false; }; }, { "changeEvent": "change"; }, never, ["*"], true, never>;
38
+ }
39
+ /** The underlying custom element type for LuzmoColorPaletteGroup */
40
+ export type LuzmoColorPaletteGroupElement = LuzmoColorPaletteGroupHostElement;
@@ -0,0 +1,117 @@
1
+ import { ChangeDetectionStrategy, Component, DestroyRef, ElementRef, inject, Input, output, Renderer2 } from '@angular/core';
2
+ import '@luzmo/lucero/color-palette-group';
3
+ import * as i0 from "@angular/core";
4
+ const _c0 = ["*"];
5
+ /**
6
+ * Angular wrapper component for <luzmo-color-palette-group>
7
+ *
8
+ * @slot (default) - the luzmo-color-palette elements that make up the group
9
+ */
10
+ export class LuzmoColorPaletteGroup {
11
+ elementRef = inject(ElementRef);
12
+ renderer = inject(Renderer2);
13
+ destroyRef = inject(DestroyRef);
14
+ host = this.elementRef.nativeElement;
15
+ listenerCleanup = [];
16
+ /** The underlying custom element instance. Use to call imperative methods. */
17
+ get nativeElement() {
18
+ return this.host;
19
+ }
20
+ /** Set the color palette group to a disabled state */
21
+ disabled;
22
+ /** Set the color palette group to a horizontal state */
23
+ horizontal;
24
+ rovingTabindexController;
25
+ /** The aria-label of the color palette group */
26
+ label;
27
+ /** The selected color palette value */
28
+ selected;
29
+ slotElement;
30
+ /** Announces the color palette value has been changed by user */
31
+ changeEvent = output({ alias: 'change' });
32
+ constructor() {
33
+ this.bindEvents();
34
+ this.destroyRef.onDestroy(() => {
35
+ for (const cleanup of this.listenerCleanup) {
36
+ cleanup();
37
+ }
38
+ });
39
+ }
40
+ ngOnChanges(changes) {
41
+ for (const key of Object.keys(changes)) {
42
+ switch (key) {
43
+ case 'disabled':
44
+ this.setHostProperty('disabled', changes['disabled'].currentValue);
45
+ break;
46
+ case 'horizontal':
47
+ this.setHostProperty('horizontal', changes['horizontal'].currentValue);
48
+ break;
49
+ case 'rovingTabindexController':
50
+ this.setHostProperty('rovingTabindexController', changes['rovingTabindexController'].currentValue);
51
+ break;
52
+ case 'label':
53
+ this.setHostProperty('label', changes['label'].currentValue);
54
+ break;
55
+ case 'selected':
56
+ this.setHostProperty('selected', changes['selected'].currentValue);
57
+ break;
58
+ case 'slotElement':
59
+ this.setHostProperty('slotElement', changes['slotElement'].currentValue);
60
+ break;
61
+ default:
62
+ break;
63
+ }
64
+ }
65
+ }
66
+ /**
67
+ * Forward a wrapper @Input to the underlying host element via Renderer2 so
68
+ * the wrapper stays compatible with non-DOM Angular platforms (SSR, tests).
69
+ * Unlike a "skip undefined" guard, this lets consumers reset values back to
70
+ * undefined / null by clearing their bindings.
71
+ */
72
+ setHostProperty(key, value) {
73
+ this.renderer.setProperty(this.host, key, value);
74
+ }
75
+ bindEvents() {
76
+ this.listenerCleanup.push(this.renderer.listen(this.host, 'change', (event) => {
77
+ this.changeEvent.emit(event);
78
+ }));
79
+ }
80
+ focus(options) {
81
+ return this.host.focus(options);
82
+ }
83
+ static ɵfac = function LuzmoColorPaletteGroup_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || LuzmoColorPaletteGroup)(); };
84
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: LuzmoColorPaletteGroup, selectors: [["luzmo-color-palette-group"]], inputs: { disabled: "disabled", horizontal: "horizontal", rovingTabindexController: [0, "roving-tabindex-controller", "rovingTabindexController"], label: "label", selected: "selected", slotElement: [0, "slot-element", "slotElement"] }, outputs: { changeEvent: "change" }, exportAs: ["luzmoColorPaletteGroup"], features: [i0.ɵɵNgOnChangesFeature], ngContentSelectors: _c0, decls: 1, vars: 0, template: function LuzmoColorPaletteGroup_Template(rf, ctx) { if (rf & 1) {
85
+ i0.ɵɵprojectionDef();
86
+ i0.ɵɵprojection(0);
87
+ } }, encapsulation: 2, changeDetection: 0 });
88
+ }
89
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(LuzmoColorPaletteGroup, [{
90
+ type: Component,
91
+ args: [{
92
+ selector: 'luzmo-color-palette-group',
93
+ exportAs: 'luzmoColorPaletteGroup',
94
+ standalone: true,
95
+ changeDetection: ChangeDetectionStrategy.OnPush,
96
+ template: '<ng-content />'
97
+ }]
98
+ }], () => [], { disabled: [{
99
+ type: Input,
100
+ args: [{ alias: 'disabled' }]
101
+ }], horizontal: [{
102
+ type: Input,
103
+ args: [{ alias: 'horizontal' }]
104
+ }], rovingTabindexController: [{
105
+ type: Input,
106
+ args: [{ alias: 'roving-tabindex-controller' }]
107
+ }], label: [{
108
+ type: Input,
109
+ args: [{ alias: 'label' }]
110
+ }], selected: [{
111
+ type: Input,
112
+ args: [{ alias: 'selected' }]
113
+ }], slotElement: [{
114
+ type: Input,
115
+ args: [{ alias: 'slot-element' }]
116
+ }], changeEvent: [{ type: i0.Output, args: ["change"] }] }); })();
117
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(LuzmoColorPaletteGroup, { className: "LuzmoColorPaletteGroup", filePath: "components/color-palette-group.ts", lineNumber: 17 }); })();
@@ -0,0 +1,43 @@
1
+ import { OnChanges, SimpleChanges } from '@angular/core';
2
+ import '@luzmo/lucero/color-palette';
3
+ import type { LuzmoColorPalette as LuzmoColorPaletteHostElement } from '@luzmo/lucero/color-palette';
4
+ import * as i0 from "@angular/core";
5
+ export declare class LuzmoColorPalette implements OnChanges {
6
+ private readonly elementRef;
7
+ private readonly renderer;
8
+ private readonly destroyRef;
9
+ private readonly host;
10
+ private readonly listenerCleanup;
11
+ /** The underlying custom element instance. Use to call imperative methods. */
12
+ get nativeElement(): LuzmoColorPaletteHostElement;
13
+ /** Set the color palette to a disabled state */
14
+ disabled?: boolean;
15
+ /** Set the color palette to a focused state */
16
+ focused?: boolean;
17
+ /** Set the color palette to a selected state */
18
+ selected?: boolean;
19
+ /** Set the color palette to an active state */
20
+ active?: boolean;
21
+ /** Identifies this color palette within its color palette group */
22
+ value?: string;
23
+ /** Set the colors to be displayed in the color palette */
24
+ colors?: string[];
25
+ /** Set the color palette to a reverse state */
26
+ reverse?: boolean;
27
+ /** Set the color palette to a horizontal state */
28
+ horizontal?: boolean;
29
+ constructor();
30
+ ngOnChanges(changes: SimpleChanges): void;
31
+ /**
32
+ * Forward a wrapper @Input to the underlying host element via Renderer2 so
33
+ * the wrapper stays compatible with non-DOM Angular platforms (SSR, tests).
34
+ * Unlike a "skip undefined" guard, this lets consumers reset values back to
35
+ * undefined / null by clearing their bindings.
36
+ */
37
+ private setHostProperty;
38
+ private bindEvents;
39
+ static ɵfac: i0.ɵɵFactoryDeclaration<LuzmoColorPalette, never>;
40
+ static ɵcmp: i0.ɵɵComponentDeclaration<LuzmoColorPalette, "luzmo-color-palette", ["luzmoColorPalette"], { "disabled": { "alias": "disabled"; "required": false; }; "focused": { "alias": "focused"; "required": false; }; "selected": { "alias": "selected"; "required": false; }; "active": { "alias": "active"; "required": false; }; "value": { "alias": "value"; "required": false; }; "colors": { "alias": "colors"; "required": false; }; "reverse": { "alias": "reverse"; "required": false; }; "horizontal": { "alias": "horizontal"; "required": false; }; }, {}, never, ["*"], true, never>;
41
+ }
42
+ /** The underlying custom element type for LuzmoColorPalette */
43
+ export type LuzmoColorPaletteElement = LuzmoColorPaletteHostElement;
@@ -0,0 +1,126 @@
1
+ import { ChangeDetectionStrategy, Component, DestroyRef, ElementRef, inject, Input, Renderer2 } from '@angular/core';
2
+ import '@luzmo/lucero/color-palette';
3
+ import * as i0 from "@angular/core";
4
+ const _c0 = ["*"];
5
+ /**
6
+ * Angular wrapper component for <luzmo-color-palette>
7
+ */
8
+ export class LuzmoColorPalette {
9
+ elementRef = inject(ElementRef);
10
+ renderer = inject(Renderer2);
11
+ destroyRef = inject(DestroyRef);
12
+ host = this.elementRef.nativeElement;
13
+ listenerCleanup = [];
14
+ /** The underlying custom element instance. Use to call imperative methods. */
15
+ get nativeElement() {
16
+ return this.host;
17
+ }
18
+ /** Set the color palette to a disabled state */
19
+ disabled;
20
+ /** Set the color palette to a focused state */
21
+ focused;
22
+ /** Set the color palette to a selected state */
23
+ selected;
24
+ /** Set the color palette to an active state */
25
+ active;
26
+ /** Identifies this color palette within its color palette group */
27
+ value;
28
+ /** Set the colors to be displayed in the color palette */
29
+ colors;
30
+ /** Set the color palette to a reverse state */
31
+ reverse;
32
+ /** Set the color palette to a horizontal state */
33
+ horizontal;
34
+ constructor() {
35
+ this.bindEvents();
36
+ this.destroyRef.onDestroy(() => {
37
+ for (const cleanup of this.listenerCleanup) {
38
+ cleanup();
39
+ }
40
+ });
41
+ }
42
+ ngOnChanges(changes) {
43
+ for (const key of Object.keys(changes)) {
44
+ switch (key) {
45
+ case 'disabled':
46
+ this.setHostProperty('disabled', changes['disabled'].currentValue);
47
+ break;
48
+ case 'focused':
49
+ this.setHostProperty('focused', changes['focused'].currentValue);
50
+ break;
51
+ case 'selected':
52
+ this.setHostProperty('selected', changes['selected'].currentValue);
53
+ break;
54
+ case 'active':
55
+ this.setHostProperty('active', changes['active'].currentValue);
56
+ break;
57
+ case 'value':
58
+ this.setHostProperty('value', changes['value'].currentValue);
59
+ break;
60
+ case 'colors':
61
+ this.setHostProperty('colors', changes['colors'].currentValue);
62
+ break;
63
+ case 'reverse':
64
+ this.setHostProperty('reverse', changes['reverse'].currentValue);
65
+ break;
66
+ case 'horizontal':
67
+ this.setHostProperty('horizontal', changes['horizontal'].currentValue);
68
+ break;
69
+ default:
70
+ break;
71
+ }
72
+ }
73
+ }
74
+ /**
75
+ * Forward a wrapper @Input to the underlying host element via Renderer2 so
76
+ * the wrapper stays compatible with non-DOM Angular platforms (SSR, tests).
77
+ * Unlike a "skip undefined" guard, this lets consumers reset values back to
78
+ * undefined / null by clearing their bindings.
79
+ */
80
+ setHostProperty(key, value) {
81
+ this.renderer.setProperty(this.host, key, value);
82
+ }
83
+ bindEvents() {
84
+ // No custom events for this wrapper.
85
+ }
86
+ static ɵfac = function LuzmoColorPalette_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || LuzmoColorPalette)(); };
87
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: LuzmoColorPalette, selectors: [["luzmo-color-palette"]], inputs: { disabled: "disabled", focused: "focused", selected: "selected", active: "active", value: "value", colors: "colors", reverse: "reverse", horizontal: "horizontal" }, exportAs: ["luzmoColorPalette"], features: [i0.ɵɵNgOnChangesFeature], ngContentSelectors: _c0, decls: 1, vars: 0, template: function LuzmoColorPalette_Template(rf, ctx) { if (rf & 1) {
88
+ i0.ɵɵprojectionDef();
89
+ i0.ɵɵprojection(0);
90
+ } }, encapsulation: 2, changeDetection: 0 });
91
+ }
92
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(LuzmoColorPalette, [{
93
+ type: Component,
94
+ args: [{
95
+ selector: 'luzmo-color-palette',
96
+ exportAs: 'luzmoColorPalette',
97
+ standalone: true,
98
+ changeDetection: ChangeDetectionStrategy.OnPush,
99
+ template: '<ng-content />'
100
+ }]
101
+ }], () => [], { disabled: [{
102
+ type: Input,
103
+ args: [{ alias: 'disabled' }]
104
+ }], focused: [{
105
+ type: Input,
106
+ args: [{ alias: 'focused' }]
107
+ }], selected: [{
108
+ type: Input,
109
+ args: [{ alias: 'selected' }]
110
+ }], active: [{
111
+ type: Input,
112
+ args: [{ alias: 'active' }]
113
+ }], value: [{
114
+ type: Input,
115
+ args: [{ alias: 'value' }]
116
+ }], colors: [{
117
+ type: Input,
118
+ args: [{ alias: 'colors' }]
119
+ }], reverse: [{
120
+ type: Input,
121
+ args: [{ alias: 'reverse' }]
122
+ }], horizontal: [{
123
+ type: Input,
124
+ args: [{ alias: 'horizontal' }]
125
+ }] }); })();
126
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(LuzmoColorPalette, { className: "LuzmoColorPalette", filePath: "components/color-palette.ts", lineNumber: 15 }); })();
@@ -0,0 +1,49 @@
1
+ import { OnChanges, SimpleChanges } from '@angular/core';
2
+ import '@luzmo/lucero/color-picker';
3
+ import type { LuzmoColorPicker as LuzmoColorPickerHostElement } from '@luzmo/lucero/color-picker';
4
+ import * as i0 from "@angular/core";
5
+ export declare class LuzmoColorPicker implements OnChanges {
6
+ private readonly elementRef;
7
+ private readonly renderer;
8
+ private readonly destroyRef;
9
+ private readonly host;
10
+ private readonly listenerCleanup;
11
+ /** The underlying custom element instance. Use to call imperative methods. */
12
+ get nativeElement(): LuzmoColorPickerHostElement;
13
+ /** The color of the color picker. */
14
+ color?: unknown;
15
+ /** Whether the color picker is open. */
16
+ open?: boolean;
17
+ /** Whether the color picker is disabled. */
18
+ disabled?: boolean;
19
+ /** Whether the color picker is read only. */
20
+ readOnly?: boolean;
21
+ /** The placement of the color picker. */
22
+ placement?: unknown;
23
+ /** The rounding of the color picker. */
24
+ rounding?: unknown;
25
+ /** The shape of the color picker. */
26
+ shape?: unknown;
27
+ /** The swatches of the color picker. */
28
+ swatches?: string[];
29
+ /** Whether the color picker has an alpha channel. */
30
+ noAlphaChannel?: boolean;
31
+ /** An alteration to the value of the Color Picker has been committed by the user. */
32
+ readonly changeEvent: import("@angular/core").OutputEmitterRef<Event>;
33
+ /** The value of the Color Picker has changed. */
34
+ readonly inputEvent: import("@angular/core").OutputEmitterRef<CustomEvent<unknown>>;
35
+ constructor();
36
+ ngOnChanges(changes: SimpleChanges): void;
37
+ /**
38
+ * Forward a wrapper @Input to the underlying host element via Renderer2 so
39
+ * the wrapper stays compatible with non-DOM Angular platforms (SSR, tests).
40
+ * Unlike a "skip undefined" guard, this lets consumers reset values back to
41
+ * undefined / null by clearing their bindings.
42
+ */
43
+ private setHostProperty;
44
+ private bindEvents;
45
+ static ɵfac: i0.ɵɵFactoryDeclaration<LuzmoColorPicker, never>;
46
+ static ɵcmp: i0.ɵɵComponentDeclaration<LuzmoColorPicker, "luzmo-color-picker", ["luzmoColorPicker"], { "color": { "alias": "color"; "required": false; }; "open": { "alias": "open"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "readOnly": { "alias": "read-only"; "required": false; }; "placement": { "alias": "placement"; "required": false; }; "rounding": { "alias": "rounding"; "required": false; }; "shape": { "alias": "shape"; "required": false; }; "swatches": { "alias": "swatches"; "required": false; }; "noAlphaChannel": { "alias": "no-alpha-channel"; "required": false; }; }, { "changeEvent": "change"; "inputEvent": "input"; }, never, ["*"], true, never>;
47
+ }
48
+ /** The underlying custom element type for LuzmoColorPicker */
49
+ export type LuzmoColorPickerElement = LuzmoColorPickerHostElement;
@@ -0,0 +1,143 @@
1
+ import { ChangeDetectionStrategy, Component, DestroyRef, ElementRef, inject, Input, output, Renderer2 } from '@angular/core';
2
+ import '@luzmo/lucero/color-picker';
3
+ import * as i0 from "@angular/core";
4
+ const _c0 = ["*"];
5
+ /**
6
+ * Angular wrapper component for <luzmo-color-picker>
7
+ */
8
+ export class LuzmoColorPicker {
9
+ elementRef = inject(ElementRef);
10
+ renderer = inject(Renderer2);
11
+ destroyRef = inject(DestroyRef);
12
+ host = this.elementRef.nativeElement;
13
+ listenerCleanup = [];
14
+ /** The underlying custom element instance. Use to call imperative methods. */
15
+ get nativeElement() {
16
+ return this.host;
17
+ }
18
+ /** The color of the color picker. */
19
+ color;
20
+ /** Whether the color picker is open. */
21
+ open;
22
+ /** Whether the color picker is disabled. */
23
+ disabled;
24
+ /** Whether the color picker is read only. */
25
+ readOnly;
26
+ /** The placement of the color picker. */
27
+ placement;
28
+ /** The rounding of the color picker. */
29
+ rounding;
30
+ /** The shape of the color picker. */
31
+ shape;
32
+ /** The swatches of the color picker. */
33
+ swatches;
34
+ /** Whether the color picker has an alpha channel. */
35
+ noAlphaChannel;
36
+ /** An alteration to the value of the Color Picker has been committed by the user. */
37
+ changeEvent = output({ alias: 'change' });
38
+ /** The value of the Color Picker has changed. */
39
+ inputEvent = output({ alias: 'input' });
40
+ constructor() {
41
+ this.bindEvents();
42
+ this.destroyRef.onDestroy(() => {
43
+ for (const cleanup of this.listenerCleanup) {
44
+ cleanup();
45
+ }
46
+ });
47
+ }
48
+ ngOnChanges(changes) {
49
+ for (const key of Object.keys(changes)) {
50
+ switch (key) {
51
+ case 'color':
52
+ this.setHostProperty('color', changes['color'].currentValue);
53
+ break;
54
+ case 'open':
55
+ this.setHostProperty('open', changes['open'].currentValue);
56
+ break;
57
+ case 'disabled':
58
+ this.setHostProperty('disabled', changes['disabled'].currentValue);
59
+ break;
60
+ case 'readOnly':
61
+ this.setHostProperty('readOnly', changes['readOnly'].currentValue);
62
+ break;
63
+ case 'placement':
64
+ this.setHostProperty('placement', changes['placement'].currentValue);
65
+ break;
66
+ case 'rounding':
67
+ this.setHostProperty('rounding', changes['rounding'].currentValue);
68
+ break;
69
+ case 'shape':
70
+ this.setHostProperty('shape', changes['shape'].currentValue);
71
+ break;
72
+ case 'swatches':
73
+ this.setHostProperty('swatches', changes['swatches'].currentValue);
74
+ break;
75
+ case 'noAlphaChannel':
76
+ this.setHostProperty('noAlphaChannel', changes['noAlphaChannel'].currentValue);
77
+ break;
78
+ default:
79
+ break;
80
+ }
81
+ }
82
+ }
83
+ /**
84
+ * Forward a wrapper @Input to the underlying host element via Renderer2 so
85
+ * the wrapper stays compatible with non-DOM Angular platforms (SSR, tests).
86
+ * Unlike a "skip undefined" guard, this lets consumers reset values back to
87
+ * undefined / null by clearing their bindings.
88
+ */
89
+ setHostProperty(key, value) {
90
+ this.renderer.setProperty(this.host, key, value);
91
+ }
92
+ bindEvents() {
93
+ this.listenerCleanup.push(this.renderer.listen(this.host, 'change', (event) => {
94
+ this.changeEvent.emit(event);
95
+ }));
96
+ this.listenerCleanup.push(this.renderer.listen(this.host, 'input', (event) => {
97
+ this.inputEvent.emit(event);
98
+ }));
99
+ }
100
+ static ɵfac = function LuzmoColorPicker_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || LuzmoColorPicker)(); };
101
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: LuzmoColorPicker, selectors: [["luzmo-color-picker"]], inputs: { color: "color", open: "open", disabled: "disabled", readOnly: [0, "read-only", "readOnly"], placement: "placement", rounding: "rounding", shape: "shape", swatches: "swatches", noAlphaChannel: [0, "no-alpha-channel", "noAlphaChannel"] }, outputs: { changeEvent: "change", inputEvent: "input" }, exportAs: ["luzmoColorPicker"], features: [i0.ɵɵNgOnChangesFeature], ngContentSelectors: _c0, decls: 1, vars: 0, template: function LuzmoColorPicker_Template(rf, ctx) { if (rf & 1) {
102
+ i0.ɵɵprojectionDef();
103
+ i0.ɵɵprojection(0);
104
+ } }, encapsulation: 2, changeDetection: 0 });
105
+ }
106
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(LuzmoColorPicker, [{
107
+ type: Component,
108
+ args: [{
109
+ selector: 'luzmo-color-picker',
110
+ exportAs: 'luzmoColorPicker',
111
+ standalone: true,
112
+ changeDetection: ChangeDetectionStrategy.OnPush,
113
+ template: '<ng-content />'
114
+ }]
115
+ }], () => [], { color: [{
116
+ type: Input,
117
+ args: [{ alias: 'color' }]
118
+ }], open: [{
119
+ type: Input,
120
+ args: [{ alias: 'open' }]
121
+ }], disabled: [{
122
+ type: Input,
123
+ args: [{ alias: 'disabled' }]
124
+ }], readOnly: [{
125
+ type: Input,
126
+ args: [{ alias: 'read-only' }]
127
+ }], placement: [{
128
+ type: Input,
129
+ args: [{ alias: 'placement' }]
130
+ }], rounding: [{
131
+ type: Input,
132
+ args: [{ alias: 'rounding' }]
133
+ }], shape: [{
134
+ type: Input,
135
+ args: [{ alias: 'shape' }]
136
+ }], swatches: [{
137
+ type: Input,
138
+ args: [{ alias: 'swatches' }]
139
+ }], noAlphaChannel: [{
140
+ type: Input,
141
+ args: [{ alias: 'no-alpha-channel' }]
142
+ }], changeEvent: [{ type: i0.Output, args: ["change"] }], inputEvent: [{ type: i0.Output, args: ["input"] }] }); })();
143
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(LuzmoColorPicker, { className: "LuzmoColorPicker", filePath: "components/color-picker.ts", lineNumber: 15 }); })();