@luzmo/ngx-lucero 1.0.3-alpha.13 → 1.0.3-alpha.15
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.
- package/esm/components/option.d.ts +68 -0
- package/esm/components/option.js +246 -0
- package/esm/components/options-divider.d.ts +29 -0
- package/esm/components/options-divider.js +69 -0
- package/esm/components/options.d.ts +4 -3
- package/esm/components/options.js +1 -1
- package/esm/components/overlay-trigger.d.ts +45 -0
- package/esm/components/overlay-trigger.js +155 -0
- package/esm/components/overlay.d.ts +2 -1
- package/esm/components/overlay.js +1 -1
- package/esm/components/tag.d.ts +1 -1
- package/esm/components/tag.js +1 -1
- package/esm/index.d.ts +8 -2
- package/esm/index.js +12 -0
- package/package.json +2 -2
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { OnChanges, SimpleChanges } from '@angular/core';
|
|
2
|
+
import '@luzmo/lucero/options';
|
|
3
|
+
import type { LuzmoOption as LuzmoOptionHostElement } from '@luzmo/lucero/options';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export type { FlatOptionValue, OptionChildren, OptionIconRenderer, OptionValue } from '@luzmo/lucero/options';
|
|
6
|
+
export declare class LuzmoOption 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(): LuzmoOptionHostElement;
|
|
14
|
+
active?: boolean;
|
|
15
|
+
focused?: boolean;
|
|
16
|
+
selected?: boolean;
|
|
17
|
+
emphasized?: boolean;
|
|
18
|
+
/** Whether this option has children and can be expanded/collapsed. */
|
|
19
|
+
expandable?: boolean;
|
|
20
|
+
/** Whether this expandable option is currently expanded. */
|
|
21
|
+
expanded?: boolean;
|
|
22
|
+
/** Whether this option is a child of an expandable parent. */
|
|
23
|
+
childOption?: boolean;
|
|
24
|
+
/** Whether this expandable parent has at least one selected child. */
|
|
25
|
+
hasSelectedChild?: boolean;
|
|
26
|
+
/** Type of visual selection */
|
|
27
|
+
variant?: 'checkmarks' | 'checkboxes' | 'highlight';
|
|
28
|
+
value?: string | number;
|
|
29
|
+
contentSlot?: unknown;
|
|
30
|
+
iconSlot?: unknown;
|
|
31
|
+
noWrap?: boolean;
|
|
32
|
+
/** Causes the browser to treat the linked URL as a download. */
|
|
33
|
+
download?: string;
|
|
34
|
+
/** An accessible label that describes the component. It will be applied to aria-label, but not visually rendered. */
|
|
35
|
+
label?: string;
|
|
36
|
+
/** The URL that the hyperlink points to. */
|
|
37
|
+
href?: string;
|
|
38
|
+
/** Where to display the linked URL, as the name for a browsing context (a tab, window, or <iframe>). */
|
|
39
|
+
target?: '_blank' | '_parent' | '_self' | '_top';
|
|
40
|
+
/** How much of the referrer to send when following the link. */
|
|
41
|
+
referrerpolicy?: 'no-referrer' | 'no-referrer-when-downgrade' | 'origin' | 'origin-when-cross-origin' | 'same-origin' | 'strict-origin' | 'strict-origin-when-cross-origin' | 'unsafe-url';
|
|
42
|
+
/** The relationship of the linked URL as space-separated link types. */
|
|
43
|
+
rel?: string;
|
|
44
|
+
managePresenceObservedSlot?: unknown;
|
|
45
|
+
/** Disable this control. It will not receive focus or events */
|
|
46
|
+
disabled?: boolean;
|
|
47
|
+
/** The tab index to apply to this control. See general documentation about the tabindex HTML property */
|
|
48
|
+
tabIndex?: number;
|
|
49
|
+
/** announces the item has been added so a parent menu can take ownerships */
|
|
50
|
+
readonly luzmoOptionAddedEvent: import("@angular/core").OutputEmitterRef<CustomEvent<unknown>>;
|
|
51
|
+
/** Trick :focus-visible polyfill into thinking keyboard based focus */
|
|
52
|
+
readonly keydownEvent: import("@angular/core").OutputEmitterRef<unknown>;
|
|
53
|
+
constructor();
|
|
54
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
55
|
+
/**
|
|
56
|
+
* Forward a wrapper @Input to the underlying host element via Renderer2 so
|
|
57
|
+
* the wrapper stays compatible with non-DOM Angular platforms (SSR, tests).
|
|
58
|
+
* Unlike a "skip undefined" guard, this lets consumers reset values back to
|
|
59
|
+
* undefined / null by clearing their bindings.
|
|
60
|
+
*/
|
|
61
|
+
private setHostProperty;
|
|
62
|
+
private bindEvents;
|
|
63
|
+
focus(options?: FocusOptions): void;
|
|
64
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<LuzmoOption, never>;
|
|
65
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<LuzmoOption, "luzmo-option", ["luzmoOption"], { "active": { "alias": "active"; "required": false; }; "focused": { "alias": "focused"; "required": false; }; "selected": { "alias": "selected"; "required": false; }; "emphasized": { "alias": "emphasized"; "required": false; }; "expandable": { "alias": "expandable"; "required": false; }; "expanded": { "alias": "expanded"; "required": false; }; "childOption": { "alias": "childOption"; "required": false; }; "hasSelectedChild": { "alias": "hasSelectedChild"; "required": false; }; "variant": { "alias": "variant"; "required": false; }; "value": { "alias": "value"; "required": false; }; "contentSlot": { "alias": "contentSlot"; "required": false; }; "iconSlot": { "alias": "iconSlot"; "required": false; }; "noWrap": { "alias": "noWrap"; "required": false; }; "download": { "alias": "download"; "required": false; }; "label": { "alias": "label"; "required": false; }; "href": { "alias": "href"; "required": false; }; "target": { "alias": "target"; "required": false; }; "referrerpolicy": { "alias": "referrerpolicy"; "required": false; }; "rel": { "alias": "rel"; "required": false; }; "managePresenceObservedSlot": { "alias": "managePresenceObservedSlot"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "tabIndex": { "alias": "tabIndex"; "required": false; }; }, { "luzmoOptionAddedEvent": "luzmo-option-added"; "keydownEvent": "keydown"; }, never, ["*"], true, never>;
|
|
66
|
+
}
|
|
67
|
+
/** The underlying custom element type for LuzmoOption */
|
|
68
|
+
export type LuzmoOptionElement = LuzmoOptionHostElement;
|
|
@@ -0,0 +1,246 @@
|
|
|
1
|
+
import { ChangeDetectionStrategy, Component, DestroyRef, ElementRef, inject, Input, output, Renderer2 } from '@angular/core';
|
|
2
|
+
import '@luzmo/lucero/options';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
const _c0 = ["*"];
|
|
5
|
+
/**
|
|
6
|
+
* Angular wrapper component for <luzmo-option>
|
|
7
|
+
*
|
|
8
|
+
* @slot (default) - text content to display within the Menu Item
|
|
9
|
+
* @slot description - description to be placed below the label of the Menu Item
|
|
10
|
+
* @slot icon - icon element to be placed at the start of the Menu Item
|
|
11
|
+
* @slot value - content placed at the end of the Menu Item like values, keyboard shortcuts, etc.
|
|
12
|
+
*/
|
|
13
|
+
export class LuzmoOption {
|
|
14
|
+
elementRef = inject(ElementRef);
|
|
15
|
+
renderer = inject(Renderer2);
|
|
16
|
+
destroyRef = inject(DestroyRef);
|
|
17
|
+
host = this.elementRef.nativeElement;
|
|
18
|
+
listenerCleanup = [];
|
|
19
|
+
/** The underlying custom element instance. Use to call imperative methods. */
|
|
20
|
+
get nativeElement() {
|
|
21
|
+
return this.host;
|
|
22
|
+
}
|
|
23
|
+
active;
|
|
24
|
+
focused;
|
|
25
|
+
selected;
|
|
26
|
+
emphasized;
|
|
27
|
+
/** Whether this option has children and can be expanded/collapsed. */
|
|
28
|
+
expandable;
|
|
29
|
+
/** Whether this expandable option is currently expanded. */
|
|
30
|
+
expanded;
|
|
31
|
+
/** Whether this option is a child of an expandable parent. */
|
|
32
|
+
childOption;
|
|
33
|
+
/** Whether this expandable parent has at least one selected child. */
|
|
34
|
+
hasSelectedChild;
|
|
35
|
+
/** Type of visual selection */
|
|
36
|
+
variant;
|
|
37
|
+
value;
|
|
38
|
+
contentSlot;
|
|
39
|
+
iconSlot;
|
|
40
|
+
noWrap;
|
|
41
|
+
/** Causes the browser to treat the linked URL as a download. */
|
|
42
|
+
download;
|
|
43
|
+
/** An accessible label that describes the component. It will be applied to aria-label, but not visually rendered. */
|
|
44
|
+
label;
|
|
45
|
+
/** The URL that the hyperlink points to. */
|
|
46
|
+
href;
|
|
47
|
+
/** Where to display the linked URL, as the name for a browsing context (a tab, window, or <iframe>). */
|
|
48
|
+
target;
|
|
49
|
+
/** How much of the referrer to send when following the link. */
|
|
50
|
+
referrerpolicy;
|
|
51
|
+
/** The relationship of the linked URL as space-separated link types. */
|
|
52
|
+
rel;
|
|
53
|
+
managePresenceObservedSlot;
|
|
54
|
+
/** Disable this control. It will not receive focus or events */
|
|
55
|
+
disabled;
|
|
56
|
+
/** The tab index to apply to this control. See general documentation about the tabindex HTML property */
|
|
57
|
+
tabIndex;
|
|
58
|
+
/** announces the item has been added so a parent menu can take ownerships */
|
|
59
|
+
luzmoOptionAddedEvent = output({ alias: 'luzmo-option-added' });
|
|
60
|
+
/** Trick :focus-visible polyfill into thinking keyboard based focus */
|
|
61
|
+
keydownEvent = output({ alias: 'keydown' });
|
|
62
|
+
constructor() {
|
|
63
|
+
this.bindEvents();
|
|
64
|
+
this.destroyRef.onDestroy(() => {
|
|
65
|
+
for (const cleanup of this.listenerCleanup) {
|
|
66
|
+
cleanup();
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
ngOnChanges(changes) {
|
|
71
|
+
for (const key of Object.keys(changes)) {
|
|
72
|
+
switch (key) {
|
|
73
|
+
case 'active':
|
|
74
|
+
this.setHostProperty('active', changes['active'].currentValue);
|
|
75
|
+
break;
|
|
76
|
+
case 'focused':
|
|
77
|
+
this.setHostProperty('focused', changes['focused'].currentValue);
|
|
78
|
+
break;
|
|
79
|
+
case 'selected':
|
|
80
|
+
this.setHostProperty('selected', changes['selected'].currentValue);
|
|
81
|
+
break;
|
|
82
|
+
case 'emphasized':
|
|
83
|
+
this.setHostProperty('emphasized', changes['emphasized'].currentValue);
|
|
84
|
+
break;
|
|
85
|
+
case 'expandable':
|
|
86
|
+
this.setHostProperty('expandable', changes['expandable'].currentValue);
|
|
87
|
+
break;
|
|
88
|
+
case 'expanded':
|
|
89
|
+
this.setHostProperty('expanded', changes['expanded'].currentValue);
|
|
90
|
+
break;
|
|
91
|
+
case 'childOption':
|
|
92
|
+
this.setHostProperty('childOption', changes['childOption'].currentValue);
|
|
93
|
+
break;
|
|
94
|
+
case 'hasSelectedChild':
|
|
95
|
+
this.setHostProperty('hasSelectedChild', changes['hasSelectedChild'].currentValue);
|
|
96
|
+
break;
|
|
97
|
+
case 'variant':
|
|
98
|
+
this.setHostProperty('variant', changes['variant'].currentValue);
|
|
99
|
+
break;
|
|
100
|
+
case 'value':
|
|
101
|
+
this.setHostProperty('value', changes['value'].currentValue);
|
|
102
|
+
break;
|
|
103
|
+
case 'contentSlot':
|
|
104
|
+
this.setHostProperty('contentSlot', changes['contentSlot'].currentValue);
|
|
105
|
+
break;
|
|
106
|
+
case 'iconSlot':
|
|
107
|
+
this.setHostProperty('iconSlot', changes['iconSlot'].currentValue);
|
|
108
|
+
break;
|
|
109
|
+
case 'noWrap':
|
|
110
|
+
this.setHostProperty('noWrap', changes['noWrap'].currentValue);
|
|
111
|
+
break;
|
|
112
|
+
case 'download':
|
|
113
|
+
this.setHostProperty('download', changes['download'].currentValue);
|
|
114
|
+
break;
|
|
115
|
+
case 'label':
|
|
116
|
+
this.setHostProperty('label', changes['label'].currentValue);
|
|
117
|
+
break;
|
|
118
|
+
case 'href':
|
|
119
|
+
this.setHostProperty('href', changes['href'].currentValue);
|
|
120
|
+
break;
|
|
121
|
+
case 'target':
|
|
122
|
+
this.setHostProperty('target', changes['target'].currentValue);
|
|
123
|
+
break;
|
|
124
|
+
case 'referrerpolicy':
|
|
125
|
+
this.setHostProperty('referrerpolicy', changes['referrerpolicy'].currentValue);
|
|
126
|
+
break;
|
|
127
|
+
case 'rel':
|
|
128
|
+
this.setHostProperty('rel', changes['rel'].currentValue);
|
|
129
|
+
break;
|
|
130
|
+
case 'managePresenceObservedSlot':
|
|
131
|
+
this.setHostProperty('managePresenceObservedSlot', changes['managePresenceObservedSlot'].currentValue);
|
|
132
|
+
break;
|
|
133
|
+
case 'disabled':
|
|
134
|
+
this.setHostProperty('disabled', changes['disabled'].currentValue);
|
|
135
|
+
break;
|
|
136
|
+
case 'tabIndex':
|
|
137
|
+
this.setHostProperty('tabIndex', changes['tabIndex'].currentValue);
|
|
138
|
+
break;
|
|
139
|
+
default:
|
|
140
|
+
break;
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* Forward a wrapper @Input to the underlying host element via Renderer2 so
|
|
146
|
+
* the wrapper stays compatible with non-DOM Angular platforms (SSR, tests).
|
|
147
|
+
* Unlike a "skip undefined" guard, this lets consumers reset values back to
|
|
148
|
+
* undefined / null by clearing their bindings.
|
|
149
|
+
*/
|
|
150
|
+
setHostProperty(key, value) {
|
|
151
|
+
this.renderer.setProperty(this.host, key, value);
|
|
152
|
+
}
|
|
153
|
+
bindEvents() {
|
|
154
|
+
this.listenerCleanup.push(this.renderer.listen(this.host, 'luzmo-option-added', (event) => {
|
|
155
|
+
this.luzmoOptionAddedEvent.emit(event);
|
|
156
|
+
}));
|
|
157
|
+
this.listenerCleanup.push(this.renderer.listen(this.host, 'keydown', (event) => {
|
|
158
|
+
this.keydownEvent.emit(event);
|
|
159
|
+
}));
|
|
160
|
+
}
|
|
161
|
+
focus(options) {
|
|
162
|
+
return this.host.focus(options);
|
|
163
|
+
}
|
|
164
|
+
static ɵfac = function LuzmoOption_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || LuzmoOption)(); };
|
|
165
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: LuzmoOption, selectors: [["luzmo-option"]], inputs: { active: "active", focused: "focused", selected: "selected", emphasized: "emphasized", expandable: "expandable", expanded: "expanded", childOption: "childOption", hasSelectedChild: "hasSelectedChild", variant: "variant", value: "value", contentSlot: "contentSlot", iconSlot: "iconSlot", noWrap: "noWrap", download: "download", label: "label", href: "href", target: "target", referrerpolicy: "referrerpolicy", rel: "rel", managePresenceObservedSlot: "managePresenceObservedSlot", disabled: "disabled", tabIndex: "tabIndex" }, outputs: { luzmoOptionAddedEvent: "luzmo-option-added", keydownEvent: "keydown" }, exportAs: ["luzmoOption"], features: [i0.ɵɵNgOnChangesFeature], ngContentSelectors: _c0, decls: 1, vars: 0, template: function LuzmoOption_Template(rf, ctx) { if (rf & 1) {
|
|
166
|
+
i0.ɵɵprojectionDef();
|
|
167
|
+
i0.ɵɵprojection(0);
|
|
168
|
+
} }, encapsulation: 2 });
|
|
169
|
+
}
|
|
170
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(LuzmoOption, [{
|
|
171
|
+
type: Component,
|
|
172
|
+
args: [{
|
|
173
|
+
selector: 'luzmo-option',
|
|
174
|
+
exportAs: 'luzmoOption',
|
|
175
|
+
standalone: true,
|
|
176
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
177
|
+
template: '<ng-content />'
|
|
178
|
+
}]
|
|
179
|
+
}], () => [], { active: [{
|
|
180
|
+
type: Input,
|
|
181
|
+
args: [{ alias: 'active' }]
|
|
182
|
+
}], focused: [{
|
|
183
|
+
type: Input,
|
|
184
|
+
args: [{ alias: 'focused' }]
|
|
185
|
+
}], selected: [{
|
|
186
|
+
type: Input,
|
|
187
|
+
args: [{ alias: 'selected' }]
|
|
188
|
+
}], emphasized: [{
|
|
189
|
+
type: Input,
|
|
190
|
+
args: [{ alias: 'emphasized' }]
|
|
191
|
+
}], expandable: [{
|
|
192
|
+
type: Input,
|
|
193
|
+
args: [{ alias: 'expandable' }]
|
|
194
|
+
}], expanded: [{
|
|
195
|
+
type: Input,
|
|
196
|
+
args: [{ alias: 'expanded' }]
|
|
197
|
+
}], childOption: [{
|
|
198
|
+
type: Input,
|
|
199
|
+
args: [{ alias: 'childOption' }]
|
|
200
|
+
}], hasSelectedChild: [{
|
|
201
|
+
type: Input,
|
|
202
|
+
args: [{ alias: 'hasSelectedChild' }]
|
|
203
|
+
}], variant: [{
|
|
204
|
+
type: Input,
|
|
205
|
+
args: [{ alias: 'variant' }]
|
|
206
|
+
}], value: [{
|
|
207
|
+
type: Input,
|
|
208
|
+
args: [{ alias: 'value' }]
|
|
209
|
+
}], contentSlot: [{
|
|
210
|
+
type: Input,
|
|
211
|
+
args: [{ alias: 'contentSlot' }]
|
|
212
|
+
}], iconSlot: [{
|
|
213
|
+
type: Input,
|
|
214
|
+
args: [{ alias: 'iconSlot' }]
|
|
215
|
+
}], noWrap: [{
|
|
216
|
+
type: Input,
|
|
217
|
+
args: [{ alias: 'noWrap' }]
|
|
218
|
+
}], download: [{
|
|
219
|
+
type: Input,
|
|
220
|
+
args: [{ alias: 'download' }]
|
|
221
|
+
}], label: [{
|
|
222
|
+
type: Input,
|
|
223
|
+
args: [{ alias: 'label' }]
|
|
224
|
+
}], href: [{
|
|
225
|
+
type: Input,
|
|
226
|
+
args: [{ alias: 'href' }]
|
|
227
|
+
}], target: [{
|
|
228
|
+
type: Input,
|
|
229
|
+
args: [{ alias: 'target' }]
|
|
230
|
+
}], referrerpolicy: [{
|
|
231
|
+
type: Input,
|
|
232
|
+
args: [{ alias: 'referrerpolicy' }]
|
|
233
|
+
}], rel: [{
|
|
234
|
+
type: Input,
|
|
235
|
+
args: [{ alias: 'rel' }]
|
|
236
|
+
}], managePresenceObservedSlot: [{
|
|
237
|
+
type: Input,
|
|
238
|
+
args: [{ alias: 'managePresenceObservedSlot' }]
|
|
239
|
+
}], disabled: [{
|
|
240
|
+
type: Input,
|
|
241
|
+
args: [{ alias: 'disabled' }]
|
|
242
|
+
}], tabIndex: [{
|
|
243
|
+
type: Input,
|
|
244
|
+
args: [{ alias: 'tabIndex' }]
|
|
245
|
+
}], luzmoOptionAddedEvent: [{ type: i0.Output, args: ["luzmo-option-added"] }], keydownEvent: [{ type: i0.Output, args: ["keydown"] }] }); })();
|
|
246
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(LuzmoOption, { className: "LuzmoOption", filePath: "components/option.ts", lineNumber: 21 }); })();
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { OnChanges, SimpleChanges } from '@angular/core';
|
|
2
|
+
import '@luzmo/lucero/options';
|
|
3
|
+
import type { LuzmoOptionsDivider as LuzmoOptionsDividerHostElement } from '@luzmo/lucero/options';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export type { FlatOptionValue, OptionChildren, OptionIconRenderer, OptionValue } from '@luzmo/lucero/options';
|
|
6
|
+
export declare class LuzmoOptionsDivider 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(): LuzmoOptionsDividerHostElement;
|
|
14
|
+
size?: ('xxs' | 'xs' | 's' | 'm' | 'l' | 'xl' | 'xxl');
|
|
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
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<LuzmoOptionsDivider, never>;
|
|
26
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<LuzmoOptionsDivider, "luzmo-options-divider", ["luzmoOptionsDivider"], { "size": { "alias": "size"; "required": false; }; }, {}, never, ["*"], true, never>;
|
|
27
|
+
}
|
|
28
|
+
/** The underlying custom element type for LuzmoOptionsDivider */
|
|
29
|
+
export type LuzmoOptionsDividerElement = LuzmoOptionsDividerHostElement;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { ChangeDetectionStrategy, Component, DestroyRef, ElementRef, inject, Input, Renderer2 } from '@angular/core';
|
|
2
|
+
import '@luzmo/lucero/options';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
const _c0 = ["*"];
|
|
5
|
+
/**
|
|
6
|
+
* Angular wrapper component for <luzmo-options-divider>
|
|
7
|
+
*/
|
|
8
|
+
export class LuzmoOptionsDivider {
|
|
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
|
+
size;
|
|
19
|
+
constructor() {
|
|
20
|
+
this.bindEvents();
|
|
21
|
+
this.destroyRef.onDestroy(() => {
|
|
22
|
+
for (const cleanup of this.listenerCleanup) {
|
|
23
|
+
cleanup();
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
ngOnChanges(changes) {
|
|
28
|
+
for (const key of Object.keys(changes)) {
|
|
29
|
+
switch (key) {
|
|
30
|
+
case 'size':
|
|
31
|
+
this.setHostProperty('size', changes['size'].currentValue);
|
|
32
|
+
break;
|
|
33
|
+
default:
|
|
34
|
+
break;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Forward a wrapper @Input to the underlying host element via Renderer2 so
|
|
40
|
+
* the wrapper stays compatible with non-DOM Angular platforms (SSR, tests).
|
|
41
|
+
* Unlike a "skip undefined" guard, this lets consumers reset values back to
|
|
42
|
+
* undefined / null by clearing their bindings.
|
|
43
|
+
*/
|
|
44
|
+
setHostProperty(key, value) {
|
|
45
|
+
this.renderer.setProperty(this.host, key, value);
|
|
46
|
+
}
|
|
47
|
+
bindEvents() {
|
|
48
|
+
// No custom events for this wrapper.
|
|
49
|
+
}
|
|
50
|
+
static ɵfac = function LuzmoOptionsDivider_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || LuzmoOptionsDivider)(); };
|
|
51
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: LuzmoOptionsDivider, selectors: [["luzmo-options-divider"]], inputs: { size: "size" }, exportAs: ["luzmoOptionsDivider"], features: [i0.ɵɵNgOnChangesFeature], ngContentSelectors: _c0, decls: 1, vars: 0, template: function LuzmoOptionsDivider_Template(rf, ctx) { if (rf & 1) {
|
|
52
|
+
i0.ɵɵprojectionDef();
|
|
53
|
+
i0.ɵɵprojection(0);
|
|
54
|
+
} }, encapsulation: 2 });
|
|
55
|
+
}
|
|
56
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(LuzmoOptionsDivider, [{
|
|
57
|
+
type: Component,
|
|
58
|
+
args: [{
|
|
59
|
+
selector: 'luzmo-options-divider',
|
|
60
|
+
exportAs: 'luzmoOptionsDivider',
|
|
61
|
+
standalone: true,
|
|
62
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
63
|
+
template: '<ng-content />'
|
|
64
|
+
}]
|
|
65
|
+
}], () => [], { size: [{
|
|
66
|
+
type: Input,
|
|
67
|
+
args: [{ alias: 'size' }]
|
|
68
|
+
}] }); })();
|
|
69
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(LuzmoOptionsDivider, { className: "LuzmoOptionsDivider", filePath: "components/options-divider.ts", lineNumber: 16 }); })();
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { OnChanges, SimpleChanges } from '@angular/core';
|
|
2
2
|
import { ControlValueAccessor } from '@angular/forms';
|
|
3
3
|
import '@luzmo/lucero/options';
|
|
4
|
-
import type { LuzmoOptions as LuzmoOptionsHostElement } from '@luzmo/lucero/options';
|
|
4
|
+
import type { LuzmoOptions as LuzmoOptionsHostElement, OptionIconRenderer, OptionValue } from '@luzmo/lucero/options';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
|
+
export type { FlatOptionValue, OptionChildren, OptionIconRenderer, OptionValue } from '@luzmo/lucero/options';
|
|
6
7
|
export declare class LuzmoOptions implements OnChanges, ControlValueAccessor {
|
|
7
8
|
private readonly elementRef;
|
|
8
9
|
private readonly renderer;
|
|
@@ -17,12 +18,12 @@ export declare class LuzmoOptions implements OnChanges, ControlValueAccessor {
|
|
|
17
18
|
emphasized?: boolean;
|
|
18
19
|
pending?: boolean;
|
|
19
20
|
/** options - The options to be listed in the options menu OptionValue is an object with the following properties: - label: string - value: string | number | null - disabled: boolean - divider: boolean - icon: IconDefinition - imgSrc: string */
|
|
20
|
-
options?:
|
|
21
|
+
options?: OptionValue[];
|
|
21
22
|
noWrap?: boolean;
|
|
22
23
|
/** value - The value of the selected options */
|
|
23
24
|
value?: string | number | null;
|
|
24
25
|
/** Optional icon renderer callback for option icon area. When it returns null, default icon rendering is used. */
|
|
25
|
-
optionIconRenderer?:
|
|
26
|
+
optionIconRenderer?: OptionIconRenderer;
|
|
26
27
|
size?: ('xxs' | 'xs' | 's' | 'm' | 'l' | 'xl' | 'xxl');
|
|
27
28
|
/** Announces that the user has scrolled within the options menu. Only fires when the options menu is virtualized. */
|
|
28
29
|
readonly luzmoScrolledEvent: import("@angular/core").OutputEmitterRef<CustomEvent<unknown>>;
|
|
@@ -214,4 +214,4 @@ export class LuzmoOptions {
|
|
|
214
214
|
type: Input,
|
|
215
215
|
args: [{ alias: 'size' }]
|
|
216
216
|
}], luzmoScrolledEvent: [{ type: i0.Output, args: ["luzmo-scrolled"] }], changeEvent: [{ type: i0.Output, args: ["change"] }], luzmoExceededTopEvent: [{ type: i0.Output, args: ["luzmo-exceeded-top"] }], luzmoExceededBottomEvent: [{ type: i0.Output, args: ["luzmo-exceeded-bottom"] }] }); })();
|
|
217
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(LuzmoOptions, { className: "LuzmoOptions", filePath: "components/options.ts", lineNumber:
|
|
217
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(LuzmoOptions, { className: "LuzmoOptions", filePath: "components/options.ts", lineNumber: 26 }); })();
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { OnChanges, SimpleChanges } from '@angular/core';
|
|
2
|
+
import '@luzmo/lucero/overlay';
|
|
3
|
+
import type { LuzmoOverlayTrigger as LuzmoOverlayTriggerHostElement, LuzmoOverlay, OverlayContentTypes, TriggeredByType } from '@luzmo/lucero/overlay';
|
|
4
|
+
import type { Placement as __extt_Placement } from '@floating-ui/dom';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export type { OverlayContentTypes, TriggeredByType } from '@luzmo/lucero/overlay';
|
|
7
|
+
export declare class LuzmoOverlayTrigger implements OnChanges {
|
|
8
|
+
private readonly elementRef;
|
|
9
|
+
private readonly renderer;
|
|
10
|
+
private readonly destroyRef;
|
|
11
|
+
private readonly host;
|
|
12
|
+
private readonly listenerCleanup;
|
|
13
|
+
/** The underlying custom element instance. Use to call imperative methods. */
|
|
14
|
+
get nativeElement(): LuzmoOverlayTriggerHostElement;
|
|
15
|
+
content?: string;
|
|
16
|
+
/** Optional property to optimize performance and prevent race conditions. By explicitly declaring which content types are used (e.g. "click", "longpress hover"), we can avoid: 1. Extra renders from unnecessary slot reparenting 2. Potential infinite render loops during content detection 3. Race conditions during slot assignment By only returning overlay wrappers for explicitly declared content types, we minimize unecessary DOM nodes, operations and ensure a more stable rendering behavior. */
|
|
17
|
+
triggeredBy?: TriggeredByType;
|
|
18
|
+
placement?: __extt_Placement;
|
|
19
|
+
type?: (Extract<(('auto' | 'hint' | 'manual' | 'modal' | 'page')), 'inline' | 'modal' | 'replace'>);
|
|
20
|
+
offset?: number;
|
|
21
|
+
open?: OverlayContentTypes;
|
|
22
|
+
disabled?: boolean;
|
|
23
|
+
receivesFocus?: 'true' | 'false' | 'auto';
|
|
24
|
+
clickOverlayElement?: LuzmoOverlay;
|
|
25
|
+
longpressOverlayElement?: LuzmoOverlay;
|
|
26
|
+
hoverOverlayElement?: LuzmoOverlay;
|
|
27
|
+
/** Announces that the overlay has been opened */
|
|
28
|
+
readonly luzmoOpenedEvent: import("@angular/core").OutputEmitterRef<CustomEvent<unknown>>;
|
|
29
|
+
/** Announces that the overlay has been closed */
|
|
30
|
+
readonly luzmoClosedEvent: import("@angular/core").OutputEmitterRef<CustomEvent<unknown>>;
|
|
31
|
+
constructor();
|
|
32
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
33
|
+
/**
|
|
34
|
+
* Forward a wrapper @Input to the underlying host element via Renderer2 so
|
|
35
|
+
* the wrapper stays compatible with non-DOM Angular platforms (SSR, tests).
|
|
36
|
+
* Unlike a "skip undefined" guard, this lets consumers reset values back to
|
|
37
|
+
* undefined / null by clearing their bindings.
|
|
38
|
+
*/
|
|
39
|
+
private setHostProperty;
|
|
40
|
+
private bindEvents;
|
|
41
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<LuzmoOverlayTrigger, never>;
|
|
42
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<LuzmoOverlayTrigger, "luzmo-overlay-trigger", ["luzmoOverlayTrigger"], { "content": { "alias": "content"; "required": false; }; "triggeredBy": { "alias": "triggeredBy"; "required": false; }; "placement": { "alias": "placement"; "required": false; }; "type": { "alias": "type"; "required": false; }; "offset": { "alias": "offset"; "required": false; }; "open": { "alias": "open"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "receivesFocus": { "alias": "receivesFocus"; "required": false; }; "clickOverlayElement": { "alias": "clickOverlayElement"; "required": false; }; "longpressOverlayElement": { "alias": "longpressOverlayElement"; "required": false; }; "hoverOverlayElement": { "alias": "hoverOverlayElement"; "required": false; }; }, { "luzmoOpenedEvent": "luzmo-opened"; "luzmoClosedEvent": "luzmo-closed"; }, never, ["*"], true, never>;
|
|
43
|
+
}
|
|
44
|
+
/** The underlying custom element type for LuzmoOverlayTrigger */
|
|
45
|
+
export type LuzmoOverlayTriggerElement = LuzmoOverlayTriggerHostElement;
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
import { ChangeDetectionStrategy, Component, DestroyRef, ElementRef, inject, Input, output, Renderer2 } from '@angular/core';
|
|
2
|
+
import '@luzmo/lucero/overlay';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
const _c0 = ["*"];
|
|
5
|
+
/**
|
|
6
|
+
* Angular wrapper component for <luzmo-overlay-trigger>
|
|
7
|
+
*
|
|
8
|
+
* @slot trigger - The content that will trigger the various overlays
|
|
9
|
+
* @slot hover-content - The content that will be displayed on hover
|
|
10
|
+
* @slot click-content - The content that will be displayed on click
|
|
11
|
+
* @slot longpress-content - The content that will be displayed on longpress
|
|
12
|
+
* @slot longpress-describedby-descriptor - Description for longpress content
|
|
13
|
+
*/
|
|
14
|
+
export class LuzmoOverlayTrigger {
|
|
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
|
+
content;
|
|
25
|
+
/** Optional property to optimize performance and prevent race conditions. By explicitly declaring which content types are used (e.g. "click", "longpress hover"), we can avoid: 1. Extra renders from unnecessary slot reparenting 2. Potential infinite render loops during content detection 3. Race conditions during slot assignment By only returning overlay wrappers for explicitly declared content types, we minimize unecessary DOM nodes, operations and ensure a more stable rendering behavior. */
|
|
26
|
+
triggeredBy;
|
|
27
|
+
placement;
|
|
28
|
+
type;
|
|
29
|
+
offset;
|
|
30
|
+
open;
|
|
31
|
+
disabled;
|
|
32
|
+
receivesFocus;
|
|
33
|
+
clickOverlayElement;
|
|
34
|
+
longpressOverlayElement;
|
|
35
|
+
hoverOverlayElement;
|
|
36
|
+
/** Announces that the overlay has been opened */
|
|
37
|
+
luzmoOpenedEvent = output({ alias: 'luzmo-opened' });
|
|
38
|
+
/** Announces that the overlay has been closed */
|
|
39
|
+
luzmoClosedEvent = output({ alias: 'luzmo-closed' });
|
|
40
|
+
constructor() {
|
|
41
|
+
this.bindEvents();
|
|
42
|
+
this.destroyRef.onDestroy(() => {
|
|
43
|
+
for (const cleanup of this.listenerCleanup) {
|
|
44
|
+
cleanup();
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
ngOnChanges(changes) {
|
|
49
|
+
for (const key of Object.keys(changes)) {
|
|
50
|
+
switch (key) {
|
|
51
|
+
case 'content':
|
|
52
|
+
this.setHostProperty('content', changes['content'].currentValue);
|
|
53
|
+
break;
|
|
54
|
+
case 'triggeredBy':
|
|
55
|
+
this.setHostProperty('triggeredBy', changes['triggeredBy'].currentValue);
|
|
56
|
+
break;
|
|
57
|
+
case 'placement':
|
|
58
|
+
this.setHostProperty('placement', changes['placement'].currentValue);
|
|
59
|
+
break;
|
|
60
|
+
case 'type':
|
|
61
|
+
this.setHostProperty('type', changes['type'].currentValue);
|
|
62
|
+
break;
|
|
63
|
+
case 'offset':
|
|
64
|
+
this.setHostProperty('offset', changes['offset'].currentValue);
|
|
65
|
+
break;
|
|
66
|
+
case 'open':
|
|
67
|
+
this.setHostProperty('open', changes['open'].currentValue);
|
|
68
|
+
break;
|
|
69
|
+
case 'disabled':
|
|
70
|
+
this.setHostProperty('disabled', changes['disabled'].currentValue);
|
|
71
|
+
break;
|
|
72
|
+
case 'receivesFocus':
|
|
73
|
+
this.setHostProperty('receivesFocus', changes['receivesFocus'].currentValue);
|
|
74
|
+
break;
|
|
75
|
+
case 'clickOverlayElement':
|
|
76
|
+
this.setHostProperty('clickOverlayElement', changes['clickOverlayElement'].currentValue);
|
|
77
|
+
break;
|
|
78
|
+
case 'longpressOverlayElement':
|
|
79
|
+
this.setHostProperty('longpressOverlayElement', changes['longpressOverlayElement'].currentValue);
|
|
80
|
+
break;
|
|
81
|
+
case 'hoverOverlayElement':
|
|
82
|
+
this.setHostProperty('hoverOverlayElement', changes['hoverOverlayElement'].currentValue);
|
|
83
|
+
break;
|
|
84
|
+
default:
|
|
85
|
+
break;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Forward a wrapper @Input to the underlying host element via Renderer2 so
|
|
91
|
+
* the wrapper stays compatible with non-DOM Angular platforms (SSR, tests).
|
|
92
|
+
* Unlike a "skip undefined" guard, this lets consumers reset values back to
|
|
93
|
+
* undefined / null by clearing their bindings.
|
|
94
|
+
*/
|
|
95
|
+
setHostProperty(key, value) {
|
|
96
|
+
this.renderer.setProperty(this.host, key, value);
|
|
97
|
+
}
|
|
98
|
+
bindEvents() {
|
|
99
|
+
this.listenerCleanup.push(this.renderer.listen(this.host, 'luzmo-opened', (event) => {
|
|
100
|
+
this.luzmoOpenedEvent.emit(event);
|
|
101
|
+
}));
|
|
102
|
+
this.listenerCleanup.push(this.renderer.listen(this.host, 'luzmo-closed', (event) => {
|
|
103
|
+
this.luzmoClosedEvent.emit(event);
|
|
104
|
+
}));
|
|
105
|
+
}
|
|
106
|
+
static ɵfac = function LuzmoOverlayTrigger_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || LuzmoOverlayTrigger)(); };
|
|
107
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: LuzmoOverlayTrigger, selectors: [["luzmo-overlay-trigger"]], inputs: { content: "content", triggeredBy: "triggeredBy", placement: "placement", type: "type", offset: "offset", open: "open", disabled: "disabled", receivesFocus: "receivesFocus", clickOverlayElement: "clickOverlayElement", longpressOverlayElement: "longpressOverlayElement", hoverOverlayElement: "hoverOverlayElement" }, outputs: { luzmoOpenedEvent: "luzmo-opened", luzmoClosedEvent: "luzmo-closed" }, exportAs: ["luzmoOverlayTrigger"], features: [i0.ɵɵNgOnChangesFeature], ngContentSelectors: _c0, decls: 1, vars: 0, template: function LuzmoOverlayTrigger_Template(rf, ctx) { if (rf & 1) {
|
|
108
|
+
i0.ɵɵprojectionDef();
|
|
109
|
+
i0.ɵɵprojection(0);
|
|
110
|
+
} }, encapsulation: 2 });
|
|
111
|
+
}
|
|
112
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(LuzmoOverlayTrigger, [{
|
|
113
|
+
type: Component,
|
|
114
|
+
args: [{
|
|
115
|
+
selector: 'luzmo-overlay-trigger',
|
|
116
|
+
exportAs: 'luzmoOverlayTrigger',
|
|
117
|
+
standalone: true,
|
|
118
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
119
|
+
template: '<ng-content />'
|
|
120
|
+
}]
|
|
121
|
+
}], () => [], { content: [{
|
|
122
|
+
type: Input,
|
|
123
|
+
args: [{ alias: 'content' }]
|
|
124
|
+
}], triggeredBy: [{
|
|
125
|
+
type: Input,
|
|
126
|
+
args: [{ alias: 'triggeredBy' }]
|
|
127
|
+
}], placement: [{
|
|
128
|
+
type: Input,
|
|
129
|
+
args: [{ alias: 'placement' }]
|
|
130
|
+
}], type: [{
|
|
131
|
+
type: Input,
|
|
132
|
+
args: [{ alias: 'type' }]
|
|
133
|
+
}], offset: [{
|
|
134
|
+
type: Input,
|
|
135
|
+
args: [{ alias: 'offset' }]
|
|
136
|
+
}], open: [{
|
|
137
|
+
type: Input,
|
|
138
|
+
args: [{ alias: 'open' }]
|
|
139
|
+
}], disabled: [{
|
|
140
|
+
type: Input,
|
|
141
|
+
args: [{ alias: 'disabled' }]
|
|
142
|
+
}], receivesFocus: [{
|
|
143
|
+
type: Input,
|
|
144
|
+
args: [{ alias: 'receivesFocus' }]
|
|
145
|
+
}], clickOverlayElement: [{
|
|
146
|
+
type: Input,
|
|
147
|
+
args: [{ alias: 'clickOverlayElement' }]
|
|
148
|
+
}], longpressOverlayElement: [{
|
|
149
|
+
type: Input,
|
|
150
|
+
args: [{ alias: 'longpressOverlayElement' }]
|
|
151
|
+
}], hoverOverlayElement: [{
|
|
152
|
+
type: Input,
|
|
153
|
+
args: [{ alias: 'hoverOverlayElement' }]
|
|
154
|
+
}], luzmoOpenedEvent: [{ type: i0.Output, args: ["luzmo-opened"] }], luzmoClosedEvent: [{ type: i0.Output, args: ["luzmo-closed"] }] }); })();
|
|
155
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(LuzmoOverlayTrigger, { className: "LuzmoOverlayTrigger", filePath: "components/overlay-trigger.ts", lineNumber: 23 }); })();
|
|
@@ -2,6 +2,7 @@ import { OnChanges, SimpleChanges } from '@angular/core';
|
|
|
2
2
|
import '@luzmo/lucero/overlay';
|
|
3
3
|
import type { LuzmoOverlay as LuzmoOverlayHostElement } from '@luzmo/lucero/overlay';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
|
+
export type { OverlayContentTypes, TriggeredByType } from '@luzmo/lucero/overlay';
|
|
5
6
|
export declare class LuzmoOverlay implements OnChanges {
|
|
6
7
|
private readonly elementRef;
|
|
7
8
|
private readonly renderer;
|
|
@@ -19,7 +20,7 @@ export declare class LuzmoOverlay implements OnChanges {
|
|
|
19
20
|
/** A query to gather all elements slotted into the default slot, excluding elements with the slot name "longpress-describedby-descriptor". */
|
|
20
21
|
elements?: unknown;
|
|
21
22
|
/** A reference to the parent overlay that should be force-closed, if any. */
|
|
22
|
-
parentOverlayToForceClose?:
|
|
23
|
+
parentOverlayToForceClose?: LuzmoOverlayHostElement;
|
|
23
24
|
/** The `offset` property accepts either a single number to define the offset of the Overlay along the main axis from the trigger, or a 2-tuple to define the offset along both the main axis and the cross axis. This option has no effect when there is no trigger element. */
|
|
24
25
|
offset?: number | [number, number];
|
|
25
26
|
/** Indicates whether the Overlay is projected onto the "top layer" or not. When set to `true`, the overlay is open and visible. When set to `false`, the overlay is closed and hidden. */
|
|
@@ -209,4 +209,4 @@ export class LuzmoOverlay {
|
|
|
209
209
|
type: Input,
|
|
210
210
|
args: [{ alias: 'type' }]
|
|
211
211
|
}], luzmoOpenedEvent: [{ type: i0.Output, args: ["luzmo-opened"] }], luzmoClosedEvent: [{ type: i0.Output, args: ["luzmo-closed"] }], slottableRequestEvent: [{ type: i0.Output, args: ["slottable-request"] }] }); })();
|
|
212
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(LuzmoOverlay, { className: "LuzmoOverlay", filePath: "components/overlay.ts", lineNumber:
|
|
212
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(LuzmoOverlay, { className: "LuzmoOverlay", filePath: "components/overlay.ts", lineNumber: 16 }); })();
|
package/esm/components/tag.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ export declare class LuzmoTag implements OnChanges {
|
|
|
13
13
|
get nativeElement(): LuzmoTagHostElement;
|
|
14
14
|
/** Color variant. Optional — when unset the tag keeps its neutral default appearance. Accepts the same semantic and non-semantic palette as `luzmo-badge`. Invalid values reset the tag to its variantless default. */
|
|
15
15
|
variant?: TagVariants;
|
|
16
|
-
/** Visual treatment of the color variant: `outline` (default) draws the variant color as border and text, `fill` paints
|
|
16
|
+
/** Visual treatment of the color variant: `outline` (default) draws the variant color as border and text, `subtle` adds a tinted surface, and `fill` paints the variant color as the background. Only takes effect when `variant` is set. */
|
|
17
17
|
treatment?: TagTreatments;
|
|
18
18
|
deletable?: boolean;
|
|
19
19
|
disabled?: boolean;
|
package/esm/components/tag.js
CHANGED
|
@@ -21,7 +21,7 @@ export class LuzmoTag {
|
|
|
21
21
|
}
|
|
22
22
|
/** Color variant. Optional — when unset the tag keeps its neutral default appearance. Accepts the same semantic and non-semantic palette as `luzmo-badge`. Invalid values reset the tag to its variantless default. */
|
|
23
23
|
variant;
|
|
24
|
-
/** Visual treatment of the color variant: `outline` (default) draws the variant color as border and text, `fill` paints
|
|
24
|
+
/** Visual treatment of the color variant: `outline` (default) draws the variant color as border and text, `subtle` adds a tinted surface, and `fill` paints the variant color as the background. Only takes effect when `variant` is set. */
|
|
25
25
|
treatment;
|
|
26
26
|
deletable;
|
|
27
27
|
disabled;
|
package/esm/index.d.ts
CHANGED
|
@@ -38,8 +38,11 @@ import { LuzmoMenuGroup } from './components/menu-group.js';
|
|
|
38
38
|
import { LuzmoMenuItem } from './components/menu-item.js';
|
|
39
39
|
import { LuzmoMultiLanguageField } from './components/multi-language-field.js';
|
|
40
40
|
import { LuzmoNumberField } from './components/number-field.js';
|
|
41
|
+
import { LuzmoOption } from './components/option.js';
|
|
41
42
|
import { LuzmoOptions } from './components/options.js';
|
|
43
|
+
import { LuzmoOptionsDivider } from './components/options-divider.js';
|
|
42
44
|
import { LuzmoOverlay } from './components/overlay.js';
|
|
45
|
+
import { LuzmoOverlayTrigger } from './components/overlay-trigger.js';
|
|
43
46
|
import { LuzmoPicker } from './components/picker.js';
|
|
44
47
|
import { LuzmoPickerButton } from './components/picker-button.js';
|
|
45
48
|
import { LuzmoPopover } from './components/popover.js';
|
|
@@ -108,8 +111,11 @@ export { LuzmoMenuGroup, type LuzmoMenuGroupElement } from './components/menu-gr
|
|
|
108
111
|
export { LuzmoMenuItem, type LuzmoMenuItemElement } from './components/menu-item.js';
|
|
109
112
|
export { LuzmoMultiLanguageField, type LuzmoMultiLanguageFieldElement } from './components/multi-language-field.js';
|
|
110
113
|
export { LuzmoNumberField, type LuzmoNumberFieldElement } from './components/number-field.js';
|
|
114
|
+
export { LuzmoOption, type LuzmoOptionElement } from './components/option.js';
|
|
111
115
|
export { LuzmoOptions, type LuzmoOptionsElement } from './components/options.js';
|
|
116
|
+
export { LuzmoOptionsDivider, type LuzmoOptionsDividerElement } from './components/options-divider.js';
|
|
112
117
|
export { LuzmoOverlay, type LuzmoOverlayElement } from './components/overlay.js';
|
|
118
|
+
export { LuzmoOverlayTrigger, type LuzmoOverlayTriggerElement } from './components/overlay-trigger.js';
|
|
113
119
|
export { LuzmoPicker, type LuzmoPickerElement } from './components/picker.js';
|
|
114
120
|
export { LuzmoPickerButton, type LuzmoPickerButtonElement } from './components/picker-button.js';
|
|
115
121
|
export { LuzmoPopover, type LuzmoPopoverElement } from './components/popover.js';
|
|
@@ -138,6 +144,6 @@ export { LuzmoToast, type LuzmoToastElement } from './components/toast.js';
|
|
|
138
144
|
export { LuzmoTooltip, type LuzmoTooltipElement } from './components/tooltip.js';
|
|
139
145
|
export { LuzmoTopNav, type LuzmoTopNavElement } from './components/top-nav.js';
|
|
140
146
|
export { LuzmoTopNavItem, type LuzmoTopNavItemElement } from './components/top-nav-item.js';
|
|
141
|
-
export declare const LUZMO_ANGULAR_COMPONENTS: readonly [typeof LuzmoAccordion, typeof LuzmoAccordionItem, typeof LuzmoActionBar, typeof LuzmoActionButton, typeof LuzmoActionGroup, typeof LuzmoActionMenu, typeof LuzmoAvatar, typeof LuzmoBadge, typeof LuzmoButton, typeof LuzmoButtonGroup, typeof LuzmoCalendar, typeof LuzmoChatMessage, typeof LuzmoChatMessageGroup, typeof LuzmoCheckbox, typeof LuzmoClearButton, typeof LuzmoCloseButton, typeof LuzmoColorArea, typeof LuzmoColorField, typeof LuzmoColorHandle, typeof LuzmoColorLoupe, typeof LuzmoColorMenu, typeof LuzmoColorPalette, typeof LuzmoColorPaletteGroup, typeof LuzmoColorPicker, typeof LuzmoColorSlider, typeof LuzmoDateRangePicker, typeof LuzmoDateTimePicker, typeof LuzmoDivider, typeof LuzmoFieldGroup, typeof LuzmoFieldLabel, typeof LuzmoHelpText, typeof LuzmoIcon, typeof LuzmoInfieldButton, typeof LuzmoLabel, typeof LuzmoMenu, typeof LuzmoMenuDivider, typeof LuzmoMenuGroup, typeof LuzmoMenuItem, typeof LuzmoMultiLanguageField, typeof LuzmoNumberField, typeof LuzmoOptions, typeof LuzmoOverlay, typeof LuzmoPicker, typeof LuzmoPickerButton, typeof LuzmoPopover, typeof LuzmoProgressBar, typeof LuzmoProgressCircle, typeof LuzmoProgressSteps, typeof LuzmoPromptBox, typeof LuzmoRadio, typeof LuzmoRadioGroup, typeof LuzmoSearch, typeof LuzmoSelect, typeof LuzmoSkeletonLoader, typeof LuzmoSlider, typeof LuzmoStatusLight, typeof LuzmoSwatch, typeof LuzmoSwatchGroup, typeof LuzmoSwitch, typeof LuzmoTab, typeof LuzmoTabPanel, typeof LuzmoTabs, typeof LuzmoTabsOverflow, typeof LuzmoTag, typeof LuzmoTags, typeof LuzmoTextField, typeof LuzmoToast, typeof LuzmoTooltip, typeof LuzmoTopNav, typeof LuzmoTopNavItem];
|
|
142
|
-
export declare const LUZMO_ANGULAR_COMPONENT_NAMES: readonly ["LuzmoAccordion", "LuzmoAccordionItem", "LuzmoActionBar", "LuzmoActionButton", "LuzmoActionGroup", "LuzmoActionMenu", "LuzmoAvatar", "LuzmoBadge", "LuzmoButton", "LuzmoButtonGroup", "LuzmoCalendar", "LuzmoChatMessage", "LuzmoChatMessageGroup", "LuzmoCheckbox", "LuzmoClearButton", "LuzmoCloseButton", "LuzmoColorArea", "LuzmoColorField", "LuzmoColorHandle", "LuzmoColorLoupe", "LuzmoColorMenu", "LuzmoColorPalette", "LuzmoColorPaletteGroup", "LuzmoColorPicker", "LuzmoColorSlider", "LuzmoDateRangePicker", "LuzmoDateTimePicker", "LuzmoDivider", "LuzmoFieldGroup", "LuzmoFieldLabel", "LuzmoHelpText", "LuzmoIcon", "LuzmoInfieldButton", "LuzmoLabel", "LuzmoMenu", "LuzmoMenuDivider", "LuzmoMenuGroup", "LuzmoMenuItem", "LuzmoMultiLanguageField", "LuzmoNumberField", "LuzmoOptions", "LuzmoOverlay", "LuzmoPicker", "LuzmoPickerButton", "LuzmoPopover", "LuzmoProgressBar", "LuzmoProgressCircle", "LuzmoProgressSteps", "LuzmoPromptBox", "LuzmoRadio", "LuzmoRadioGroup", "LuzmoSearch", "LuzmoSelect", "LuzmoSkeletonLoader", "LuzmoSlider", "LuzmoStatusLight", "LuzmoSwatch", "LuzmoSwatchGroup", "LuzmoSwitch", "LuzmoTab", "LuzmoTabPanel", "LuzmoTabs", "LuzmoTabsOverflow", "LuzmoTag", "LuzmoTags", "LuzmoTextField", "LuzmoToast", "LuzmoTooltip", "LuzmoTopNav", "LuzmoTopNavItem"];
|
|
147
|
+
export declare const LUZMO_ANGULAR_COMPONENTS: readonly [typeof LuzmoAccordion, typeof LuzmoAccordionItem, typeof LuzmoActionBar, typeof LuzmoActionButton, typeof LuzmoActionGroup, typeof LuzmoActionMenu, typeof LuzmoAvatar, typeof LuzmoBadge, typeof LuzmoButton, typeof LuzmoButtonGroup, typeof LuzmoCalendar, typeof LuzmoChatMessage, typeof LuzmoChatMessageGroup, typeof LuzmoCheckbox, typeof LuzmoClearButton, typeof LuzmoCloseButton, typeof LuzmoColorArea, typeof LuzmoColorField, typeof LuzmoColorHandle, typeof LuzmoColorLoupe, typeof LuzmoColorMenu, typeof LuzmoColorPalette, typeof LuzmoColorPaletteGroup, typeof LuzmoColorPicker, typeof LuzmoColorSlider, typeof LuzmoDateRangePicker, typeof LuzmoDateTimePicker, typeof LuzmoDivider, typeof LuzmoFieldGroup, typeof LuzmoFieldLabel, typeof LuzmoHelpText, typeof LuzmoIcon, typeof LuzmoInfieldButton, typeof LuzmoLabel, typeof LuzmoMenu, typeof LuzmoMenuDivider, typeof LuzmoMenuGroup, typeof LuzmoMenuItem, typeof LuzmoMultiLanguageField, typeof LuzmoNumberField, typeof LuzmoOption, typeof LuzmoOptions, typeof LuzmoOptionsDivider, typeof LuzmoOverlay, typeof LuzmoOverlayTrigger, typeof LuzmoPicker, typeof LuzmoPickerButton, typeof LuzmoPopover, typeof LuzmoProgressBar, typeof LuzmoProgressCircle, typeof LuzmoProgressSteps, typeof LuzmoPromptBox, typeof LuzmoRadio, typeof LuzmoRadioGroup, typeof LuzmoSearch, typeof LuzmoSelect, typeof LuzmoSkeletonLoader, typeof LuzmoSlider, typeof LuzmoStatusLight, typeof LuzmoSwatch, typeof LuzmoSwatchGroup, typeof LuzmoSwitch, typeof LuzmoTab, typeof LuzmoTabPanel, typeof LuzmoTabs, typeof LuzmoTabsOverflow, typeof LuzmoTag, typeof LuzmoTags, typeof LuzmoTextField, typeof LuzmoToast, typeof LuzmoTooltip, typeof LuzmoTopNav, typeof LuzmoTopNavItem];
|
|
148
|
+
export declare const LUZMO_ANGULAR_COMPONENT_NAMES: readonly ["LuzmoAccordion", "LuzmoAccordionItem", "LuzmoActionBar", "LuzmoActionButton", "LuzmoActionGroup", "LuzmoActionMenu", "LuzmoAvatar", "LuzmoBadge", "LuzmoButton", "LuzmoButtonGroup", "LuzmoCalendar", "LuzmoChatMessage", "LuzmoChatMessageGroup", "LuzmoCheckbox", "LuzmoClearButton", "LuzmoCloseButton", "LuzmoColorArea", "LuzmoColorField", "LuzmoColorHandle", "LuzmoColorLoupe", "LuzmoColorMenu", "LuzmoColorPalette", "LuzmoColorPaletteGroup", "LuzmoColorPicker", "LuzmoColorSlider", "LuzmoDateRangePicker", "LuzmoDateTimePicker", "LuzmoDivider", "LuzmoFieldGroup", "LuzmoFieldLabel", "LuzmoHelpText", "LuzmoIcon", "LuzmoInfieldButton", "LuzmoLabel", "LuzmoMenu", "LuzmoMenuDivider", "LuzmoMenuGroup", "LuzmoMenuItem", "LuzmoMultiLanguageField", "LuzmoNumberField", "LuzmoOption", "LuzmoOptions", "LuzmoOptionsDivider", "LuzmoOverlay", "LuzmoOverlayTrigger", "LuzmoPicker", "LuzmoPickerButton", "LuzmoPopover", "LuzmoProgressBar", "LuzmoProgressCircle", "LuzmoProgressSteps", "LuzmoPromptBox", "LuzmoRadio", "LuzmoRadioGroup", "LuzmoSearch", "LuzmoSelect", "LuzmoSkeletonLoader", "LuzmoSlider", "LuzmoStatusLight", "LuzmoSwatch", "LuzmoSwatchGroup", "LuzmoSwitch", "LuzmoTab", "LuzmoTabPanel", "LuzmoTabs", "LuzmoTabsOverflow", "LuzmoTag", "LuzmoTags", "LuzmoTextField", "LuzmoToast", "LuzmoTooltip", "LuzmoTopNav", "LuzmoTopNavItem"];
|
|
143
149
|
export type LuzmoAngularComponentName = (typeof LUZMO_ANGULAR_COMPONENT_NAMES)[number];
|
package/esm/index.js
CHANGED
|
@@ -39,8 +39,11 @@ import { LuzmoMenuGroup } from './components/menu-group.js';
|
|
|
39
39
|
import { LuzmoMenuItem } from './components/menu-item.js';
|
|
40
40
|
import { LuzmoMultiLanguageField } from './components/multi-language-field.js';
|
|
41
41
|
import { LuzmoNumberField } from './components/number-field.js';
|
|
42
|
+
import { LuzmoOption } from './components/option.js';
|
|
42
43
|
import { LuzmoOptions } from './components/options.js';
|
|
44
|
+
import { LuzmoOptionsDivider } from './components/options-divider.js';
|
|
43
45
|
import { LuzmoOverlay } from './components/overlay.js';
|
|
46
|
+
import { LuzmoOverlayTrigger } from './components/overlay-trigger.js';
|
|
44
47
|
import { LuzmoPicker } from './components/picker.js';
|
|
45
48
|
import { LuzmoPickerButton } from './components/picker-button.js';
|
|
46
49
|
import { LuzmoPopover } from './components/popover.js';
|
|
@@ -109,8 +112,11 @@ export { LuzmoMenuGroup } from './components/menu-group.js';
|
|
|
109
112
|
export { LuzmoMenuItem } from './components/menu-item.js';
|
|
110
113
|
export { LuzmoMultiLanguageField } from './components/multi-language-field.js';
|
|
111
114
|
export { LuzmoNumberField } from './components/number-field.js';
|
|
115
|
+
export { LuzmoOption } from './components/option.js';
|
|
112
116
|
export { LuzmoOptions } from './components/options.js';
|
|
117
|
+
export { LuzmoOptionsDivider } from './components/options-divider.js';
|
|
113
118
|
export { LuzmoOverlay } from './components/overlay.js';
|
|
119
|
+
export { LuzmoOverlayTrigger } from './components/overlay-trigger.js';
|
|
114
120
|
export { LuzmoPicker } from './components/picker.js';
|
|
115
121
|
export { LuzmoPickerButton } from './components/picker-button.js';
|
|
116
122
|
export { LuzmoPopover } from './components/popover.js';
|
|
@@ -180,8 +186,11 @@ export const LUZMO_ANGULAR_COMPONENTS = [
|
|
|
180
186
|
LuzmoMenuItem,
|
|
181
187
|
LuzmoMultiLanguageField,
|
|
182
188
|
LuzmoNumberField,
|
|
189
|
+
LuzmoOption,
|
|
183
190
|
LuzmoOptions,
|
|
191
|
+
LuzmoOptionsDivider,
|
|
184
192
|
LuzmoOverlay,
|
|
193
|
+
LuzmoOverlayTrigger,
|
|
185
194
|
LuzmoPicker,
|
|
186
195
|
LuzmoPickerButton,
|
|
187
196
|
LuzmoPopover,
|
|
@@ -252,8 +261,11 @@ export const LUZMO_ANGULAR_COMPONENT_NAMES = [
|
|
|
252
261
|
'LuzmoMenuItem',
|
|
253
262
|
'LuzmoMultiLanguageField',
|
|
254
263
|
'LuzmoNumberField',
|
|
264
|
+
'LuzmoOption',
|
|
255
265
|
'LuzmoOptions',
|
|
266
|
+
'LuzmoOptionsDivider',
|
|
256
267
|
'LuzmoOverlay',
|
|
268
|
+
'LuzmoOverlayTrigger',
|
|
257
269
|
'LuzmoPicker',
|
|
258
270
|
'LuzmoPickerButton',
|
|
259
271
|
'LuzmoPopover',
|
package/package.json
CHANGED
|
@@ -29,9 +29,9 @@
|
|
|
29
29
|
"peerDependencies": {
|
|
30
30
|
"@angular/core": "^17.3.0 || ^18.0.0 || ^19.0.0 || ^20.0.0 || ^21.0.0 || ^22.0.0",
|
|
31
31
|
"@angular/forms": "^17.3.0 || ^18.0.0 || ^19.0.0 || ^20.0.0 || ^21.0.0 || ^22.0.0",
|
|
32
|
-
"@luzmo/lucero": "1.0.3-alpha.
|
|
32
|
+
"@luzmo/lucero": "1.0.3-alpha.15"
|
|
33
33
|
},
|
|
34
|
-
"version": "1.0.3-alpha.
|
|
34
|
+
"version": "1.0.3-alpha.15",
|
|
35
35
|
"peerDependenciesMeta": {
|
|
36
36
|
"@angular/forms": {
|
|
37
37
|
"optional": true
|