@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,340 @@
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/picker';
4
+ import * as i0 from "@angular/core";
5
+ const _c0 = ["*"];
6
+ /**
7
+ * Angular wrapper component for <luzmo-picker>
8
+ *
9
+ * @slot label - The placeholder content for the Picker
10
+ * @slot description - The description content for the Picker
11
+ * @slot tooltip - Tooltip to to be applied to the the Picker Button
12
+ * @slot (default) - menu items to be listed in the Picker
13
+ */
14
+ export class LuzmoPicker {
15
+ elementRef = inject(ElementRef);
16
+ renderer = inject(Renderer2);
17
+ destroyRef = inject(DestroyRef);
18
+ host = this.elementRef.nativeElement;
19
+ listenerCleanup = [];
20
+ /** The underlying custom element instance. Use to call imperative methods. */
21
+ get nativeElement() {
22
+ return this.host;
23
+ }
24
+ appliedLabel;
25
+ button;
26
+ /** Whether the Picker is disabled. */
27
+ disabled;
28
+ focused;
29
+ icons;
30
+ /** Type of dropdown */
31
+ variant;
32
+ /** Whether the value is invalid. */
33
+ invalid;
34
+ /** Whether the items are currently loading. */
35
+ pending;
36
+ /** Defines a string value that labels the Picker while it is in pending state. */
37
+ pendingLabel;
38
+ label;
39
+ open;
40
+ /** Readonly value */
41
+ readonly;
42
+ labelAlignment;
43
+ optionsMenu;
44
+ overlayElement;
45
+ placement;
46
+ /** Display as a quiet picker */
47
+ quiet;
48
+ value;
49
+ selectedItem;
50
+ selects;
51
+ dependencyManager;
52
+ isMobile;
53
+ strategy;
54
+ pendingStateController;
55
+ handleSlottableRequest;
56
+ applyFocusElementLabel;
57
+ /** Announces that the `value` of the element has changed */
58
+ changeEvent = output({ alias: 'change' });
59
+ /** Announces that the overlay has been opened */
60
+ luzmoOpenedEvent = output({ alias: 'luzmo-opened' });
61
+ /** Announces that the overlay has been closed */
62
+ luzmoClosedEvent = output({ alias: 'luzmo-closed' });
63
+ scrollEvent = output({ alias: 'scroll' });
64
+ constructor() {
65
+ this.bindEvents();
66
+ this.destroyRef.onDestroy(() => {
67
+ for (const cleanup of this.listenerCleanup) {
68
+ cleanup();
69
+ }
70
+ });
71
+ }
72
+ ngOnChanges(changes) {
73
+ for (const key of Object.keys(changes)) {
74
+ switch (key) {
75
+ case 'appliedLabel':
76
+ this.setHostProperty('appliedLabel', changes['appliedLabel'].currentValue);
77
+ break;
78
+ case 'button':
79
+ this.setHostProperty('button', changes['button'].currentValue);
80
+ break;
81
+ case 'disabled':
82
+ this.setHostProperty('disabled', changes['disabled'].currentValue);
83
+ break;
84
+ case 'focused':
85
+ this.setHostProperty('focused', changes['focused'].currentValue);
86
+ break;
87
+ case 'icons':
88
+ this.setHostProperty('icons', changes['icons'].currentValue);
89
+ break;
90
+ case 'variant':
91
+ this.setHostProperty('variant', changes['variant'].currentValue);
92
+ break;
93
+ case 'invalid':
94
+ this.setHostProperty('invalid', changes['invalid'].currentValue);
95
+ break;
96
+ case 'pending':
97
+ this.setHostProperty('pending', changes['pending'].currentValue);
98
+ break;
99
+ case 'pendingLabel':
100
+ this.setHostProperty('pendingLabel', changes['pendingLabel'].currentValue);
101
+ break;
102
+ case 'label':
103
+ this.setHostProperty('label', changes['label'].currentValue);
104
+ break;
105
+ case 'open':
106
+ this.setHostProperty('open', changes['open'].currentValue);
107
+ break;
108
+ case 'readonly':
109
+ this.setHostProperty('readonly', changes['readonly'].currentValue);
110
+ break;
111
+ case 'labelAlignment':
112
+ this.setHostProperty('labelAlignment', changes['labelAlignment'].currentValue);
113
+ break;
114
+ case 'optionsMenu':
115
+ this.setHostProperty('optionsMenu', changes['optionsMenu'].currentValue);
116
+ break;
117
+ case 'overlayElement':
118
+ this.setHostProperty('overlayElement', changes['overlayElement'].currentValue);
119
+ break;
120
+ case 'placement':
121
+ this.setHostProperty('placement', changes['placement'].currentValue);
122
+ break;
123
+ case 'quiet':
124
+ this.setHostProperty('quiet', changes['quiet'].currentValue);
125
+ break;
126
+ case 'value':
127
+ this.setHostProperty('value', changes['value'].currentValue);
128
+ break;
129
+ case 'selectedItem':
130
+ this.setHostProperty('selectedItem', changes['selectedItem'].currentValue);
131
+ break;
132
+ case 'selects':
133
+ this.setHostProperty('selects', changes['selects'].currentValue);
134
+ break;
135
+ case 'dependencyManager':
136
+ this.setHostProperty('dependencyManager', changes['dependencyManager'].currentValue);
137
+ break;
138
+ case 'isMobile':
139
+ this.setHostProperty('isMobile', changes['isMobile'].currentValue);
140
+ break;
141
+ case 'strategy':
142
+ this.setHostProperty('strategy', changes['strategy'].currentValue);
143
+ break;
144
+ case 'pendingStateController':
145
+ this.setHostProperty('pendingStateController', changes['pendingStateController'].currentValue);
146
+ break;
147
+ case 'handleSlottableRequest':
148
+ this.setHostProperty('handleSlottableRequest', changes['handleSlottableRequest'].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, 'luzmo-opened', (event) => {
187
+ this.luzmoOpenedEvent.emit(event);
188
+ }));
189
+ this.listenerCleanup.push(this.renderer.listen(this.host, 'luzmo-closed', (event) => {
190
+ this.luzmoClosedEvent.emit(event);
191
+ }));
192
+ this.listenerCleanup.push(this.renderer.listen(this.host, 'scroll', (event) => {
193
+ this.scrollEvent.emit(event);
194
+ }));
195
+ this.listenerCleanup.push(this.renderer.listen(this.host, 'blur', () => {
196
+ this.onTouched();
197
+ }));
198
+ }
199
+ onChange = () => { };
200
+ onTouched = () => { };
201
+ isWritingValue = false;
202
+ lastCvaValue;
203
+ writeValue(value) {
204
+ this.isWritingValue = true;
205
+ this.lastCvaValue = value;
206
+ this.setHostProperty('value', value);
207
+ this.isWritingValue = false;
208
+ }
209
+ registerOnChange(fn) {
210
+ this.onChange = fn;
211
+ }
212
+ registerOnTouched(fn) {
213
+ this.onTouched = fn;
214
+ }
215
+ setDisabledState(isDisabled) {
216
+ this.setHostProperty('disabled', isDisabled);
217
+ if (isDisabled) {
218
+ this.renderer.setAttribute(this.host, 'disabled', '');
219
+ }
220
+ else {
221
+ this.renderer.removeAttribute(this.host, 'disabled');
222
+ }
223
+ }
224
+ focus(options) {
225
+ return this.host.focus(options);
226
+ }
227
+ toggle(target) {
228
+ return this.host.toggle(target);
229
+ }
230
+ close() {
231
+ return this.host.close();
232
+ }
233
+ static ɵfac = function LuzmoPicker_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || LuzmoPicker)(); };
234
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: LuzmoPicker, selectors: [["luzmo-picker"]], inputs: { 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"], selects: "selects", dependencyManager: [0, "dependency-manager", "dependencyManager"], isMobile: [0, "is-mobile", "isMobile"], strategy: "strategy", pendingStateController: [0, "pending-state-controller", "pendingStateController"], handleSlottableRequest: [0, "handle-slottable-request", "handleSlottableRequest"], applyFocusElementLabel: [0, "apply-focus-element-label", "applyFocusElementLabel"] }, outputs: { changeEvent: "change", luzmoOpenedEvent: "luzmo-opened", luzmoClosedEvent: "luzmo-closed", scrollEvent: "scroll" }, exportAs: ["luzmoPicker"], features: [i0.ɵɵProvidersFeature([
235
+ {
236
+ provide: NG_VALUE_ACCESSOR,
237
+ useExisting: forwardRef(() => LuzmoPicker),
238
+ multi: true
239
+ }
240
+ ]), i0.ɵɵNgOnChangesFeature], ngContentSelectors: _c0, decls: 1, vars: 0, template: function LuzmoPicker_Template(rf, ctx) { if (rf & 1) {
241
+ i0.ɵɵprojectionDef();
242
+ i0.ɵɵprojection(0);
243
+ } }, encapsulation: 2, changeDetection: 0 });
244
+ }
245
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(LuzmoPicker, [{
246
+ type: Component,
247
+ args: [{
248
+ selector: 'luzmo-picker',
249
+ exportAs: 'luzmoPicker',
250
+ standalone: true,
251
+ changeDetection: ChangeDetectionStrategy.OnPush,
252
+ template: '<ng-content />',
253
+ providers: [
254
+ {
255
+ provide: NG_VALUE_ACCESSOR,
256
+ useExisting: forwardRef(() => LuzmoPicker),
257
+ multi: true
258
+ }
259
+ ]
260
+ }]
261
+ }], () => [], { appliedLabel: [{
262
+ type: Input,
263
+ args: [{ alias: 'applied-label' }]
264
+ }], button: [{
265
+ type: Input,
266
+ args: [{ alias: 'button' }]
267
+ }], disabled: [{
268
+ type: Input,
269
+ args: [{ alias: 'disabled' }]
270
+ }], focused: [{
271
+ type: Input,
272
+ args: [{ alias: 'focused' }]
273
+ }], icons: [{
274
+ type: Input,
275
+ args: [{ alias: 'icons' }]
276
+ }], variant: [{
277
+ type: Input,
278
+ args: [{ alias: 'variant' }]
279
+ }], invalid: [{
280
+ type: Input,
281
+ args: [{ alias: 'invalid' }]
282
+ }], pending: [{
283
+ type: Input,
284
+ args: [{ alias: 'pending' }]
285
+ }], pendingLabel: [{
286
+ type: Input,
287
+ args: [{ alias: 'pending-label' }]
288
+ }], label: [{
289
+ type: Input,
290
+ args: [{ alias: 'label' }]
291
+ }], open: [{
292
+ type: Input,
293
+ args: [{ alias: 'open' }]
294
+ }], readonly: [{
295
+ type: Input,
296
+ args: [{ alias: 'readonly' }]
297
+ }], labelAlignment: [{
298
+ type: Input,
299
+ args: [{ alias: 'label-alignment' }]
300
+ }], optionsMenu: [{
301
+ type: Input,
302
+ args: [{ alias: 'options-menu' }]
303
+ }], overlayElement: [{
304
+ type: Input,
305
+ args: [{ alias: 'overlay-element' }]
306
+ }], placement: [{
307
+ type: Input,
308
+ args: [{ alias: 'placement' }]
309
+ }], quiet: [{
310
+ type: Input,
311
+ args: [{ alias: 'quiet' }]
312
+ }], value: [{
313
+ type: Input,
314
+ args: [{ alias: 'value' }]
315
+ }], selectedItem: [{
316
+ type: Input,
317
+ args: [{ alias: 'selected-item' }]
318
+ }], selects: [{
319
+ type: Input,
320
+ args: [{ alias: 'selects' }]
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
+ }], handleSlottableRequest: [{
334
+ type: Input,
335
+ args: [{ alias: 'handle-slottable-request' }]
336
+ }], applyFocusElementLabel: [{
337
+ type: Input,
338
+ args: [{ alias: 'apply-focus-element-label' }]
339
+ }], changeEvent: [{ type: i0.Output, args: ["change"] }], luzmoOpenedEvent: [{ type: i0.Output, args: ["luzmo-opened"] }], luzmoClosedEvent: [{ type: i0.Output, args: ["luzmo-closed"] }], scrollEvent: [{ type: i0.Output, args: ["scroll"] }] }); })();
340
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(LuzmoPicker, { className: "LuzmoPicker", filePath: "components/picker.ts", lineNumber: 28 }); })();
@@ -0,0 +1,33 @@
1
+ import { OnChanges, SimpleChanges } from '@angular/core';
2
+ import '@luzmo/lucero/popover';
3
+ import type { LuzmoPopover as LuzmoPopoverHostElement } from '@luzmo/lucero/popover';
4
+ import type { Placement as __extt_Placement } from '@floating-ui/dom';
5
+ import * as i0 from "@angular/core";
6
+ export declare class LuzmoPopover 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(): LuzmoPopoverHostElement;
14
+ /** Whether the popover is visible or not. */
15
+ open?: boolean;
16
+ placement?: __extt_Placement;
17
+ tip?: boolean;
18
+ tipElement?: unknown;
19
+ constructor();
20
+ ngOnChanges(changes: SimpleChanges): void;
21
+ /**
22
+ * Forward a wrapper @Input to the underlying host element via Renderer2 so
23
+ * the wrapper stays compatible with non-DOM Angular platforms (SSR, tests).
24
+ * Unlike a "skip undefined" guard, this lets consumers reset values back to
25
+ * undefined / null by clearing their bindings.
26
+ */
27
+ private setHostProperty;
28
+ private bindEvents;
29
+ static ɵfac: i0.ɵɵFactoryDeclaration<LuzmoPopover, never>;
30
+ static ɵcmp: i0.ɵɵComponentDeclaration<LuzmoPopover, "luzmo-popover", ["luzmoPopover"], { "open": { "alias": "open"; "required": false; }; "placement": { "alias": "placement"; "required": false; }; "tip": { "alias": "tip"; "required": false; }; "tipElement": { "alias": "tip-element"; "required": false; }; }, {}, never, ["*"], true, never>;
31
+ }
32
+ /** The underlying custom element type for LuzmoPopover */
33
+ export type LuzmoPopoverElement = LuzmoPopoverHostElement;
@@ -0,0 +1,93 @@
1
+ import { ChangeDetectionStrategy, Component, DestroyRef, ElementRef, inject, Input, Renderer2 } from '@angular/core';
2
+ import '@luzmo/lucero/popover';
3
+ import * as i0 from "@angular/core";
4
+ const _c0 = ["*"];
5
+ /**
6
+ * Angular wrapper component for <luzmo-popover>
7
+ *
8
+ * @slot (default) - content to display within the Luzmo Popover
9
+ */
10
+ export class LuzmoPopover {
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
+ /** Whether the popover is visible or not. */
21
+ open;
22
+ placement;
23
+ tip;
24
+ tipElement;
25
+ constructor() {
26
+ this.bindEvents();
27
+ this.destroyRef.onDestroy(() => {
28
+ for (const cleanup of this.listenerCleanup) {
29
+ cleanup();
30
+ }
31
+ });
32
+ }
33
+ ngOnChanges(changes) {
34
+ for (const key of Object.keys(changes)) {
35
+ switch (key) {
36
+ case 'open':
37
+ this.setHostProperty('open', changes['open'].currentValue);
38
+ break;
39
+ case 'placement':
40
+ this.setHostProperty('placement', changes['placement'].currentValue);
41
+ break;
42
+ case 'tip':
43
+ this.setHostProperty('tip', changes['tip'].currentValue);
44
+ break;
45
+ case 'tipElement':
46
+ this.setHostProperty('tipElement', changes['tipElement'].currentValue);
47
+ break;
48
+ default:
49
+ break;
50
+ }
51
+ }
52
+ }
53
+ /**
54
+ * Forward a wrapper @Input to the underlying host element via Renderer2 so
55
+ * the wrapper stays compatible with non-DOM Angular platforms (SSR, tests).
56
+ * Unlike a "skip undefined" guard, this lets consumers reset values back to
57
+ * undefined / null by clearing their bindings.
58
+ */
59
+ setHostProperty(key, value) {
60
+ this.renderer.setProperty(this.host, key, value);
61
+ }
62
+ bindEvents() {
63
+ // No custom events for this wrapper.
64
+ }
65
+ static ɵfac = function LuzmoPopover_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || LuzmoPopover)(); };
66
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: LuzmoPopover, selectors: [["luzmo-popover"]], inputs: { open: "open", placement: "placement", tip: "tip", tipElement: [0, "tip-element", "tipElement"] }, exportAs: ["luzmoPopover"], features: [i0.ɵɵNgOnChangesFeature], ngContentSelectors: _c0, decls: 1, vars: 0, template: function LuzmoPopover_Template(rf, ctx) { if (rf & 1) {
67
+ i0.ɵɵprojectionDef();
68
+ i0.ɵɵprojection(0);
69
+ } }, encapsulation: 2, changeDetection: 0 });
70
+ }
71
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(LuzmoPopover, [{
72
+ type: Component,
73
+ args: [{
74
+ selector: 'luzmo-popover',
75
+ exportAs: 'luzmoPopover',
76
+ standalone: true,
77
+ changeDetection: ChangeDetectionStrategy.OnPush,
78
+ template: '<ng-content />'
79
+ }]
80
+ }], () => [], { open: [{
81
+ type: Input,
82
+ args: [{ alias: 'open' }]
83
+ }], placement: [{
84
+ type: Input,
85
+ args: [{ alias: 'placement' }]
86
+ }], tip: [{
87
+ type: Input,
88
+ args: [{ alias: 'tip' }]
89
+ }], tipElement: [{
90
+ type: Input,
91
+ args: [{ alias: 'tip-element' }]
92
+ }] }); })();
93
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(LuzmoPopover, { className: "LuzmoPopover", filePath: "components/popover.ts", lineNumber: 18 }); })();
@@ -0,0 +1,35 @@
1
+ import { OnChanges, SimpleChanges } from '@angular/core';
2
+ import '@luzmo/lucero/progress-bar';
3
+ import type { LuzmoProgressBar as LuzmoProgressBarHostElement } from '@luzmo/lucero/progress-bar';
4
+ import * as i0 from "@angular/core";
5
+ export declare class LuzmoProgressBar 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(): LuzmoProgressBarHostElement;
13
+ indeterminate?: boolean;
14
+ label?: string;
15
+ progress?: number;
16
+ staticColor?: 'white' | 'black';
17
+ sideLabel?: boolean;
18
+ hideValue?: boolean;
19
+ valueLabel?: string;
20
+ variant?: string;
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<LuzmoProgressBar, never>;
32
+ static ɵcmp: i0.ɵɵComponentDeclaration<LuzmoProgressBar, "luzmo-progress-bar", ["luzmoProgressBar"], { "indeterminate": { "alias": "indeterminate"; "required": false; }; "label": { "alias": "label"; "required": false; }; "progress": { "alias": "progress"; "required": false; }; "staticColor": { "alias": "static-color"; "required": false; }; "sideLabel": { "alias": "side-label"; "required": false; }; "hideValue": { "alias": "hide-value"; "required": false; }; "valueLabel": { "alias": "value-label"; "required": false; }; "variant": { "alias": "variant"; "required": false; }; }, {}, never, ["*"], true, never>;
33
+ }
34
+ /** The underlying custom element type for LuzmoProgressBar */
35
+ export type LuzmoProgressBarElement = LuzmoProgressBarHostElement;
@@ -0,0 +1,121 @@
1
+ import { ChangeDetectionStrategy, Component, DestroyRef, ElementRef, inject, Input, Renderer2 } from '@angular/core';
2
+ import '@luzmo/lucero/progress-bar';
3
+ import * as i0 from "@angular/core";
4
+ const _c0 = ["*"];
5
+ /**
6
+ * Angular wrapper component for <luzmo-progress-bar>
7
+ *
8
+ * @slot (default) - the label of the progress bar
9
+ * @slot value - custom value content displayed instead of the default percentage
10
+ */
11
+ export class LuzmoProgressBar {
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
+ indeterminate;
22
+ label;
23
+ progress;
24
+ staticColor;
25
+ sideLabel;
26
+ hideValue;
27
+ valueLabel;
28
+ variant;
29
+ constructor() {
30
+ this.bindEvents();
31
+ this.destroyRef.onDestroy(() => {
32
+ for (const cleanup of this.listenerCleanup) {
33
+ cleanup();
34
+ }
35
+ });
36
+ }
37
+ ngOnChanges(changes) {
38
+ for (const key of Object.keys(changes)) {
39
+ switch (key) {
40
+ case 'indeterminate':
41
+ this.setHostProperty('indeterminate', changes['indeterminate'].currentValue);
42
+ break;
43
+ case 'label':
44
+ this.setHostProperty('label', changes['label'].currentValue);
45
+ break;
46
+ case 'progress':
47
+ this.setHostProperty('progress', changes['progress'].currentValue);
48
+ break;
49
+ case 'staticColor':
50
+ this.setHostProperty('staticColor', changes['staticColor'].currentValue);
51
+ break;
52
+ case 'sideLabel':
53
+ this.setHostProperty('sideLabel', changes['sideLabel'].currentValue);
54
+ break;
55
+ case 'hideValue':
56
+ this.setHostProperty('hideValue', changes['hideValue'].currentValue);
57
+ break;
58
+ case 'valueLabel':
59
+ this.setHostProperty('valueLabel', changes['valueLabel'].currentValue);
60
+ break;
61
+ case 'variant':
62
+ this.setHostProperty('variant', changes['variant'].currentValue);
63
+ break;
64
+ default:
65
+ break;
66
+ }
67
+ }
68
+ }
69
+ /**
70
+ * Forward a wrapper @Input to the underlying host element via Renderer2 so
71
+ * the wrapper stays compatible with non-DOM Angular platforms (SSR, tests).
72
+ * Unlike a "skip undefined" guard, this lets consumers reset values back to
73
+ * undefined / null by clearing their bindings.
74
+ */
75
+ setHostProperty(key, value) {
76
+ this.renderer.setProperty(this.host, key, value);
77
+ }
78
+ bindEvents() {
79
+ // No custom events for this wrapper.
80
+ }
81
+ static ɵfac = function LuzmoProgressBar_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || LuzmoProgressBar)(); };
82
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: LuzmoProgressBar, selectors: [["luzmo-progress-bar"]], inputs: { indeterminate: "indeterminate", label: "label", progress: "progress", staticColor: [0, "static-color", "staticColor"], sideLabel: [0, "side-label", "sideLabel"], hideValue: [0, "hide-value", "hideValue"], valueLabel: [0, "value-label", "valueLabel"], variant: "variant" }, exportAs: ["luzmoProgressBar"], features: [i0.ɵɵNgOnChangesFeature], ngContentSelectors: _c0, decls: 1, vars: 0, template: function LuzmoProgressBar_Template(rf, ctx) { if (rf & 1) {
83
+ i0.ɵɵprojectionDef();
84
+ i0.ɵɵprojection(0);
85
+ } }, encapsulation: 2, changeDetection: 0 });
86
+ }
87
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(LuzmoProgressBar, [{
88
+ type: Component,
89
+ args: [{
90
+ selector: 'luzmo-progress-bar',
91
+ exportAs: 'luzmoProgressBar',
92
+ standalone: true,
93
+ changeDetection: ChangeDetectionStrategy.OnPush,
94
+ template: '<ng-content />'
95
+ }]
96
+ }], () => [], { indeterminate: [{
97
+ type: Input,
98
+ args: [{ alias: 'indeterminate' }]
99
+ }], label: [{
100
+ type: Input,
101
+ args: [{ alias: 'label' }]
102
+ }], progress: [{
103
+ type: Input,
104
+ args: [{ alias: 'progress' }]
105
+ }], staticColor: [{
106
+ type: Input,
107
+ args: [{ alias: 'static-color' }]
108
+ }], sideLabel: [{
109
+ type: Input,
110
+ args: [{ alias: 'side-label' }]
111
+ }], hideValue: [{
112
+ type: Input,
113
+ args: [{ alias: 'hide-value' }]
114
+ }], valueLabel: [{
115
+ type: Input,
116
+ args: [{ alias: 'value-label' }]
117
+ }], variant: [{
118
+ type: Input,
119
+ args: [{ alias: 'variant' }]
120
+ }] }); })();
121
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(LuzmoProgressBar, { className: "LuzmoProgressBar", filePath: "components/progress-bar.ts", lineNumber: 18 }); })();
@@ -0,0 +1,35 @@
1
+ import { OnChanges, SimpleChanges } from '@angular/core';
2
+ import '@luzmo/lucero/progress-circle';
3
+ import type { LuzmoProgressCircle as LuzmoProgressCircleHostElement } from '@luzmo/lucero/progress-circle';
4
+ import * as i0 from "@angular/core";
5
+ export declare class LuzmoProgressCircle 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(): LuzmoProgressCircleHostElement;
13
+ /** The `indeterminate` attribute is used to indicate that the progress circle is in an indeterminate state */
14
+ indeterminate?: boolean;
15
+ /** The aria-label of the progress circle */
16
+ label?: string;
17
+ /** The `static-color` attribute is used to set the color of the progress circle to black or white. This is used when the progress circle is on a colored background. */
18
+ staticColor?: 'white' | 'black';
19
+ /** The progress in degrees of the progress circle */
20
+ progress?: number;
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<LuzmoProgressCircle, never>;
32
+ static ɵcmp: i0.ɵɵComponentDeclaration<LuzmoProgressCircle, "luzmo-progress-circle", ["luzmoProgressCircle"], { "indeterminate": { "alias": "indeterminate"; "required": false; }; "label": { "alias": "label"; "required": false; }; "staticColor": { "alias": "static-color"; "required": false; }; "progress": { "alias": "progress"; "required": false; }; }, {}, never, ["*"], true, never>;
33
+ }
34
+ /** The underlying custom element type for LuzmoProgressCircle */
35
+ export type LuzmoProgressCircleElement = LuzmoProgressCircleHostElement;