@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,308 @@
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/text-field';
4
+ import * as i0 from "@angular/core";
5
+ const _c0 = ["*"];
6
+ /**
7
+ * Angular wrapper component for <luzmo-text-field>
8
+ *
9
+ * @slot help-text - default or non-negative help text to associate to your form element
10
+ * @slot negative-help-text - negative help text to associate to your form element when `invalid`
11
+ */
12
+ export class LuzmoTextField {
13
+ elementRef = inject(ElementRef);
14
+ renderer = inject(Renderer2);
15
+ destroyRef = inject(DestroyRef);
16
+ host = this.elementRef.nativeElement;
17
+ listenerCleanup = [];
18
+ /** The underlying custom element instance. Use to call imperative methods. */
19
+ get nativeElement() {
20
+ return this.host;
21
+ }
22
+ /** The value held by the form control */
23
+ value;
24
+ helpTextManager;
25
+ /** A regular expression outlining the keys that will be allowed to update the value of the form control. */
26
+ allowedKeys;
27
+ /** Whether the `value` held by the form control is invalid. */
28
+ invalid;
29
+ /** A string applied via `aria-label` to the form control when a user visible label is not provided. */
30
+ label;
31
+ /** Name of the form control. */
32
+ name;
33
+ /** Text that appears in the form control when it has no value set */
34
+ placeholder;
35
+ type;
36
+ /** Pattern the `value` must match to be valid */
37
+ pattern;
38
+ /** Whether a form control delivered with the `multiline` attribute will change size vertically to accomodate longer input */
39
+ grows;
40
+ /** Defines the maximum string length that the user can enter */
41
+ maxlength;
42
+ /** Defines the minimum string length that the user can enter */
43
+ minlength;
44
+ /** Whether the form control should accept a value longer than one line */
45
+ multiline;
46
+ /** Whether a user can interact with the value of the form control */
47
+ readonly;
48
+ /** The specific number of rows the form control should provide in the user interface */
49
+ rows;
50
+ /** The maximum number of rows the form control should grow to when `grows` is enabled. When content exceeds this limit, the textarea will show a scrollbar. A value of -1 means no maximum (unlimited growth). When set, the value must be >= 1; values < 1 will be disregarded. */
51
+ maxRows;
52
+ /** Whether the `value` held by the form control is valid. */
53
+ valid;
54
+ /** Whether to hide the validation state icons (valid/invalid icons). */
55
+ hideValidationIcons;
56
+ /** Whether to display the form control with no visible background */
57
+ quiet;
58
+ /** Whether the form control will be found to be invalid when it holds no `value` */
59
+ required;
60
+ /** What form of assistance should be provided when attempting to supply a value to the form control */
61
+ autocomplete;
62
+ /** An alteration to the value of the element has been committed by the user. */
63
+ changeEvent = output({ alias: 'change' });
64
+ /** The value of the element has changed. */
65
+ inputEvent = output({ alias: 'input' });
66
+ /** A key has been pressed. */
67
+ keypressEvent = output({ alias: 'keypress' });
68
+ constructor() {
69
+ this.bindEvents();
70
+ this.destroyRef.onDestroy(() => {
71
+ for (const cleanup of this.listenerCleanup) {
72
+ cleanup();
73
+ }
74
+ });
75
+ }
76
+ ngOnChanges(changes) {
77
+ for (const key of Object.keys(changes)) {
78
+ switch (key) {
79
+ case 'value':
80
+ this.setHostProperty('value', changes['value'].currentValue);
81
+ break;
82
+ case 'helpTextManager':
83
+ this.setHostProperty('helpTextManager', changes['helpTextManager'].currentValue);
84
+ break;
85
+ case 'allowedKeys':
86
+ this.setHostProperty('allowedKeys', changes['allowedKeys'].currentValue);
87
+ break;
88
+ case 'invalid':
89
+ this.setHostProperty('invalid', changes['invalid'].currentValue);
90
+ break;
91
+ case 'label':
92
+ this.setHostProperty('label', changes['label'].currentValue);
93
+ break;
94
+ case 'name':
95
+ this.setHostProperty('name', changes['name'].currentValue);
96
+ break;
97
+ case 'placeholder':
98
+ this.setHostProperty('placeholder', changes['placeholder'].currentValue);
99
+ break;
100
+ case 'type':
101
+ this.setHostProperty('type', changes['type'].currentValue);
102
+ break;
103
+ case 'pattern':
104
+ this.setHostProperty('pattern', changes['pattern'].currentValue);
105
+ break;
106
+ case 'grows':
107
+ this.setHostProperty('grows', changes['grows'].currentValue);
108
+ break;
109
+ case 'maxlength':
110
+ this.setHostProperty('maxlength', changes['maxlength'].currentValue);
111
+ break;
112
+ case 'minlength':
113
+ this.setHostProperty('minlength', changes['minlength'].currentValue);
114
+ break;
115
+ case 'multiline':
116
+ this.setHostProperty('multiline', changes['multiline'].currentValue);
117
+ break;
118
+ case 'readonly':
119
+ this.setHostProperty('readonly', changes['readonly'].currentValue);
120
+ break;
121
+ case 'rows':
122
+ this.setHostProperty('rows', changes['rows'].currentValue);
123
+ break;
124
+ case 'maxRows':
125
+ this.setHostProperty('maxRows', changes['maxRows'].currentValue);
126
+ break;
127
+ case 'valid':
128
+ this.setHostProperty('valid', changes['valid'].currentValue);
129
+ break;
130
+ case 'hideValidationIcons':
131
+ this.setHostProperty('hideValidationIcons', changes['hideValidationIcons'].currentValue);
132
+ break;
133
+ case 'quiet':
134
+ this.setHostProperty('quiet', changes['quiet'].currentValue);
135
+ break;
136
+ case 'required':
137
+ this.setHostProperty('required', changes['required'].currentValue);
138
+ break;
139
+ case 'autocomplete':
140
+ this.setHostProperty('autocomplete', changes['autocomplete'].currentValue);
141
+ break;
142
+ default:
143
+ break;
144
+ }
145
+ }
146
+ }
147
+ /**
148
+ * Forward a wrapper @Input to the underlying host element via Renderer2 so
149
+ * the wrapper stays compatible with non-DOM Angular platforms (SSR, tests).
150
+ * Unlike a "skip undefined" guard, this lets consumers reset values back to
151
+ * undefined / null by clearing their bindings.
152
+ */
153
+ setHostProperty(key, value) {
154
+ this.renderer.setProperty(this.host, key, value);
155
+ }
156
+ bindEvents() {
157
+ this.listenerCleanup.push(this.renderer.listen(this.host, 'change', (event) => {
158
+ this.changeEvent.emit(event);
159
+ if (!this.isWritingValue) {
160
+ const eventWithDetail = event;
161
+ const eventTarget = event.target;
162
+ const detail = 'detail' in eventWithDetail ? eventWithDetail.detail : undefined;
163
+ const hostRecord = this.host;
164
+ const nextValue = (detail
165
+ ?? eventTarget?.['value']
166
+ ?? hostRecord['value']);
167
+ if (Object.is(this.lastCvaValue, nextValue)) {
168
+ return;
169
+ }
170
+ this.lastCvaValue = nextValue;
171
+ this.setHostProperty('value', nextValue);
172
+ this.onChange(nextValue);
173
+ }
174
+ }));
175
+ this.listenerCleanup.push(this.renderer.listen(this.host, 'input', (event) => {
176
+ this.inputEvent.emit(event);
177
+ }));
178
+ this.listenerCleanup.push(this.renderer.listen(this.host, 'keypress', (event) => {
179
+ this.keypressEvent.emit(event);
180
+ }));
181
+ this.listenerCleanup.push(this.renderer.listen(this.host, 'blur', () => {
182
+ this.onTouched();
183
+ }));
184
+ }
185
+ onChange = () => { };
186
+ onTouched = () => { };
187
+ isWritingValue = false;
188
+ lastCvaValue;
189
+ writeValue(value) {
190
+ this.isWritingValue = true;
191
+ this.lastCvaValue = value;
192
+ this.setHostProperty('value', value);
193
+ this.isWritingValue = false;
194
+ }
195
+ registerOnChange(fn) {
196
+ this.onChange = fn;
197
+ }
198
+ registerOnTouched(fn) {
199
+ this.onTouched = fn;
200
+ }
201
+ setDisabledState(isDisabled) {
202
+ // Underlying element does not declare a 'disabled' field; nothing to do.
203
+ void isDisabled;
204
+ }
205
+ /** Sets the start and end positions of the current selection. */
206
+ setSelectionRange(selectionStart, selectionEnd, selectionDirection) {
207
+ return this.host.setSelectionRange(selectionStart, selectionEnd, selectionDirection);
208
+ }
209
+ /** Selects all the text. */
210
+ select() {
211
+ return this.host.select();
212
+ }
213
+ checkValidity() {
214
+ return this.host.checkValidity();
215
+ }
216
+ static ɵfac = function LuzmoTextField_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || LuzmoTextField)(); };
217
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: LuzmoTextField, selectors: [["luzmo-text-field"]], inputs: { value: "value", helpTextManager: [0, "help-text-manager", "helpTextManager"], allowedKeys: [0, "allowed-keys", "allowedKeys"], invalid: "invalid", label: "label", name: "name", placeholder: "placeholder", type: "type", pattern: "pattern", grows: "grows", maxlength: "maxlength", minlength: "minlength", multiline: "multiline", readonly: "readonly", rows: "rows", maxRows: [0, "max-rows", "maxRows"], valid: "valid", hideValidationIcons: [0, "hide-validation-icons", "hideValidationIcons"], quiet: "quiet", required: "required", autocomplete: "autocomplete" }, outputs: { changeEvent: "change", inputEvent: "input", keypressEvent: "keypress" }, exportAs: ["luzmoTextField"], features: [i0.ɵɵProvidersFeature([
218
+ {
219
+ provide: NG_VALUE_ACCESSOR,
220
+ useExisting: forwardRef(() => LuzmoTextField),
221
+ multi: true
222
+ }
223
+ ]), i0.ɵɵNgOnChangesFeature], ngContentSelectors: _c0, decls: 1, vars: 0, template: function LuzmoTextField_Template(rf, ctx) { if (rf & 1) {
224
+ i0.ɵɵprojectionDef();
225
+ i0.ɵɵprojection(0);
226
+ } }, encapsulation: 2, changeDetection: 0 });
227
+ }
228
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(LuzmoTextField, [{
229
+ type: Component,
230
+ args: [{
231
+ selector: 'luzmo-text-field',
232
+ exportAs: 'luzmoTextField',
233
+ standalone: true,
234
+ changeDetection: ChangeDetectionStrategy.OnPush,
235
+ template: '<ng-content />',
236
+ providers: [
237
+ {
238
+ provide: NG_VALUE_ACCESSOR,
239
+ useExisting: forwardRef(() => LuzmoTextField),
240
+ multi: true
241
+ }
242
+ ]
243
+ }]
244
+ }], () => [], { value: [{
245
+ type: Input,
246
+ args: [{ alias: 'value' }]
247
+ }], helpTextManager: [{
248
+ type: Input,
249
+ args: [{ alias: 'help-text-manager' }]
250
+ }], allowedKeys: [{
251
+ type: Input,
252
+ args: [{ alias: 'allowed-keys' }]
253
+ }], invalid: [{
254
+ type: Input,
255
+ args: [{ alias: 'invalid' }]
256
+ }], label: [{
257
+ type: Input,
258
+ args: [{ alias: 'label' }]
259
+ }], name: [{
260
+ type: Input,
261
+ args: [{ alias: 'name' }]
262
+ }], placeholder: [{
263
+ type: Input,
264
+ args: [{ alias: 'placeholder' }]
265
+ }], type: [{
266
+ type: Input,
267
+ args: [{ alias: 'type' }]
268
+ }], pattern: [{
269
+ type: Input,
270
+ args: [{ alias: 'pattern' }]
271
+ }], grows: [{
272
+ type: Input,
273
+ args: [{ alias: 'grows' }]
274
+ }], maxlength: [{
275
+ type: Input,
276
+ args: [{ alias: 'maxlength' }]
277
+ }], minlength: [{
278
+ type: Input,
279
+ args: [{ alias: 'minlength' }]
280
+ }], multiline: [{
281
+ type: Input,
282
+ args: [{ alias: 'multiline' }]
283
+ }], readonly: [{
284
+ type: Input,
285
+ args: [{ alias: 'readonly' }]
286
+ }], rows: [{
287
+ type: Input,
288
+ args: [{ alias: 'rows' }]
289
+ }], maxRows: [{
290
+ type: Input,
291
+ args: [{ alias: 'max-rows' }]
292
+ }], valid: [{
293
+ type: Input,
294
+ args: [{ alias: 'valid' }]
295
+ }], hideValidationIcons: [{
296
+ type: Input,
297
+ args: [{ alias: 'hide-validation-icons' }]
298
+ }], quiet: [{
299
+ type: Input,
300
+ args: [{ alias: 'quiet' }]
301
+ }], required: [{
302
+ type: Input,
303
+ args: [{ alias: 'required' }]
304
+ }], autocomplete: [{
305
+ type: Input,
306
+ args: [{ alias: 'autocomplete' }]
307
+ }], changeEvent: [{ type: i0.Output, args: ["change"] }], inputEvent: [{ type: i0.Output, args: ["input"] }], keypressEvent: [{ type: i0.Output, args: ["keypress"] }] }); })();
308
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(LuzmoTextField, { className: "LuzmoTextField", filePath: "components/text-field.ts", lineNumber: 26 }); })();
@@ -0,0 +1,30 @@
1
+ import { OnChanges, SimpleChanges } from '@angular/core';
2
+ import '@luzmo/lucero/toast';
3
+ import type { LuzmoToast as LuzmoToastHostElement } from '@luzmo/lucero/toast';
4
+ import * as i0 from "@angular/core";
5
+ export declare class LuzmoToast 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(): LuzmoToastHostElement;
13
+ /** Announces that the Toast has been closed by the user or by its timeout. */
14
+ readonly closeEvent: import("@angular/core").OutputEmitterRef<CustomEvent<unknown>>;
15
+ constructor();
16
+ ngOnChanges(changes: SimpleChanges): void;
17
+ /**
18
+ * Forward a wrapper @Input to the underlying host element via Renderer2 so
19
+ * the wrapper stays compatible with non-DOM Angular platforms (SSR, tests).
20
+ * Unlike a "skip undefined" guard, this lets consumers reset values back to
21
+ * undefined / null by clearing their bindings.
22
+ */
23
+ private setHostProperty;
24
+ private bindEvents;
25
+ close(): void;
26
+ static ɵfac: i0.ɵɵFactoryDeclaration<LuzmoToast, never>;
27
+ static ɵcmp: i0.ɵɵComponentDeclaration<LuzmoToast, "luzmo-toast", ["luzmoToast"], {}, { "closeEvent": "close"; }, never, ["*"], true, never>;
28
+ }
29
+ /** The underlying custom element type for LuzmoToast */
30
+ export type LuzmoToastElement = LuzmoToastHostElement;
@@ -0,0 +1,68 @@
1
+ import { ChangeDetectionStrategy, Component, DestroyRef, ElementRef, inject, output, Renderer2 } from '@angular/core';
2
+ import '@luzmo/lucero/toast';
3
+ import * as i0 from "@angular/core";
4
+ const _c0 = ["*"];
5
+ /**
6
+ * Angular wrapper component for <luzmo-toast>
7
+ *
8
+ * @slot (default) - The toast content
9
+ * @slot action - button element surfacing an action in the Toast
10
+ */
11
+ export class LuzmoToast {
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
+ /** Announces that the Toast has been closed by the user or by its timeout. */
22
+ closeEvent = output({ alias: 'close' });
23
+ constructor() {
24
+ this.bindEvents();
25
+ this.destroyRef.onDestroy(() => {
26
+ for (const cleanup of this.listenerCleanup) {
27
+ cleanup();
28
+ }
29
+ });
30
+ }
31
+ ngOnChanges(changes) {
32
+ // No mapped inputs for this wrapper.
33
+ void changes;
34
+ }
35
+ /**
36
+ * Forward a wrapper @Input to the underlying host element via Renderer2 so
37
+ * the wrapper stays compatible with non-DOM Angular platforms (SSR, tests).
38
+ * Unlike a "skip undefined" guard, this lets consumers reset values back to
39
+ * undefined / null by clearing their bindings.
40
+ */
41
+ setHostProperty(key, value) {
42
+ this.renderer.setProperty(this.host, key, value);
43
+ }
44
+ bindEvents() {
45
+ this.listenerCleanup.push(this.renderer.listen(this.host, 'close', (event) => {
46
+ this.closeEvent.emit(event);
47
+ }));
48
+ }
49
+ close() {
50
+ return this.host.close();
51
+ }
52
+ static ɵfac = function LuzmoToast_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || LuzmoToast)(); };
53
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: LuzmoToast, selectors: [["luzmo-toast"]], outputs: { closeEvent: "close" }, exportAs: ["luzmoToast"], features: [i0.ɵɵNgOnChangesFeature], ngContentSelectors: _c0, decls: 1, vars: 0, template: function LuzmoToast_Template(rf, ctx) { if (rf & 1) {
54
+ i0.ɵɵprojectionDef();
55
+ i0.ɵɵprojection(0);
56
+ } }, encapsulation: 2, changeDetection: 0 });
57
+ }
58
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(LuzmoToast, [{
59
+ type: Component,
60
+ args: [{
61
+ selector: 'luzmo-toast',
62
+ exportAs: 'luzmoToast',
63
+ standalone: true,
64
+ changeDetection: ChangeDetectionStrategy.OnPush,
65
+ template: '<ng-content />'
66
+ }]
67
+ }], () => [], { closeEvent: [{ type: i0.Output, args: ["close"] }] }); })();
68
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(LuzmoToast, { className: "LuzmoToast", filePath: "components/toast.ts", lineNumber: 18 }); })();
@@ -0,0 +1,44 @@
1
+ import { OnChanges, SimpleChanges } from '@angular/core';
2
+ import '@luzmo/lucero/tooltip';
3
+ import type { LuzmoTooltip as LuzmoTooltipHostElement } from '@luzmo/lucero/tooltip';
4
+ import * as i0 from "@angular/core";
5
+ export declare class LuzmoTooltip 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(): LuzmoTooltipHostElement;
13
+ /** A Tooltip that is `delayed` will its Overlay wait until a warm-up period of 1000ms has completed before opening. Once the warmup period has completed, all subsequent Overlays will open immediately. When no Overlays are opened, a cooldown period of 1000ms will begin. Once the cooldown has completed, the next Overlay to be opened will be subject to the warm-up period if provided that option. */
14
+ delayed?: boolean;
15
+ /** Whether to prevent a self-managed Tooltip from responding to user input. */
16
+ disabled?: boolean;
17
+ /** Whether to show the tooltip only if the content is truncated. */
18
+ showOnlyIfTruncated?: boolean;
19
+ /** The selector of the element to check for truncation. */
20
+ truncatedElementSelector?: string;
21
+ /** Automatically bind to the parent element of the assigned `slot` or the parent element of the `luzmo-tooltip`. Without this, you must provide your own `overlay-trigger`. */
22
+ selfManaged?: boolean;
23
+ offset?: number;
24
+ open?: boolean;
25
+ overlayElement?: unknown;
26
+ placement?: "top" | "top-start" | "top-end" | "right" | "right-start" | "right-end" | "bottom" | "bottom-start" | "bottom-end" | "left" | "left-start" | "left-end";
27
+ tipElement?: unknown;
28
+ tipPadding?: number;
29
+ variant?: string;
30
+ constructor();
31
+ ngOnChanges(changes: SimpleChanges): void;
32
+ /**
33
+ * Forward a wrapper @Input to the underlying host element via Renderer2 so
34
+ * the wrapper stays compatible with non-DOM Angular platforms (SSR, tests).
35
+ * Unlike a "skip undefined" guard, this lets consumers reset values back to
36
+ * undefined / null by clearing their bindings.
37
+ */
38
+ private setHostProperty;
39
+ private bindEvents;
40
+ static ɵfac: i0.ɵɵFactoryDeclaration<LuzmoTooltip, never>;
41
+ static ɵcmp: i0.ɵɵComponentDeclaration<LuzmoTooltip, "luzmo-tooltip", ["luzmoTooltip"], { "delayed": { "alias": "delayed"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "showOnlyIfTruncated": { "alias": "show-only-if-truncated"; "required": false; }; "truncatedElementSelector": { "alias": "truncated-element-selector"; "required": false; }; "selfManaged": { "alias": "self-managed"; "required": false; }; "offset": { "alias": "offset"; "required": false; }; "open": { "alias": "open"; "required": false; }; "overlayElement": { "alias": "overlay-element"; "required": false; }; "placement": { "alias": "placement"; "required": false; }; "tipElement": { "alias": "tip-element"; "required": false; }; "tipPadding": { "alias": "tip-padding"; "required": false; }; "variant": { "alias": "variant"; "required": false; }; }, {}, never, ["*"], true, never>;
42
+ }
43
+ /** The underlying custom element type for LuzmoTooltip */
44
+ export type LuzmoTooltipElement = LuzmoTooltipHostElement;
@@ -0,0 +1,154 @@
1
+ import { ChangeDetectionStrategy, Component, DestroyRef, ElementRef, inject, Input, Renderer2 } from '@angular/core';
2
+ import '@luzmo/lucero/tooltip';
3
+ import * as i0 from "@angular/core";
4
+ const _c0 = ["*"];
5
+ /**
6
+ * Angular wrapper component for <luzmo-tooltip>
7
+ *
8
+ * @slot icon - the icon element appearing at the start of the label
9
+ * @slot (default) - the text label of the Tooltip
10
+ */
11
+ export class LuzmoTooltip {
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
+ /** A Tooltip that is `delayed` will its Overlay wait until a warm-up period of 1000ms has completed before opening. Once the warmup period has completed, all subsequent Overlays will open immediately. When no Overlays are opened, a cooldown period of 1000ms will begin. Once the cooldown has completed, the next Overlay to be opened will be subject to the warm-up period if provided that option. */
22
+ delayed;
23
+ /** Whether to prevent a self-managed Tooltip from responding to user input. */
24
+ disabled;
25
+ /** Whether to show the tooltip only if the content is truncated. */
26
+ showOnlyIfTruncated;
27
+ /** The selector of the element to check for truncation. */
28
+ truncatedElementSelector;
29
+ /** Automatically bind to the parent element of the assigned `slot` or the parent element of the `luzmo-tooltip`. Without this, you must provide your own `overlay-trigger`. */
30
+ selfManaged;
31
+ offset;
32
+ open;
33
+ overlayElement;
34
+ placement;
35
+ tipElement;
36
+ tipPadding;
37
+ variant;
38
+ constructor() {
39
+ this.bindEvents();
40
+ this.destroyRef.onDestroy(() => {
41
+ for (const cleanup of this.listenerCleanup) {
42
+ cleanup();
43
+ }
44
+ });
45
+ }
46
+ ngOnChanges(changes) {
47
+ for (const key of Object.keys(changes)) {
48
+ switch (key) {
49
+ case 'delayed':
50
+ this.setHostProperty('delayed', changes['delayed'].currentValue);
51
+ break;
52
+ case 'disabled':
53
+ this.setHostProperty('disabled', changes['disabled'].currentValue);
54
+ break;
55
+ case 'showOnlyIfTruncated':
56
+ this.setHostProperty('showOnlyIfTruncated', changes['showOnlyIfTruncated'].currentValue);
57
+ break;
58
+ case 'truncatedElementSelector':
59
+ this.setHostProperty('truncatedElementSelector', changes['truncatedElementSelector'].currentValue);
60
+ break;
61
+ case 'selfManaged':
62
+ this.setHostProperty('selfManaged', changes['selfManaged'].currentValue);
63
+ break;
64
+ case 'offset':
65
+ this.setHostProperty('offset', changes['offset'].currentValue);
66
+ break;
67
+ case 'open':
68
+ this.setHostProperty('open', changes['open'].currentValue);
69
+ break;
70
+ case 'overlayElement':
71
+ this.setHostProperty('overlayElement', changes['overlayElement'].currentValue);
72
+ break;
73
+ case 'placement':
74
+ this.setHostProperty('placement', changes['placement'].currentValue);
75
+ break;
76
+ case 'tipElement':
77
+ this.setHostProperty('tipElement', changes['tipElement'].currentValue);
78
+ break;
79
+ case 'tipPadding':
80
+ this.setHostProperty('tipPadding', changes['tipPadding'].currentValue);
81
+ break;
82
+ case 'variant':
83
+ this.setHostProperty('variant', changes['variant'].currentValue);
84
+ break;
85
+ default:
86
+ break;
87
+ }
88
+ }
89
+ }
90
+ /**
91
+ * Forward a wrapper @Input to the underlying host element via Renderer2 so
92
+ * the wrapper stays compatible with non-DOM Angular platforms (SSR, tests).
93
+ * Unlike a "skip undefined" guard, this lets consumers reset values back to
94
+ * undefined / null by clearing their bindings.
95
+ */
96
+ setHostProperty(key, value) {
97
+ this.renderer.setProperty(this.host, key, value);
98
+ }
99
+ bindEvents() {
100
+ // No custom events for this wrapper.
101
+ }
102
+ static ɵfac = function LuzmoTooltip_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || LuzmoTooltip)(); };
103
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: LuzmoTooltip, selectors: [["luzmo-tooltip"]], inputs: { delayed: "delayed", disabled: "disabled", showOnlyIfTruncated: [0, "show-only-if-truncated", "showOnlyIfTruncated"], truncatedElementSelector: [0, "truncated-element-selector", "truncatedElementSelector"], selfManaged: [0, "self-managed", "selfManaged"], offset: "offset", open: "open", overlayElement: [0, "overlay-element", "overlayElement"], placement: "placement", tipElement: [0, "tip-element", "tipElement"], tipPadding: [0, "tip-padding", "tipPadding"], variant: "variant" }, exportAs: ["luzmoTooltip"], features: [i0.ɵɵNgOnChangesFeature], ngContentSelectors: _c0, decls: 1, vars: 0, template: function LuzmoTooltip_Template(rf, ctx) { if (rf & 1) {
104
+ i0.ɵɵprojectionDef();
105
+ i0.ɵɵprojection(0);
106
+ } }, encapsulation: 2, changeDetection: 0 });
107
+ }
108
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(LuzmoTooltip, [{
109
+ type: Component,
110
+ args: [{
111
+ selector: 'luzmo-tooltip',
112
+ exportAs: 'luzmoTooltip',
113
+ standalone: true,
114
+ changeDetection: ChangeDetectionStrategy.OnPush,
115
+ template: '<ng-content />'
116
+ }]
117
+ }], () => [], { delayed: [{
118
+ type: Input,
119
+ args: [{ alias: 'delayed' }]
120
+ }], disabled: [{
121
+ type: Input,
122
+ args: [{ alias: 'disabled' }]
123
+ }], showOnlyIfTruncated: [{
124
+ type: Input,
125
+ args: [{ alias: 'show-only-if-truncated' }]
126
+ }], truncatedElementSelector: [{
127
+ type: Input,
128
+ args: [{ alias: 'truncated-element-selector' }]
129
+ }], selfManaged: [{
130
+ type: Input,
131
+ args: [{ alias: 'self-managed' }]
132
+ }], offset: [{
133
+ type: Input,
134
+ args: [{ alias: 'offset' }]
135
+ }], open: [{
136
+ type: Input,
137
+ args: [{ alias: 'open' }]
138
+ }], overlayElement: [{
139
+ type: Input,
140
+ args: [{ alias: 'overlay-element' }]
141
+ }], placement: [{
142
+ type: Input,
143
+ args: [{ alias: 'placement' }]
144
+ }], tipElement: [{
145
+ type: Input,
146
+ args: [{ alias: 'tip-element' }]
147
+ }], tipPadding: [{
148
+ type: Input,
149
+ args: [{ alias: 'tip-padding' }]
150
+ }], variant: [{
151
+ type: Input,
152
+ args: [{ alias: 'variant' }]
153
+ }] }); })();
154
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(LuzmoTooltip, { className: "LuzmoTooltip", filePath: "components/tooltip.ts", lineNumber: 18 }); })();
@@ -0,0 +1,35 @@
1
+ import { OnChanges, SimpleChanges } from '@angular/core';
2
+ import '@luzmo/lucero/top-nav';
3
+ import type { LuzmoTopNavItem as LuzmoTopNavItemHostElement } from '@luzmo/lucero/top-nav';
4
+ import * as i0 from "@angular/core";
5
+ export declare class LuzmoTopNavItem 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(): LuzmoTopNavItemHostElement;
13
+ href?: string;
14
+ target?: string;
15
+ download?: string;
16
+ rel?: string;
17
+ label?: string;
18
+ selected?: boolean;
19
+ disabled?: boolean;
20
+ value?: 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<LuzmoTopNavItem, never>;
32
+ static ɵcmp: i0.ɵɵComponentDeclaration<LuzmoTopNavItem, "luzmo-top-nav-item", ["luzmoTopNavItem"], { "href": { "alias": "href"; "required": false; }; "target": { "alias": "target"; "required": false; }; "download": { "alias": "download"; "required": false; }; "rel": { "alias": "rel"; "required": false; }; "label": { "alias": "label"; "required": false; }; "selected": { "alias": "selected"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "value": { "alias": "value"; "required": false; }; }, {}, never, ["*"], true, never>;
33
+ }
34
+ /** The underlying custom element type for LuzmoTopNavItem */
35
+ export type LuzmoTopNavItemElement = LuzmoTopNavItemHostElement;