@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.
- package/README.md +41 -0
- package/esm/components/accordion-item.d.ts +32 -0
- package/esm/components/accordion-item.js +89 -0
- package/esm/components/accordion.d.ts +38 -0
- package/esm/components/accordion.js +107 -0
- package/esm/components/action-bar.d.ts +32 -0
- package/esm/components/action-bar.js +83 -0
- package/esm/components/action-button.d.ts +59 -0
- package/esm/components/action-button.js +205 -0
- package/esm/components/action-group.d.ts +42 -0
- package/esm/components/action-group.js +155 -0
- package/esm/components/action-menu.d.ts +75 -0
- package/esm/components/action-menu.js +337 -0
- package/esm/components/avatar.d.ts +35 -0
- package/esm/components/avatar.js +94 -0
- package/esm/components/badge.d.ts +31 -0
- package/esm/components/badge.js +86 -0
- package/esm/components/button-group.d.ts +28 -0
- package/esm/components/button-group.js +71 -0
- package/esm/components/button.d.ts +40 -0
- package/esm/components/button.js +140 -0
- package/esm/components/calendar.d.ts +64 -0
- package/esm/components/calendar.js +218 -0
- package/esm/components/chat-message-group.d.ts +29 -0
- package/esm/components/chat-message-group.js +76 -0
- package/esm/components/chat-message.d.ts +50 -0
- package/esm/components/chat-message.js +156 -0
- package/esm/components/checkbox.d.ts +55 -0
- package/esm/components/checkbox.js +196 -0
- package/esm/components/clear-button.d.ts +32 -0
- package/esm/components/clear-button.js +88 -0
- package/esm/components/close-button.d.ts +33 -0
- package/esm/components/close-button.js +95 -0
- package/esm/components/color-area.d.ts +45 -0
- package/esm/components/color-area.js +167 -0
- package/esm/components/color-field.d.ts +91 -0
- package/esm/components/color-field.js +321 -0
- package/esm/components/color-handle.d.ts +31 -0
- package/esm/components/color-handle.js +90 -0
- package/esm/components/color-loupe.d.ts +29 -0
- package/esm/components/color-loupe.js +76 -0
- package/esm/components/color-menu.d.ts +36 -0
- package/esm/components/color-menu.js +97 -0
- package/esm/components/color-palette-group.d.ts +40 -0
- package/esm/components/color-palette-group.js +117 -0
- package/esm/components/color-palette.d.ts +43 -0
- package/esm/components/color-palette.js +126 -0
- package/esm/components/color-picker.d.ts +49 -0
- package/esm/components/color-picker.js +143 -0
- package/esm/components/color-slider.d.ts +53 -0
- package/esm/components/color-slider.js +215 -0
- package/esm/components/date-range-picker.d.ts +69 -0
- package/esm/components/date-range-picker.js +228 -0
- package/esm/components/date-time-picker.d.ts +71 -0
- package/esm/components/date-time-picker.js +249 -0
- package/esm/components/divider.d.ts +31 -0
- package/esm/components/divider.js +78 -0
- package/esm/components/field-group.d.ts +32 -0
- package/esm/components/field-group.js +101 -0
- package/esm/components/field-label.d.ts +37 -0
- package/esm/components/field-label.js +104 -0
- package/esm/components/help-text.d.ts +30 -0
- package/esm/components/help-text.js +77 -0
- package/esm/components/icon.d.ts +33 -0
- package/esm/components/icon.js +104 -0
- package/esm/components/infield-button.d.ts +35 -0
- package/esm/components/infield-button.js +103 -0
- package/esm/components/label.d.ts +29 -0
- package/esm/components/label.js +76 -0
- package/esm/components/menu.d.ts +53 -0
- package/esm/components/menu.js +218 -0
- package/esm/components/multi-language-field.d.ts +58 -0
- package/esm/components/multi-language-field.js +263 -0
- package/esm/components/number-field.d.ts +103 -0
- package/esm/components/number-field.js +372 -0
- package/esm/components/options.d.ts +58 -0
- package/esm/components/options.js +207 -0
- package/esm/components/overlay.d.ts +67 -0
- package/esm/components/overlay.js +212 -0
- package/esm/components/picker-button.d.ts +32 -0
- package/esm/components/picker-button.js +94 -0
- package/esm/components/picker.d.ts +79 -0
- package/esm/components/picker.js +340 -0
- package/esm/components/popover.d.ts +33 -0
- package/esm/components/popover.js +93 -0
- package/esm/components/progress-bar.d.ts +35 -0
- package/esm/components/progress-bar.js +121 -0
- package/esm/components/progress-circle.d.ts +35 -0
- package/esm/components/progress-circle.js +94 -0
- package/esm/components/progress-steps.d.ts +46 -0
- package/esm/components/progress-steps.js +127 -0
- package/esm/components/prompt-box.d.ts +88 -0
- package/esm/components/prompt-box.js +280 -0
- package/esm/components/radio-group.d.ts +39 -0
- package/esm/components/radio-group.js +136 -0
- package/esm/components/radio.d.ts +46 -0
- package/esm/components/radio.js +172 -0
- package/esm/components/search.d.ts +95 -0
- package/esm/components/search.js +351 -0
- package/esm/components/select.d.ts +82 -0
- package/esm/components/select.js +351 -0
- package/esm/components/slider.d.ts +47 -0
- package/esm/components/slider.js +185 -0
- package/esm/components/status-light.d.ts +30 -0
- package/esm/components/status-light.js +78 -0
- package/esm/components/swatch-group.d.ts +37 -0
- package/esm/components/swatch-group.js +126 -0
- package/esm/components/swatch.d.ts +49 -0
- package/esm/components/swatch.js +197 -0
- package/esm/components/switch.d.ts +48 -0
- package/esm/components/switch.js +160 -0
- package/esm/components/tab-panel.d.ts +29 -0
- package/esm/components/tab-panel.js +78 -0
- package/esm/components/tab.d.ts +32 -0
- package/esm/components/tab.js +100 -0
- package/esm/components/tabs-overflow.d.ts +33 -0
- package/esm/components/tabs-overflow.js +97 -0
- package/esm/components/tabs.d.ts +43 -0
- package/esm/components/tabs.js +150 -0
- package/esm/components/tag.d.ts +31 -0
- package/esm/components/tag.js +90 -0
- package/esm/components/tags.d.ts +30 -0
- package/esm/components/tags.js +81 -0
- package/esm/components/text-field.d.ts +87 -0
- package/esm/components/text-field.js +308 -0
- package/esm/components/toast.d.ts +30 -0
- package/esm/components/toast.js +68 -0
- package/esm/components/tooltip.d.ts +44 -0
- package/esm/components/tooltip.js +154 -0
- package/esm/components/top-nav-item.d.ts +35 -0
- package/esm/components/top-nav-item.js +120 -0
- package/esm/components/top-nav.d.ts +35 -0
- package/esm/components/top-nav.js +110 -0
- package/esm/index.d.ts +135 -0
- package/esm/index.js +269 -0
- package/package.json +40 -0
package/README.md
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# Luzmo Lucero Design System - Angular Wrappers
|
|
2
|
+
|
|
3
|
+
> Standalone Angular wrapper components for Lucero web components
|
|
4
|
+
|
|
5
|
+
This package provides Angular wrappers for the Luzmo Lucero Design System web components.
|
|
6
|
+
|
|
7
|
+
## Installation
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm install @luzmo/ngx-lucero @luzmo/lucero @angular/core @angular/forms
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Requirements
|
|
14
|
+
|
|
15
|
+
- Angular `>= 17.3` (the wrappers use the functional `output()` API).
|
|
16
|
+
- The peer package `@luzmo/lucero` provides the underlying custom-element
|
|
17
|
+
classes that the wrappers register at import time.
|
|
18
|
+
|
|
19
|
+
## Usage
|
|
20
|
+
|
|
21
|
+
```ts
|
|
22
|
+
import { Component } from '@angular/core';
|
|
23
|
+
import { LuzmoButton } from '@luzmo/ngx-lucero';
|
|
24
|
+
|
|
25
|
+
@Component({
|
|
26
|
+
selector: 'app-root',
|
|
27
|
+
standalone: true,
|
|
28
|
+
imports: [LuzmoButton],
|
|
29
|
+
template: `<luzmo-button>Click me</luzmo-button>`
|
|
30
|
+
})
|
|
31
|
+
export class AppComponent {}
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
The wrapper class name mirrors the host element (`LuzmoButton`); the
|
|
35
|
+
underlying `HTMLElement` subclass type is re-exported as
|
|
36
|
+
`LuzmoButtonElement` for `@ViewChild` / `ElementRef<T>` use cases.
|
|
37
|
+
|
|
38
|
+
## Notes
|
|
39
|
+
|
|
40
|
+
- This package depends on `@luzmo/lucero` for the underlying custom elements.
|
|
41
|
+
- Keep this file under `wrappers/angular/package/` to customize published README content.
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { OnChanges, SimpleChanges } from '@angular/core';
|
|
2
|
+
import '@luzmo/lucero/accordion';
|
|
3
|
+
import type { LuzmoAccordionItem as LuzmoAccordionItemHostElement } from '@luzmo/lucero/accordion';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class LuzmoAccordionItem 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(): LuzmoAccordionItemHostElement;
|
|
13
|
+
open?: boolean;
|
|
14
|
+
label?: string;
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
/** Announce that an accordion item has been toggled while allowing the event to be cancelled. */
|
|
17
|
+
readonly luzmoAccordionItemToggleEvent: import("@angular/core").OutputEmitterRef<CustomEvent<unknown>>;
|
|
18
|
+
constructor();
|
|
19
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
20
|
+
/**
|
|
21
|
+
* Forward a wrapper @Input to the underlying host element via Renderer2 so
|
|
22
|
+
* the wrapper stays compatible with non-DOM Angular platforms (SSR, tests).
|
|
23
|
+
* Unlike a "skip undefined" guard, this lets consumers reset values back to
|
|
24
|
+
* undefined / null by clearing their bindings.
|
|
25
|
+
*/
|
|
26
|
+
private setHostProperty;
|
|
27
|
+
private bindEvents;
|
|
28
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<LuzmoAccordionItem, never>;
|
|
29
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<LuzmoAccordionItem, "luzmo-accordion-item", ["luzmoAccordionItem"], { "open": { "alias": "open"; "required": false; }; "label": { "alias": "label"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, { "luzmoAccordionItemToggleEvent": "luzmo-accordion-item-toggle"; }, never, ["*"], true, never>;
|
|
30
|
+
}
|
|
31
|
+
/** The underlying custom element type for LuzmoAccordionItem */
|
|
32
|
+
export type LuzmoAccordionItemElement = LuzmoAccordionItemHostElement;
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { ChangeDetectionStrategy, Component, DestroyRef, ElementRef, inject, Input, output, Renderer2 } from '@angular/core';
|
|
2
|
+
import '@luzmo/lucero/accordion';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
const _c0 = ["*"];
|
|
5
|
+
/**
|
|
6
|
+
* Angular wrapper component for <luzmo-accordion-item>
|
|
7
|
+
*
|
|
8
|
+
* @slot (default) - The content of the item that is hidden when the item is not open
|
|
9
|
+
*/
|
|
10
|
+
export class LuzmoAccordionItem {
|
|
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
|
+
open;
|
|
21
|
+
label;
|
|
22
|
+
disabled;
|
|
23
|
+
/** Announce that an accordion item has been toggled while allowing the event to be cancelled. */
|
|
24
|
+
luzmoAccordionItemToggleEvent = output({ alias: 'luzmo-accordion-item-toggle' });
|
|
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 'label':
|
|
40
|
+
this.setHostProperty('label', changes['label'].currentValue);
|
|
41
|
+
break;
|
|
42
|
+
case 'disabled':
|
|
43
|
+
this.setHostProperty('disabled', changes['disabled'].currentValue);
|
|
44
|
+
break;
|
|
45
|
+
default:
|
|
46
|
+
break;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Forward a wrapper @Input to the underlying host element via Renderer2 so
|
|
52
|
+
* the wrapper stays compatible with non-DOM Angular platforms (SSR, tests).
|
|
53
|
+
* Unlike a "skip undefined" guard, this lets consumers reset values back to
|
|
54
|
+
* undefined / null by clearing their bindings.
|
|
55
|
+
*/
|
|
56
|
+
setHostProperty(key, value) {
|
|
57
|
+
this.renderer.setProperty(this.host, key, value);
|
|
58
|
+
}
|
|
59
|
+
bindEvents() {
|
|
60
|
+
this.listenerCleanup.push(this.renderer.listen(this.host, 'luzmo-accordion-item-toggle', (event) => {
|
|
61
|
+
this.luzmoAccordionItemToggleEvent.emit(event);
|
|
62
|
+
}));
|
|
63
|
+
}
|
|
64
|
+
static ɵfac = function LuzmoAccordionItem_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || LuzmoAccordionItem)(); };
|
|
65
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: LuzmoAccordionItem, selectors: [["luzmo-accordion-item"]], inputs: { open: "open", label: "label", disabled: "disabled" }, outputs: { luzmoAccordionItemToggleEvent: "luzmo-accordion-item-toggle" }, exportAs: ["luzmoAccordionItem"], features: [i0.ɵɵNgOnChangesFeature], ngContentSelectors: _c0, decls: 1, vars: 0, template: function LuzmoAccordionItem_Template(rf, ctx) { if (rf & 1) {
|
|
66
|
+
i0.ɵɵprojectionDef();
|
|
67
|
+
i0.ɵɵprojection(0);
|
|
68
|
+
} }, encapsulation: 2, changeDetection: 0 });
|
|
69
|
+
}
|
|
70
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(LuzmoAccordionItem, [{
|
|
71
|
+
type: Component,
|
|
72
|
+
args: [{
|
|
73
|
+
selector: 'luzmo-accordion-item',
|
|
74
|
+
exportAs: 'luzmoAccordionItem',
|
|
75
|
+
standalone: true,
|
|
76
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
77
|
+
template: '<ng-content />'
|
|
78
|
+
}]
|
|
79
|
+
}], () => [], { open: [{
|
|
80
|
+
type: Input,
|
|
81
|
+
args: [{ alias: 'open' }]
|
|
82
|
+
}], label: [{
|
|
83
|
+
type: Input,
|
|
84
|
+
args: [{ alias: 'label' }]
|
|
85
|
+
}], disabled: [{
|
|
86
|
+
type: Input,
|
|
87
|
+
args: [{ alias: 'disabled' }]
|
|
88
|
+
}], luzmoAccordionItemToggleEvent: [{ type: i0.Output, args: ["luzmo-accordion-item-toggle"] }] }); })();
|
|
89
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(LuzmoAccordionItem, { className: "LuzmoAccordionItem", filePath: "components/accordion-item.ts", lineNumber: 17 }); })();
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { OnChanges, SimpleChanges } from '@angular/core';
|
|
2
|
+
import '@luzmo/lucero/accordion';
|
|
3
|
+
import type { LuzmoAccordion as LuzmoAccordionHostElement } from '@luzmo/lucero/accordion';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class LuzmoAccordion 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(): LuzmoAccordionHostElement;
|
|
13
|
+
/** Allows multiple accordion items to be opened at the same time */
|
|
14
|
+
allowMultiple?: boolean;
|
|
15
|
+
/** Sets the spacing between the content to borders of an accordion item */
|
|
16
|
+
density?: 'compact' | 'spacious';
|
|
17
|
+
/** Sets the case of an accordion item header */
|
|
18
|
+
headerCase?: 'uppercase' | 'default';
|
|
19
|
+
/** If true removes the left and right padding from the content of the accordion item */
|
|
20
|
+
noContentPadding?: boolean;
|
|
21
|
+
/** Default variant without background or highlight variant with */
|
|
22
|
+
variant?: 'highlight' | 'highlight-child' | 'default';
|
|
23
|
+
constructor();
|
|
24
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
25
|
+
/**
|
|
26
|
+
* Forward a wrapper @Input to the underlying host element via Renderer2 so
|
|
27
|
+
* the wrapper stays compatible with non-DOM Angular platforms (SSR, tests).
|
|
28
|
+
* Unlike a "skip undefined" guard, this lets consumers reset values back to
|
|
29
|
+
* undefined / null by clearing their bindings.
|
|
30
|
+
*/
|
|
31
|
+
private setHostProperty;
|
|
32
|
+
private bindEvents;
|
|
33
|
+
focus(): void;
|
|
34
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<LuzmoAccordion, never>;
|
|
35
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<LuzmoAccordion, "luzmo-accordion", ["luzmoAccordion"], { "allowMultiple": { "alias": "allow-multiple"; "required": false; }; "density": { "alias": "density"; "required": false; }; "headerCase": { "alias": "header-case"; "required": false; }; "noContentPadding": { "alias": "no-content-padding"; "required": false; }; "variant": { "alias": "variant"; "required": false; }; }, {}, never, ["*"], true, never>;
|
|
36
|
+
}
|
|
37
|
+
/** The underlying custom element type for LuzmoAccordion */
|
|
38
|
+
export type LuzmoAccordionElement = LuzmoAccordionHostElement;
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { ChangeDetectionStrategy, Component, DestroyRef, ElementRef, inject, Input, Renderer2 } from '@angular/core';
|
|
2
|
+
import '@luzmo/lucero/accordion';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
const _c0 = ["*"];
|
|
5
|
+
/**
|
|
6
|
+
* Angular wrapper component for <luzmo-accordion>
|
|
7
|
+
*
|
|
8
|
+
* @slot (default) - The luzmo-accordion-item children to display.
|
|
9
|
+
*/
|
|
10
|
+
export class LuzmoAccordion {
|
|
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
|
+
/** Allows multiple accordion items to be opened at the same time */
|
|
21
|
+
allowMultiple;
|
|
22
|
+
/** Sets the spacing between the content to borders of an accordion item */
|
|
23
|
+
density;
|
|
24
|
+
/** Sets the case of an accordion item header */
|
|
25
|
+
headerCase;
|
|
26
|
+
/** If true removes the left and right padding from the content of the accordion item */
|
|
27
|
+
noContentPadding;
|
|
28
|
+
/** Default variant without background or highlight variant with */
|
|
29
|
+
variant;
|
|
30
|
+
constructor() {
|
|
31
|
+
this.bindEvents();
|
|
32
|
+
this.destroyRef.onDestroy(() => {
|
|
33
|
+
for (const cleanup of this.listenerCleanup) {
|
|
34
|
+
cleanup();
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
ngOnChanges(changes) {
|
|
39
|
+
for (const key of Object.keys(changes)) {
|
|
40
|
+
switch (key) {
|
|
41
|
+
case 'allowMultiple':
|
|
42
|
+
this.setHostProperty('allowMultiple', changes['allowMultiple'].currentValue);
|
|
43
|
+
break;
|
|
44
|
+
case 'density':
|
|
45
|
+
this.setHostProperty('density', changes['density'].currentValue);
|
|
46
|
+
break;
|
|
47
|
+
case 'headerCase':
|
|
48
|
+
this.setHostProperty('headerCase', changes['headerCase'].currentValue);
|
|
49
|
+
break;
|
|
50
|
+
case 'noContentPadding':
|
|
51
|
+
this.setHostProperty('noContentPadding', changes['noContentPadding'].currentValue);
|
|
52
|
+
break;
|
|
53
|
+
case 'variant':
|
|
54
|
+
this.setHostProperty('variant', changes['variant'].currentValue);
|
|
55
|
+
break;
|
|
56
|
+
default:
|
|
57
|
+
break;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Forward a wrapper @Input to the underlying host element via Renderer2 so
|
|
63
|
+
* the wrapper stays compatible with non-DOM Angular platforms (SSR, tests).
|
|
64
|
+
* Unlike a "skip undefined" guard, this lets consumers reset values back to
|
|
65
|
+
* undefined / null by clearing their bindings.
|
|
66
|
+
*/
|
|
67
|
+
setHostProperty(key, value) {
|
|
68
|
+
this.renderer.setProperty(this.host, key, value);
|
|
69
|
+
}
|
|
70
|
+
bindEvents() {
|
|
71
|
+
// No custom events for this wrapper.
|
|
72
|
+
}
|
|
73
|
+
focus() {
|
|
74
|
+
return this.host.focus();
|
|
75
|
+
}
|
|
76
|
+
static ɵfac = function LuzmoAccordion_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || LuzmoAccordion)(); };
|
|
77
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: LuzmoAccordion, selectors: [["luzmo-accordion"]], inputs: { allowMultiple: [0, "allow-multiple", "allowMultiple"], density: "density", headerCase: [0, "header-case", "headerCase"], noContentPadding: [0, "no-content-padding", "noContentPadding"], variant: "variant" }, exportAs: ["luzmoAccordion"], features: [i0.ɵɵNgOnChangesFeature], ngContentSelectors: _c0, decls: 1, vars: 0, template: function LuzmoAccordion_Template(rf, ctx) { if (rf & 1) {
|
|
78
|
+
i0.ɵɵprojectionDef();
|
|
79
|
+
i0.ɵɵprojection(0);
|
|
80
|
+
} }, encapsulation: 2, changeDetection: 0 });
|
|
81
|
+
}
|
|
82
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(LuzmoAccordion, [{
|
|
83
|
+
type: Component,
|
|
84
|
+
args: [{
|
|
85
|
+
selector: 'luzmo-accordion',
|
|
86
|
+
exportAs: 'luzmoAccordion',
|
|
87
|
+
standalone: true,
|
|
88
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
89
|
+
template: '<ng-content />'
|
|
90
|
+
}]
|
|
91
|
+
}], () => [], { allowMultiple: [{
|
|
92
|
+
type: Input,
|
|
93
|
+
args: [{ alias: 'allow-multiple' }]
|
|
94
|
+
}], density: [{
|
|
95
|
+
type: Input,
|
|
96
|
+
args: [{ alias: 'density' }]
|
|
97
|
+
}], headerCase: [{
|
|
98
|
+
type: Input,
|
|
99
|
+
args: [{ alias: 'header-case' }]
|
|
100
|
+
}], noContentPadding: [{
|
|
101
|
+
type: Input,
|
|
102
|
+
args: [{ alias: 'no-content-padding' }]
|
|
103
|
+
}], variant: [{
|
|
104
|
+
type: Input,
|
|
105
|
+
args: [{ alias: 'variant' }]
|
|
106
|
+
}] }); })();
|
|
107
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(LuzmoAccordion, { className: "LuzmoAccordion", filePath: "components/accordion.ts", lineNumber: 17 }); })();
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { OnChanges, SimpleChanges } from '@angular/core';
|
|
2
|
+
import '@luzmo/lucero/action-bar';
|
|
3
|
+
import type { LuzmoActionBar as LuzmoActionBarHostElement } from '@luzmo/lucero/action-bar';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class LuzmoActionBar 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(): LuzmoActionBarHostElement;
|
|
13
|
+
/** Deliver the Action Bar with additional visual emphasis. */
|
|
14
|
+
emphasized?: boolean;
|
|
15
|
+
/** The `open` attribute is used to control the visibility of the popover. */
|
|
16
|
+
open?: boolean;
|
|
17
|
+
readonly closeEvent: import("@angular/core").OutputEmitterRef<Event>;
|
|
18
|
+
constructor();
|
|
19
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
20
|
+
/**
|
|
21
|
+
* Forward a wrapper @Input to the underlying host element via Renderer2 so
|
|
22
|
+
* the wrapper stays compatible with non-DOM Angular platforms (SSR, tests).
|
|
23
|
+
* Unlike a "skip undefined" guard, this lets consumers reset values back to
|
|
24
|
+
* undefined / null by clearing their bindings.
|
|
25
|
+
*/
|
|
26
|
+
private setHostProperty;
|
|
27
|
+
private bindEvents;
|
|
28
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<LuzmoActionBar, never>;
|
|
29
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<LuzmoActionBar, "luzmo-action-bar", ["luzmoActionBar"], { "emphasized": { "alias": "emphasized"; "required": false; }; "open": { "alias": "open"; "required": false; }; }, { "closeEvent": "close"; }, never, ["*"], true, never>;
|
|
30
|
+
}
|
|
31
|
+
/** The underlying custom element type for LuzmoActionBar */
|
|
32
|
+
export type LuzmoActionBarElement = LuzmoActionBarHostElement;
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { ChangeDetectionStrategy, Component, DestroyRef, ElementRef, inject, Input, output, Renderer2 } from '@angular/core';
|
|
2
|
+
import '@luzmo/lucero/action-bar';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
const _c0 = ["*"];
|
|
5
|
+
/**
|
|
6
|
+
* Angular wrapper component for <luzmo-action-bar>
|
|
7
|
+
*
|
|
8
|
+
* @slot (default) - Content to display with the Action Bar
|
|
9
|
+
*/
|
|
10
|
+
export class LuzmoActionBar {
|
|
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
|
+
/** Deliver the Action Bar with additional visual emphasis. */
|
|
21
|
+
emphasized;
|
|
22
|
+
/** The `open` attribute is used to control the visibility of the popover. */
|
|
23
|
+
open;
|
|
24
|
+
closeEvent = output({ alias: 'close' });
|
|
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 'emphasized':
|
|
37
|
+
this.setHostProperty('emphasized', changes['emphasized'].currentValue);
|
|
38
|
+
break;
|
|
39
|
+
case 'open':
|
|
40
|
+
this.setHostProperty('open', changes['open'].currentValue);
|
|
41
|
+
break;
|
|
42
|
+
default:
|
|
43
|
+
break;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Forward a wrapper @Input to the underlying host element via Renderer2 so
|
|
49
|
+
* the wrapper stays compatible with non-DOM Angular platforms (SSR, tests).
|
|
50
|
+
* Unlike a "skip undefined" guard, this lets consumers reset values back to
|
|
51
|
+
* undefined / null by clearing their bindings.
|
|
52
|
+
*/
|
|
53
|
+
setHostProperty(key, value) {
|
|
54
|
+
this.renderer.setProperty(this.host, key, value);
|
|
55
|
+
}
|
|
56
|
+
bindEvents() {
|
|
57
|
+
this.listenerCleanup.push(this.renderer.listen(this.host, 'close', (event) => {
|
|
58
|
+
this.closeEvent.emit(event);
|
|
59
|
+
}));
|
|
60
|
+
}
|
|
61
|
+
static ɵfac = function LuzmoActionBar_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || LuzmoActionBar)(); };
|
|
62
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: LuzmoActionBar, selectors: [["luzmo-action-bar"]], inputs: { emphasized: "emphasized", open: "open" }, outputs: { closeEvent: "close" }, exportAs: ["luzmoActionBar"], features: [i0.ɵɵNgOnChangesFeature], ngContentSelectors: _c0, decls: 1, vars: 0, template: function LuzmoActionBar_Template(rf, ctx) { if (rf & 1) {
|
|
63
|
+
i0.ɵɵprojectionDef();
|
|
64
|
+
i0.ɵɵprojection(0);
|
|
65
|
+
} }, encapsulation: 2, changeDetection: 0 });
|
|
66
|
+
}
|
|
67
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(LuzmoActionBar, [{
|
|
68
|
+
type: Component,
|
|
69
|
+
args: [{
|
|
70
|
+
selector: 'luzmo-action-bar',
|
|
71
|
+
exportAs: 'luzmoActionBar',
|
|
72
|
+
standalone: true,
|
|
73
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
74
|
+
template: '<ng-content />'
|
|
75
|
+
}]
|
|
76
|
+
}], () => [], { emphasized: [{
|
|
77
|
+
type: Input,
|
|
78
|
+
args: [{ alias: 'emphasized' }]
|
|
79
|
+
}], open: [{
|
|
80
|
+
type: Input,
|
|
81
|
+
args: [{ alias: 'open' }]
|
|
82
|
+
}], closeEvent: [{ type: i0.Output, args: ["close"] }] }); })();
|
|
83
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(LuzmoActionBar, { className: "LuzmoActionBar", filePath: "components/action-bar.ts", lineNumber: 17 }); })();
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { OnChanges, SimpleChanges } from '@angular/core';
|
|
2
|
+
import { ControlValueAccessor } from '@angular/forms';
|
|
3
|
+
import '@luzmo/lucero/action-button';
|
|
4
|
+
import type { LuzmoActionButton as LuzmoActionButtonHostElement } from '@luzmo/lucero/action-button';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export declare class LuzmoActionButton implements OnChanges, ControlValueAccessor {
|
|
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(): LuzmoActionButtonHostElement;
|
|
14
|
+
/** Affects the display of a **selected** Action Button */
|
|
15
|
+
emphasized?: boolean;
|
|
16
|
+
/** Whether the Action Button should display a hold affordance */
|
|
17
|
+
holdAffordance?: boolean;
|
|
18
|
+
/** Whether the Action Button should show in a quiet state */
|
|
19
|
+
quiet?: boolean;
|
|
20
|
+
/** The role for the Action Button */
|
|
21
|
+
role?: string;
|
|
22
|
+
/** Whether an Action Button with `role='button'` should also be `aria-pressed='true'` */
|
|
23
|
+
selected?: boolean;
|
|
24
|
+
/** Whether to automatically manage the `selected` attribute on interaction and whether `aria-pressed="false"` should be used when `selected === false` */
|
|
25
|
+
toggles?: boolean;
|
|
26
|
+
/** The static color variant to use for the action button. */
|
|
27
|
+
staticColor?: 'white' | 'black';
|
|
28
|
+
/** The value of the Action Button */
|
|
29
|
+
value?: string;
|
|
30
|
+
active?: boolean;
|
|
31
|
+
/** The default behavior of the button. Possible values are: `button` (default), `submit`, and `reset`. */
|
|
32
|
+
type?: 'button' | 'submit' | 'reset';
|
|
33
|
+
/** Synthesizes a "longpress" interaction that signifies a `pointerdown` event that is >=300ms or a keyboard event where code is `Space` or code is `ArrowDown` while `altKey===true`. */
|
|
34
|
+
readonly longpressEvent: import("@angular/core").OutputEmitterRef<CustomEvent<unknown>>;
|
|
35
|
+
/** Announces a change in the `selected` property of an action button */
|
|
36
|
+
readonly changeEvent: import("@angular/core").OutputEmitterRef<CustomEvent<unknown>>;
|
|
37
|
+
constructor();
|
|
38
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
39
|
+
/**
|
|
40
|
+
* Forward a wrapper @Input to the underlying host element via Renderer2 so
|
|
41
|
+
* the wrapper stays compatible with non-DOM Angular platforms (SSR, tests).
|
|
42
|
+
* Unlike a "skip undefined" guard, this lets consumers reset values back to
|
|
43
|
+
* undefined / null by clearing their bindings.
|
|
44
|
+
*/
|
|
45
|
+
private setHostProperty;
|
|
46
|
+
private bindEvents;
|
|
47
|
+
private onChange;
|
|
48
|
+
private onTouched;
|
|
49
|
+
private isWritingValue;
|
|
50
|
+
private lastCvaValue;
|
|
51
|
+
writeValue(value: string): void;
|
|
52
|
+
registerOnChange(fn: (value: string) => void): void;
|
|
53
|
+
registerOnTouched(fn: () => void): void;
|
|
54
|
+
setDisabledState(isDisabled: boolean): void;
|
|
55
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<LuzmoActionButton, never>;
|
|
56
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<LuzmoActionButton, "luzmo-action-button", ["luzmoActionButton"], { "emphasized": { "alias": "emphasized"; "required": false; }; "holdAffordance": { "alias": "hold-affordance"; "required": false; }; "quiet": { "alias": "quiet"; "required": false; }; "role": { "alias": "role"; "required": false; }; "selected": { "alias": "selected"; "required": false; }; "toggles": { "alias": "toggles"; "required": false; }; "staticColor": { "alias": "static-color"; "required": false; }; "value": { "alias": "value"; "required": false; }; "active": { "alias": "active"; "required": false; }; "type": { "alias": "type"; "required": false; }; }, { "longpressEvent": "longpress"; "changeEvent": "change"; }, never, ["*"], true, never>;
|
|
57
|
+
}
|
|
58
|
+
/** The underlying custom element type for LuzmoActionButton */
|
|
59
|
+
export type LuzmoActionButtonElement = LuzmoActionButtonHostElement;
|