@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,337 @@
1
+ import { ChangeDetectionStrategy, Component, DestroyRef, ElementRef, forwardRef, inject, Input, output, Renderer2 } from '@angular/core';
2
+ import { NG_VALUE_ACCESSOR } from '@angular/forms';
3
+ import '@luzmo/lucero/action-menu';
4
+ import * as i0 from "@angular/core";
5
+ const _c0 = ["*"];
6
+ /**
7
+ * Angular wrapper component for <luzmo-action-menu>
8
+ *
9
+ * @slot (default) - menu items to be listed in the Action Menu
10
+ * @slot icon - The icon to use for the Action Menu
11
+ * @slot label - The label to use for the Action Menu
12
+ * @slot label-only - The label to use for the Action Menu (no icon space reserved)
13
+ * @slot tooltip - Tooltip to be applied to the Action Button
14
+ */
15
+ export class LuzmoActionMenu {
16
+ elementRef = inject(ElementRef);
17
+ renderer = inject(Renderer2);
18
+ destroyRef = inject(DestroyRef);
19
+ host = this.elementRef.nativeElement;
20
+ listenerCleanup = [];
21
+ /** The underlying custom element instance. Use to call imperative methods. */
22
+ get nativeElement() {
23
+ return this.host;
24
+ }
25
+ selects;
26
+ staticColor;
27
+ handleSlottableRequest;
28
+ appliedLabel;
29
+ button;
30
+ /** Whether the Picker is disabled. */
31
+ disabled;
32
+ focused;
33
+ icons;
34
+ /** Type of dropdown */
35
+ variant;
36
+ /** Whether the value is invalid. */
37
+ invalid;
38
+ /** Whether the items are currently loading. */
39
+ pending;
40
+ /** Defines a string value that labels the Picker while it is in pending state. */
41
+ pendingLabel;
42
+ label;
43
+ open;
44
+ /** Readonly value */
45
+ readonly;
46
+ labelAlignment;
47
+ optionsMenu;
48
+ overlayElement;
49
+ placement;
50
+ /** Display as a quiet picker */
51
+ quiet;
52
+ value;
53
+ selectedItem;
54
+ dependencyManager;
55
+ isMobile;
56
+ strategy;
57
+ pendingStateController;
58
+ applyFocusElementLabel;
59
+ changeEvent = output({ alias: 'change' });
60
+ scrollEvent = output({ alias: 'scroll' });
61
+ constructor() {
62
+ this.bindEvents();
63
+ this.destroyRef.onDestroy(() => {
64
+ for (const cleanup of this.listenerCleanup) {
65
+ cleanup();
66
+ }
67
+ });
68
+ }
69
+ ngOnChanges(changes) {
70
+ for (const key of Object.keys(changes)) {
71
+ switch (key) {
72
+ case 'selects':
73
+ this.setHostProperty('selects', changes['selects'].currentValue);
74
+ break;
75
+ case 'staticColor':
76
+ this.setHostProperty('staticColor', changes['staticColor'].currentValue);
77
+ break;
78
+ case 'handleSlottableRequest':
79
+ this.setHostProperty('handleSlottableRequest', changes['handleSlottableRequest'].currentValue);
80
+ break;
81
+ case 'appliedLabel':
82
+ this.setHostProperty('appliedLabel', changes['appliedLabel'].currentValue);
83
+ break;
84
+ case 'button':
85
+ this.setHostProperty('button', changes['button'].currentValue);
86
+ break;
87
+ case 'disabled':
88
+ this.setHostProperty('disabled', changes['disabled'].currentValue);
89
+ break;
90
+ case 'focused':
91
+ this.setHostProperty('focused', changes['focused'].currentValue);
92
+ break;
93
+ case 'icons':
94
+ this.setHostProperty('icons', changes['icons'].currentValue);
95
+ break;
96
+ case 'variant':
97
+ this.setHostProperty('variant', changes['variant'].currentValue);
98
+ break;
99
+ case 'invalid':
100
+ this.setHostProperty('invalid', changes['invalid'].currentValue);
101
+ break;
102
+ case 'pending':
103
+ this.setHostProperty('pending', changes['pending'].currentValue);
104
+ break;
105
+ case 'pendingLabel':
106
+ this.setHostProperty('pendingLabel', changes['pendingLabel'].currentValue);
107
+ break;
108
+ case 'label':
109
+ this.setHostProperty('label', changes['label'].currentValue);
110
+ break;
111
+ case 'open':
112
+ this.setHostProperty('open', changes['open'].currentValue);
113
+ break;
114
+ case 'readonly':
115
+ this.setHostProperty('readonly', changes['readonly'].currentValue);
116
+ break;
117
+ case 'labelAlignment':
118
+ this.setHostProperty('labelAlignment', changes['labelAlignment'].currentValue);
119
+ break;
120
+ case 'optionsMenu':
121
+ this.setHostProperty('optionsMenu', changes['optionsMenu'].currentValue);
122
+ break;
123
+ case 'overlayElement':
124
+ this.setHostProperty('overlayElement', changes['overlayElement'].currentValue);
125
+ break;
126
+ case 'placement':
127
+ this.setHostProperty('placement', changes['placement'].currentValue);
128
+ break;
129
+ case 'quiet':
130
+ this.setHostProperty('quiet', changes['quiet'].currentValue);
131
+ break;
132
+ case 'value':
133
+ this.setHostProperty('value', changes['value'].currentValue);
134
+ break;
135
+ case 'selectedItem':
136
+ this.setHostProperty('selectedItem', changes['selectedItem'].currentValue);
137
+ break;
138
+ case 'dependencyManager':
139
+ this.setHostProperty('dependencyManager', changes['dependencyManager'].currentValue);
140
+ break;
141
+ case 'isMobile':
142
+ this.setHostProperty('isMobile', changes['isMobile'].currentValue);
143
+ break;
144
+ case 'strategy':
145
+ this.setHostProperty('strategy', changes['strategy'].currentValue);
146
+ break;
147
+ case 'pendingStateController':
148
+ this.setHostProperty('pendingStateController', changes['pendingStateController'].currentValue);
149
+ break;
150
+ case 'applyFocusElementLabel':
151
+ this.setHostProperty('applyFocusElementLabel', changes['applyFocusElementLabel'].currentValue);
152
+ break;
153
+ default:
154
+ break;
155
+ }
156
+ }
157
+ }
158
+ /**
159
+ * Forward a wrapper @Input to the underlying host element via Renderer2 so
160
+ * the wrapper stays compatible with non-DOM Angular platforms (SSR, tests).
161
+ * Unlike a "skip undefined" guard, this lets consumers reset values back to
162
+ * undefined / null by clearing their bindings.
163
+ */
164
+ setHostProperty(key, value) {
165
+ this.renderer.setProperty(this.host, key, value);
166
+ }
167
+ bindEvents() {
168
+ this.listenerCleanup.push(this.renderer.listen(this.host, 'change', (event) => {
169
+ this.changeEvent.emit(event);
170
+ if (!this.isWritingValue) {
171
+ const eventWithDetail = event;
172
+ const eventTarget = event.target;
173
+ const detail = 'detail' in eventWithDetail ? eventWithDetail.detail : undefined;
174
+ const hostRecord = this.host;
175
+ const nextValue = (detail
176
+ ?? eventTarget?.['value']
177
+ ?? hostRecord['value']);
178
+ if (Object.is(this.lastCvaValue, nextValue)) {
179
+ return;
180
+ }
181
+ this.lastCvaValue = nextValue;
182
+ this.setHostProperty('value', nextValue);
183
+ this.onChange(nextValue);
184
+ }
185
+ }));
186
+ this.listenerCleanup.push(this.renderer.listen(this.host, 'scroll', (event) => {
187
+ this.scrollEvent.emit(event);
188
+ }));
189
+ this.listenerCleanup.push(this.renderer.listen(this.host, 'blur', () => {
190
+ this.onTouched();
191
+ }));
192
+ }
193
+ onChange = () => { };
194
+ onTouched = () => { };
195
+ isWritingValue = false;
196
+ lastCvaValue;
197
+ writeValue(value) {
198
+ this.isWritingValue = true;
199
+ this.lastCvaValue = value;
200
+ this.setHostProperty('value', value);
201
+ this.isWritingValue = false;
202
+ }
203
+ registerOnChange(fn) {
204
+ this.onChange = fn;
205
+ }
206
+ registerOnTouched(fn) {
207
+ this.onTouched = fn;
208
+ }
209
+ setDisabledState(isDisabled) {
210
+ this.setHostProperty('disabled', isDisabled);
211
+ if (isDisabled) {
212
+ this.renderer.setAttribute(this.host, 'disabled', '');
213
+ }
214
+ else {
215
+ this.renderer.removeAttribute(this.host, 'disabled');
216
+ }
217
+ }
218
+ focus(options) {
219
+ return this.host.focus(options);
220
+ }
221
+ toggle(target) {
222
+ return this.host.toggle(target);
223
+ }
224
+ close() {
225
+ return this.host.close();
226
+ }
227
+ static ɵfac = function LuzmoActionMenu_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || LuzmoActionMenu)(); };
228
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: LuzmoActionMenu, selectors: [["luzmo-action-menu"]], inputs: { selects: "selects", staticColor: [0, "static-color", "staticColor"], handleSlottableRequest: [0, "handle-slottable-request", "handleSlottableRequest"], appliedLabel: [0, "applied-label", "appliedLabel"], button: "button", disabled: "disabled", focused: "focused", icons: "icons", variant: "variant", invalid: "invalid", pending: "pending", pendingLabel: [0, "pending-label", "pendingLabel"], label: "label", open: "open", readonly: "readonly", labelAlignment: [0, "label-alignment", "labelAlignment"], optionsMenu: [0, "options-menu", "optionsMenu"], overlayElement: [0, "overlay-element", "overlayElement"], placement: "placement", quiet: "quiet", value: "value", selectedItem: [0, "selected-item", "selectedItem"], dependencyManager: [0, "dependency-manager", "dependencyManager"], isMobile: [0, "is-mobile", "isMobile"], strategy: "strategy", pendingStateController: [0, "pending-state-controller", "pendingStateController"], applyFocusElementLabel: [0, "apply-focus-element-label", "applyFocusElementLabel"] }, outputs: { changeEvent: "change", scrollEvent: "scroll" }, exportAs: ["luzmoActionMenu"], features: [i0.ɵɵProvidersFeature([
229
+ {
230
+ provide: NG_VALUE_ACCESSOR,
231
+ useExisting: forwardRef(() => LuzmoActionMenu),
232
+ multi: true
233
+ }
234
+ ]), i0.ɵɵNgOnChangesFeature], ngContentSelectors: _c0, decls: 1, vars: 0, template: function LuzmoActionMenu_Template(rf, ctx) { if (rf & 1) {
235
+ i0.ɵɵprojectionDef();
236
+ i0.ɵɵprojection(0);
237
+ } }, encapsulation: 2, changeDetection: 0 });
238
+ }
239
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(LuzmoActionMenu, [{
240
+ type: Component,
241
+ args: [{
242
+ selector: 'luzmo-action-menu',
243
+ exportAs: 'luzmoActionMenu',
244
+ standalone: true,
245
+ changeDetection: ChangeDetectionStrategy.OnPush,
246
+ template: '<ng-content />',
247
+ providers: [
248
+ {
249
+ provide: NG_VALUE_ACCESSOR,
250
+ useExisting: forwardRef(() => LuzmoActionMenu),
251
+ multi: true
252
+ }
253
+ ]
254
+ }]
255
+ }], () => [], { selects: [{
256
+ type: Input,
257
+ args: [{ alias: 'selects' }]
258
+ }], staticColor: [{
259
+ type: Input,
260
+ args: [{ alias: 'static-color' }]
261
+ }], handleSlottableRequest: [{
262
+ type: Input,
263
+ args: [{ alias: 'handle-slottable-request' }]
264
+ }], appliedLabel: [{
265
+ type: Input,
266
+ args: [{ alias: 'applied-label' }]
267
+ }], button: [{
268
+ type: Input,
269
+ args: [{ alias: 'button' }]
270
+ }], disabled: [{
271
+ type: Input,
272
+ args: [{ alias: 'disabled' }]
273
+ }], focused: [{
274
+ type: Input,
275
+ args: [{ alias: 'focused' }]
276
+ }], icons: [{
277
+ type: Input,
278
+ args: [{ alias: 'icons' }]
279
+ }], variant: [{
280
+ type: Input,
281
+ args: [{ alias: 'variant' }]
282
+ }], invalid: [{
283
+ type: Input,
284
+ args: [{ alias: 'invalid' }]
285
+ }], pending: [{
286
+ type: Input,
287
+ args: [{ alias: 'pending' }]
288
+ }], pendingLabel: [{
289
+ type: Input,
290
+ args: [{ alias: 'pending-label' }]
291
+ }], label: [{
292
+ type: Input,
293
+ args: [{ alias: 'label' }]
294
+ }], open: [{
295
+ type: Input,
296
+ args: [{ alias: 'open' }]
297
+ }], readonly: [{
298
+ type: Input,
299
+ args: [{ alias: 'readonly' }]
300
+ }], labelAlignment: [{
301
+ type: Input,
302
+ args: [{ alias: 'label-alignment' }]
303
+ }], optionsMenu: [{
304
+ type: Input,
305
+ args: [{ alias: 'options-menu' }]
306
+ }], overlayElement: [{
307
+ type: Input,
308
+ args: [{ alias: 'overlay-element' }]
309
+ }], placement: [{
310
+ type: Input,
311
+ args: [{ alias: 'placement' }]
312
+ }], quiet: [{
313
+ type: Input,
314
+ args: [{ alias: 'quiet' }]
315
+ }], value: [{
316
+ type: Input,
317
+ args: [{ alias: 'value' }]
318
+ }], selectedItem: [{
319
+ type: Input,
320
+ args: [{ alias: 'selected-item' }]
321
+ }], dependencyManager: [{
322
+ type: Input,
323
+ args: [{ alias: 'dependency-manager' }]
324
+ }], isMobile: [{
325
+ type: Input,
326
+ args: [{ alias: 'is-mobile' }]
327
+ }], strategy: [{
328
+ type: Input,
329
+ args: [{ alias: 'strategy' }]
330
+ }], pendingStateController: [{
331
+ type: Input,
332
+ args: [{ alias: 'pending-state-controller' }]
333
+ }], applyFocusElementLabel: [{
334
+ type: Input,
335
+ args: [{ alias: 'apply-focus-element-label' }]
336
+ }], changeEvent: [{ type: i0.Output, args: ["change"] }], scrollEvent: [{ type: i0.Output, args: ["scroll"] }] }); })();
337
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(LuzmoActionMenu, { className: "LuzmoActionMenu", filePath: "components/action-menu.ts", lineNumber: 29 }); })();
@@ -0,0 +1,35 @@
1
+ import { OnChanges, SimpleChanges } from '@angular/core';
2
+ import '@luzmo/lucero/avatar';
3
+ import type { LuzmoAvatar as LuzmoAvatarHostElement } from '@luzmo/lucero/avatar';
4
+ import * as i0 from "@angular/core";
5
+ export declare class LuzmoAvatar 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(): LuzmoAvatarHostElement;
13
+ /** The border style of the avatar image */
14
+ border?: 'none' | 'light';
15
+ /** The rounding of the avatar image */
16
+ rounding?: 'none' | 'full';
17
+ /** The src of the avatar image. */
18
+ src?: string;
19
+ /** When true, marks the avatar image as decorative (sets alt=""). Use when the avatar does not convey meaningful information. */
20
+ isDecorative?: boolean;
21
+ constructor();
22
+ ngOnChanges(changes: SimpleChanges): void;
23
+ /**
24
+ * Forward a wrapper @Input to the underlying host element via Renderer2 so
25
+ * the wrapper stays compatible with non-DOM Angular platforms (SSR, tests).
26
+ * Unlike a "skip undefined" guard, this lets consumers reset values back to
27
+ * undefined / null by clearing their bindings.
28
+ */
29
+ private setHostProperty;
30
+ private bindEvents;
31
+ static ɵfac: i0.ɵɵFactoryDeclaration<LuzmoAvatar, never>;
32
+ static ɵcmp: i0.ɵɵComponentDeclaration<LuzmoAvatar, "luzmo-avatar", ["luzmoAvatar"], { "border": { "alias": "border"; "required": false; }; "rounding": { "alias": "rounding"; "required": false; }; "src": { "alias": "src"; "required": false; }; "isDecorative": { "alias": "is-decorative"; "required": false; }; }, {}, never, ["*"], true, never>;
33
+ }
34
+ /** The underlying custom element type for LuzmoAvatar */
35
+ export type LuzmoAvatarElement = LuzmoAvatarHostElement;
@@ -0,0 +1,94 @@
1
+ import { ChangeDetectionStrategy, Component, DestroyRef, ElementRef, inject, Input, Renderer2 } from '@angular/core';
2
+ import '@luzmo/lucero/avatar';
3
+ import * as i0 from "@angular/core";
4
+ const _c0 = ["*"];
5
+ /**
6
+ * Angular wrapper component for <luzmo-avatar>
7
+ */
8
+ export class LuzmoAvatar {
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 border style of the avatar image */
19
+ border;
20
+ /** The rounding of the avatar image */
21
+ rounding;
22
+ /** The src of the avatar image. */
23
+ src;
24
+ /** When true, marks the avatar image as decorative (sets alt=""). Use when the avatar does not convey meaningful information. */
25
+ isDecorative;
26
+ constructor() {
27
+ this.bindEvents();
28
+ this.destroyRef.onDestroy(() => {
29
+ for (const cleanup of this.listenerCleanup) {
30
+ cleanup();
31
+ }
32
+ });
33
+ }
34
+ ngOnChanges(changes) {
35
+ for (const key of Object.keys(changes)) {
36
+ switch (key) {
37
+ case 'border':
38
+ this.setHostProperty('border', changes['border'].currentValue);
39
+ break;
40
+ case 'rounding':
41
+ this.setHostProperty('rounding', changes['rounding'].currentValue);
42
+ break;
43
+ case 'src':
44
+ this.setHostProperty('src', changes['src'].currentValue);
45
+ break;
46
+ case 'isDecorative':
47
+ this.setHostProperty('isDecorative', changes['isDecorative'].currentValue);
48
+ break;
49
+ default:
50
+ break;
51
+ }
52
+ }
53
+ }
54
+ /**
55
+ * Forward a wrapper @Input to the underlying host element via Renderer2 so
56
+ * the wrapper stays compatible with non-DOM Angular platforms (SSR, tests).
57
+ * Unlike a "skip undefined" guard, this lets consumers reset values back to
58
+ * undefined / null by clearing their bindings.
59
+ */
60
+ setHostProperty(key, value) {
61
+ this.renderer.setProperty(this.host, key, value);
62
+ }
63
+ bindEvents() {
64
+ // No custom events for this wrapper.
65
+ }
66
+ static ɵfac = function LuzmoAvatar_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || LuzmoAvatar)(); };
67
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: LuzmoAvatar, selectors: [["luzmo-avatar"]], inputs: { border: "border", rounding: "rounding", src: "src", isDecorative: [0, "is-decorative", "isDecorative"] }, exportAs: ["luzmoAvatar"], features: [i0.ɵɵNgOnChangesFeature], ngContentSelectors: _c0, decls: 1, vars: 0, template: function LuzmoAvatar_Template(rf, ctx) { if (rf & 1) {
68
+ i0.ɵɵprojectionDef();
69
+ i0.ɵɵprojection(0);
70
+ } }, encapsulation: 2, changeDetection: 0 });
71
+ }
72
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(LuzmoAvatar, [{
73
+ type: Component,
74
+ args: [{
75
+ selector: 'luzmo-avatar',
76
+ exportAs: 'luzmoAvatar',
77
+ standalone: true,
78
+ changeDetection: ChangeDetectionStrategy.OnPush,
79
+ template: '<ng-content />'
80
+ }]
81
+ }], () => [], { border: [{
82
+ type: Input,
83
+ args: [{ alias: 'border' }]
84
+ }], rounding: [{
85
+ type: Input,
86
+ args: [{ alias: 'rounding' }]
87
+ }], src: [{
88
+ type: Input,
89
+ args: [{ alias: 'src' }]
90
+ }], isDecorative: [{
91
+ type: Input,
92
+ args: [{ alias: 'is-decorative' }]
93
+ }] }); })();
94
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(LuzmoAvatar, { className: "LuzmoAvatar", filePath: "components/avatar.ts", lineNumber: 15 }); })();
@@ -0,0 +1,31 @@
1
+ import { OnChanges, SimpleChanges } from '@angular/core';
2
+ import '@luzmo/lucero/badge';
3
+ import type { LuzmoBadge as LuzmoBadgeHostElement, BadgeFixed, BadgeTreatments, BadgeVariants } from '@luzmo/lucero/badge';
4
+ import * as i0 from "@angular/core";
5
+ export type { BadgeFixed, BadgeNonSemanticVariants, BadgeSemanticVariants, BadgeTreatments, BadgeVariants } from '@luzmo/lucero/badge';
6
+ export declare class LuzmoBadge implements OnChanges {
7
+ private readonly elementRef;
8
+ private readonly renderer;
9
+ private readonly destroyRef;
10
+ private readonly host;
11
+ private readonly listenerCleanup;
12
+ /** The underlying custom element instance. Use to call imperative methods. */
13
+ get nativeElement(): LuzmoBadgeHostElement;
14
+ variant?: BadgeVariants;
15
+ treatment?: BadgeTreatments;
16
+ fixed?: BadgeFixed;
17
+ constructor();
18
+ ngOnChanges(changes: SimpleChanges): void;
19
+ /**
20
+ * Forward a wrapper @Input to the underlying host element via Renderer2 so
21
+ * the wrapper stays compatible with non-DOM Angular platforms (SSR, tests).
22
+ * Unlike a "skip undefined" guard, this lets consumers reset values back to
23
+ * undefined / null by clearing their bindings.
24
+ */
25
+ private setHostProperty;
26
+ private bindEvents;
27
+ static ɵfac: i0.ɵɵFactoryDeclaration<LuzmoBadge, never>;
28
+ static ɵcmp: i0.ɵɵComponentDeclaration<LuzmoBadge, "luzmo-badge", ["luzmoBadge"], { "variant": { "alias": "variant"; "required": false; }; "treatment": { "alias": "treatment"; "required": false; }; "fixed": { "alias": "fixed"; "required": false; }; }, {}, never, ["*"], true, never>;
29
+ }
30
+ /** The underlying custom element type for LuzmoBadge */
31
+ export type LuzmoBadgeElement = LuzmoBadgeHostElement;
@@ -0,0 +1,86 @@
1
+ import { ChangeDetectionStrategy, Component, DestroyRef, ElementRef, inject, Input, Renderer2 } from '@angular/core';
2
+ import '@luzmo/lucero/badge';
3
+ import * as i0 from "@angular/core";
4
+ const _c0 = ["*"];
5
+ /**
6
+ * Angular wrapper component for <luzmo-badge>
7
+ *
8
+ * @slot (default) - text label of the Badge
9
+ * @slot icon - an icon element to display within the Badge
10
+ */
11
+ export class LuzmoBadge {
12
+ elementRef = inject(ElementRef);
13
+ renderer = inject(Renderer2);
14
+ destroyRef = inject(DestroyRef);
15
+ host = this.elementRef.nativeElement;
16
+ listenerCleanup = [];
17
+ /** The underlying custom element instance. Use to call imperative methods. */
18
+ get nativeElement() {
19
+ return this.host;
20
+ }
21
+ variant;
22
+ treatment;
23
+ fixed;
24
+ constructor() {
25
+ this.bindEvents();
26
+ this.destroyRef.onDestroy(() => {
27
+ for (const cleanup of this.listenerCleanup) {
28
+ cleanup();
29
+ }
30
+ });
31
+ }
32
+ ngOnChanges(changes) {
33
+ for (const key of Object.keys(changes)) {
34
+ switch (key) {
35
+ case 'variant':
36
+ this.setHostProperty('variant', changes['variant'].currentValue);
37
+ break;
38
+ case 'treatment':
39
+ this.setHostProperty('treatment', changes['treatment'].currentValue);
40
+ break;
41
+ case 'fixed':
42
+ this.setHostProperty('fixed', changes['fixed'].currentValue);
43
+ break;
44
+ default:
45
+ break;
46
+ }
47
+ }
48
+ }
49
+ /**
50
+ * Forward a wrapper @Input to the underlying host element via Renderer2 so
51
+ * the wrapper stays compatible with non-DOM Angular platforms (SSR, tests).
52
+ * Unlike a "skip undefined" guard, this lets consumers reset values back to
53
+ * undefined / null by clearing their bindings.
54
+ */
55
+ setHostProperty(key, value) {
56
+ this.renderer.setProperty(this.host, key, value);
57
+ }
58
+ bindEvents() {
59
+ // No custom events for this wrapper.
60
+ }
61
+ static ɵfac = function LuzmoBadge_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || LuzmoBadge)(); };
62
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: LuzmoBadge, selectors: [["luzmo-badge"]], inputs: { variant: "variant", treatment: "treatment", fixed: "fixed" }, exportAs: ["luzmoBadge"], features: [i0.ɵɵNgOnChangesFeature], ngContentSelectors: _c0, decls: 1, vars: 0, template: function LuzmoBadge_Template(rf, ctx) { if (rf & 1) {
63
+ i0.ɵɵprojectionDef();
64
+ i0.ɵɵprojection(0);
65
+ } }, encapsulation: 2, changeDetection: 0 });
66
+ }
67
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(LuzmoBadge, [{
68
+ type: Component,
69
+ args: [{
70
+ selector: 'luzmo-badge',
71
+ exportAs: 'luzmoBadge',
72
+ standalone: true,
73
+ changeDetection: ChangeDetectionStrategy.OnPush,
74
+ template: '<ng-content />'
75
+ }]
76
+ }], () => [], { variant: [{
77
+ type: Input,
78
+ args: [{ alias: 'variant' }]
79
+ }], treatment: [{
80
+ type: Input,
81
+ args: [{ alias: 'treatment' }]
82
+ }], fixed: [{
83
+ type: Input,
84
+ args: [{ alias: 'fixed' }]
85
+ }] }); })();
86
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(LuzmoBadge, { className: "LuzmoBadge", filePath: "components/badge.ts", lineNumber: 19 }); })();
@@ -0,0 +1,28 @@
1
+ import { OnChanges, SimpleChanges } from '@angular/core';
2
+ import '@luzmo/lucero/button-group';
3
+ import type { LuzmoButtonGroup as LuzmoButtonGroupHostElement } from '@luzmo/lucero/button-group';
4
+ import * as i0 from "@angular/core";
5
+ export declare class LuzmoButtonGroup 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(): LuzmoButtonGroupHostElement;
13
+ vertical?: boolean;
14
+ constructor();
15
+ ngOnChanges(changes: SimpleChanges): void;
16
+ /**
17
+ * Forward a wrapper @Input to the underlying host element via Renderer2 so
18
+ * the wrapper stays compatible with non-DOM Angular platforms (SSR, tests).
19
+ * Unlike a "skip undefined" guard, this lets consumers reset values back to
20
+ * undefined / null by clearing their bindings.
21
+ */
22
+ private setHostProperty;
23
+ private bindEvents;
24
+ static ɵfac: i0.ɵɵFactoryDeclaration<LuzmoButtonGroup, never>;
25
+ static ɵcmp: i0.ɵɵComponentDeclaration<LuzmoButtonGroup, "luzmo-button-group", ["luzmoButtonGroup"], { "vertical": { "alias": "vertical"; "required": false; }; }, {}, never, ["*"], true, never>;
26
+ }
27
+ /** The underlying custom element type for LuzmoButtonGroup */
28
+ export type LuzmoButtonGroupElement = LuzmoButtonGroupHostElement;