@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
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
import { ChangeDetectionStrategy, Component, DestroyRef, ElementRef, inject, Input, output, Renderer2 } from '@angular/core';
|
|
2
|
+
import '@luzmo/lucero/tabs';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
const _c0 = ["*"];
|
|
5
|
+
/**
|
|
6
|
+
* Angular wrapper component for <luzmo-tabs>
|
|
7
|
+
*
|
|
8
|
+
* @slot (default) - Tab elements to manage as a group
|
|
9
|
+
* @slot tab-panel - Tab Panel elements related to the listed Tab elements
|
|
10
|
+
* @csspart tablist - Container element for the slotted luzmo-tab elements
|
|
11
|
+
*/
|
|
12
|
+
export class LuzmoTabs {
|
|
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
|
+
/** Whether to activate a tab on keyboard focus or not. By default a tab is activated via a "click" interaction. This is specifically intended for when tab content cannot be displayed instantly, e.g. not all of the DOM content is available, etc. To learn more about "Deciding When to Make Selection Automatically Follow Focus", visit: https://w3c.github.io/aria-practices/#kbd_selection_follows_focus */
|
|
23
|
+
auto;
|
|
24
|
+
/** The tab items are displayed closer together. */
|
|
25
|
+
compact;
|
|
26
|
+
dir;
|
|
27
|
+
direction;
|
|
28
|
+
emphasized;
|
|
29
|
+
label;
|
|
30
|
+
enableTabsScroll;
|
|
31
|
+
/** The tab list is displayed without a border. */
|
|
32
|
+
quiet;
|
|
33
|
+
selectionIndicatorStyle;
|
|
34
|
+
shouldAnimate;
|
|
35
|
+
selected;
|
|
36
|
+
/** The selected Tab child has changed. */
|
|
37
|
+
changeEvent = output({ alias: 'change' });
|
|
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 'auto':
|
|
50
|
+
this.setHostProperty('auto', changes['auto'].currentValue);
|
|
51
|
+
break;
|
|
52
|
+
case 'compact':
|
|
53
|
+
this.setHostProperty('compact', changes['compact'].currentValue);
|
|
54
|
+
break;
|
|
55
|
+
case 'dir':
|
|
56
|
+
this.setHostProperty('dir', changes['dir'].currentValue);
|
|
57
|
+
break;
|
|
58
|
+
case 'direction':
|
|
59
|
+
this.setHostProperty('direction', changes['direction'].currentValue);
|
|
60
|
+
break;
|
|
61
|
+
case 'emphasized':
|
|
62
|
+
this.setHostProperty('emphasized', changes['emphasized'].currentValue);
|
|
63
|
+
break;
|
|
64
|
+
case 'label':
|
|
65
|
+
this.setHostProperty('label', changes['label'].currentValue);
|
|
66
|
+
break;
|
|
67
|
+
case 'enableTabsScroll':
|
|
68
|
+
this.setHostProperty('enableTabsScroll', changes['enableTabsScroll'].currentValue);
|
|
69
|
+
break;
|
|
70
|
+
case 'quiet':
|
|
71
|
+
this.setHostProperty('quiet', changes['quiet'].currentValue);
|
|
72
|
+
break;
|
|
73
|
+
case 'selectionIndicatorStyle':
|
|
74
|
+
this.setHostProperty('selectionIndicatorStyle', changes['selectionIndicatorStyle'].currentValue);
|
|
75
|
+
break;
|
|
76
|
+
case 'shouldAnimate':
|
|
77
|
+
this.setHostProperty('shouldAnimate', changes['shouldAnimate'].currentValue);
|
|
78
|
+
break;
|
|
79
|
+
case 'selected':
|
|
80
|
+
this.setHostProperty('selected', changes['selected'].currentValue);
|
|
81
|
+
break;
|
|
82
|
+
default:
|
|
83
|
+
break;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Forward a wrapper @Input to the underlying host element via Renderer2 so
|
|
89
|
+
* the wrapper stays compatible with non-DOM Angular platforms (SSR, tests).
|
|
90
|
+
* Unlike a "skip undefined" guard, this lets consumers reset values back to
|
|
91
|
+
* undefined / null by clearing their bindings.
|
|
92
|
+
*/
|
|
93
|
+
setHostProperty(key, value) {
|
|
94
|
+
this.renderer.setProperty(this.host, key, value);
|
|
95
|
+
}
|
|
96
|
+
bindEvents() {
|
|
97
|
+
this.listenerCleanup.push(this.renderer.listen(this.host, 'change', (event) => {
|
|
98
|
+
this.changeEvent.emit(event);
|
|
99
|
+
}));
|
|
100
|
+
}
|
|
101
|
+
static ɵfac = function LuzmoTabs_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || LuzmoTabs)(); };
|
|
102
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: LuzmoTabs, selectors: [["luzmo-tabs"]], inputs: { auto: "auto", compact: "compact", dir: "dir", direction: "direction", emphasized: "emphasized", label: "label", enableTabsScroll: [0, "enable-tabs-scroll", "enableTabsScroll"], quiet: "quiet", selectionIndicatorStyle: [0, "selection-indicator-style", "selectionIndicatorStyle"], shouldAnimate: [0, "should-animate", "shouldAnimate"], selected: "selected" }, outputs: { changeEvent: "change" }, exportAs: ["luzmoTabs"], features: [i0.ɵɵNgOnChangesFeature], ngContentSelectors: _c0, decls: 1, vars: 0, template: function LuzmoTabs_Template(rf, ctx) { if (rf & 1) {
|
|
103
|
+
i0.ɵɵprojectionDef();
|
|
104
|
+
i0.ɵɵprojection(0);
|
|
105
|
+
} }, encapsulation: 2, changeDetection: 0 });
|
|
106
|
+
}
|
|
107
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(LuzmoTabs, [{
|
|
108
|
+
type: Component,
|
|
109
|
+
args: [{
|
|
110
|
+
selector: 'luzmo-tabs',
|
|
111
|
+
exportAs: 'luzmoTabs',
|
|
112
|
+
standalone: true,
|
|
113
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
114
|
+
template: '<ng-content />'
|
|
115
|
+
}]
|
|
116
|
+
}], () => [], { auto: [{
|
|
117
|
+
type: Input,
|
|
118
|
+
args: [{ alias: 'auto' }]
|
|
119
|
+
}], compact: [{
|
|
120
|
+
type: Input,
|
|
121
|
+
args: [{ alias: 'compact' }]
|
|
122
|
+
}], dir: [{
|
|
123
|
+
type: Input,
|
|
124
|
+
args: [{ alias: 'dir' }]
|
|
125
|
+
}], direction: [{
|
|
126
|
+
type: Input,
|
|
127
|
+
args: [{ alias: 'direction' }]
|
|
128
|
+
}], emphasized: [{
|
|
129
|
+
type: Input,
|
|
130
|
+
args: [{ alias: 'emphasized' }]
|
|
131
|
+
}], label: [{
|
|
132
|
+
type: Input,
|
|
133
|
+
args: [{ alias: 'label' }]
|
|
134
|
+
}], enableTabsScroll: [{
|
|
135
|
+
type: Input,
|
|
136
|
+
args: [{ alias: 'enable-tabs-scroll' }]
|
|
137
|
+
}], quiet: [{
|
|
138
|
+
type: Input,
|
|
139
|
+
args: [{ alias: 'quiet' }]
|
|
140
|
+
}], selectionIndicatorStyle: [{
|
|
141
|
+
type: Input,
|
|
142
|
+
args: [{ alias: 'selection-indicator-style' }]
|
|
143
|
+
}], shouldAnimate: [{
|
|
144
|
+
type: Input,
|
|
145
|
+
args: [{ alias: 'should-animate' }]
|
|
146
|
+
}], selected: [{
|
|
147
|
+
type: Input,
|
|
148
|
+
args: [{ alias: 'selected' }]
|
|
149
|
+
}], changeEvent: [{ type: i0.Output, args: ["change"] }] }); })();
|
|
150
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(LuzmoTabs, { className: "LuzmoTabs", filePath: "components/tabs.ts", lineNumber: 19 }); })();
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { OnChanges, SimpleChanges } from '@angular/core';
|
|
2
|
+
import '@luzmo/lucero/tags';
|
|
3
|
+
import type { LuzmoTag as LuzmoTagHostElement } from '@luzmo/lucero/tags';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class LuzmoTag 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(): LuzmoTagHostElement;
|
|
13
|
+
deletable?: boolean;
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
readonly?: boolean;
|
|
16
|
+
readonly deleteEvent: import("@angular/core").OutputEmitterRef<Event>;
|
|
17
|
+
constructor();
|
|
18
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
19
|
+
/**
|
|
20
|
+
* Forward a wrapper @Input to the underlying host element via Renderer2 so
|
|
21
|
+
* the wrapper stays compatible with non-DOM Angular platforms (SSR, tests).
|
|
22
|
+
* Unlike a "skip undefined" guard, this lets consumers reset values back to
|
|
23
|
+
* undefined / null by clearing their bindings.
|
|
24
|
+
*/
|
|
25
|
+
private setHostProperty;
|
|
26
|
+
private bindEvents;
|
|
27
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<LuzmoTag, never>;
|
|
28
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<LuzmoTag, "luzmo-tag", ["luzmoTag"], { "deletable": { "alias": "deletable"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; }, { "deleteEvent": "delete"; }, never, ["*"], true, never>;
|
|
29
|
+
}
|
|
30
|
+
/** The underlying custom element type for LuzmoTag */
|
|
31
|
+
export type LuzmoTagElement = LuzmoTagHostElement;
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { ChangeDetectionStrategy, Component, DestroyRef, ElementRef, inject, Input, output, Renderer2 } from '@angular/core';
|
|
2
|
+
import '@luzmo/lucero/tags';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
const _c0 = ["*"];
|
|
5
|
+
/**
|
|
6
|
+
* Angular wrapper component for <luzmo-tag>
|
|
7
|
+
*
|
|
8
|
+
* @slot (default) - text content for labeling the tag
|
|
9
|
+
* @slot avatar - an avatar element to display within the Tag
|
|
10
|
+
* @slot icon - an icon element to display within the Tag
|
|
11
|
+
*/
|
|
12
|
+
export class LuzmoTag {
|
|
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
|
+
deletable;
|
|
23
|
+
disabled;
|
|
24
|
+
readonly;
|
|
25
|
+
deleteEvent = output({ alias: 'delete' });
|
|
26
|
+
constructor() {
|
|
27
|
+
this.bindEvents();
|
|
28
|
+
this.destroyRef.onDestroy(() => {
|
|
29
|
+
for (const cleanup of this.listenerCleanup) {
|
|
30
|
+
cleanup();
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
ngOnChanges(changes) {
|
|
35
|
+
for (const key of Object.keys(changes)) {
|
|
36
|
+
switch (key) {
|
|
37
|
+
case 'deletable':
|
|
38
|
+
this.setHostProperty('deletable', changes['deletable'].currentValue);
|
|
39
|
+
break;
|
|
40
|
+
case 'disabled':
|
|
41
|
+
this.setHostProperty('disabled', changes['disabled'].currentValue);
|
|
42
|
+
break;
|
|
43
|
+
case 'readonly':
|
|
44
|
+
this.setHostProperty('readonly', changes['readonly'].currentValue);
|
|
45
|
+
break;
|
|
46
|
+
default:
|
|
47
|
+
break;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Forward a wrapper @Input to the underlying host element via Renderer2 so
|
|
53
|
+
* the wrapper stays compatible with non-DOM Angular platforms (SSR, tests).
|
|
54
|
+
* Unlike a "skip undefined" guard, this lets consumers reset values back to
|
|
55
|
+
* undefined / null by clearing their bindings.
|
|
56
|
+
*/
|
|
57
|
+
setHostProperty(key, value) {
|
|
58
|
+
this.renderer.setProperty(this.host, key, value);
|
|
59
|
+
}
|
|
60
|
+
bindEvents() {
|
|
61
|
+
this.listenerCleanup.push(this.renderer.listen(this.host, 'delete', (event) => {
|
|
62
|
+
this.deleteEvent.emit(event);
|
|
63
|
+
}));
|
|
64
|
+
}
|
|
65
|
+
static ɵfac = function LuzmoTag_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || LuzmoTag)(); };
|
|
66
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: LuzmoTag, selectors: [["luzmo-tag"]], inputs: { deletable: "deletable", disabled: "disabled", readonly: "readonly" }, outputs: { deleteEvent: "delete" }, exportAs: ["luzmoTag"], features: [i0.ɵɵNgOnChangesFeature], ngContentSelectors: _c0, decls: 1, vars: 0, template: function LuzmoTag_Template(rf, ctx) { if (rf & 1) {
|
|
67
|
+
i0.ɵɵprojectionDef();
|
|
68
|
+
i0.ɵɵprojection(0);
|
|
69
|
+
} }, encapsulation: 2, changeDetection: 0 });
|
|
70
|
+
}
|
|
71
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(LuzmoTag, [{
|
|
72
|
+
type: Component,
|
|
73
|
+
args: [{
|
|
74
|
+
selector: 'luzmo-tag',
|
|
75
|
+
exportAs: 'luzmoTag',
|
|
76
|
+
standalone: true,
|
|
77
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
78
|
+
template: '<ng-content />'
|
|
79
|
+
}]
|
|
80
|
+
}], () => [], { deletable: [{
|
|
81
|
+
type: Input,
|
|
82
|
+
args: [{ alias: 'deletable' }]
|
|
83
|
+
}], disabled: [{
|
|
84
|
+
type: Input,
|
|
85
|
+
args: [{ alias: 'disabled' }]
|
|
86
|
+
}], readonly: [{
|
|
87
|
+
type: Input,
|
|
88
|
+
args: [{ alias: 'readonly' }]
|
|
89
|
+
}], deleteEvent: [{ type: i0.Output, args: ["delete"] }] }); })();
|
|
90
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(LuzmoTag, { className: "LuzmoTag", filePath: "components/tag.ts", lineNumber: 19 }); })();
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { OnChanges, SimpleChanges } from '@angular/core';
|
|
2
|
+
import '@luzmo/lucero/tags';
|
|
3
|
+
import type { LuzmoTags as LuzmoTagsHostElement } from '@luzmo/lucero/tags';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class LuzmoTags 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(): LuzmoTagsHostElement;
|
|
13
|
+
defaultNodes?: unknown;
|
|
14
|
+
rovingTabindexController?: 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
|
+
focus(): void;
|
|
26
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<LuzmoTags, never>;
|
|
27
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<LuzmoTags, "luzmo-tags", ["luzmoTags"], { "defaultNodes": { "alias": "default-nodes"; "required": false; }; "rovingTabindexController": { "alias": "roving-tabindex-controller"; "required": false; }; }, {}, never, ["*"], true, never>;
|
|
28
|
+
}
|
|
29
|
+
/** The underlying custom element type for LuzmoTags */
|
|
30
|
+
export type LuzmoTagsElement = LuzmoTagsHostElement;
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { ChangeDetectionStrategy, Component, DestroyRef, ElementRef, inject, Input, Renderer2 } from '@angular/core';
|
|
2
|
+
import '@luzmo/lucero/tags';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
const _c0 = ["*"];
|
|
5
|
+
/**
|
|
6
|
+
* Angular wrapper component for <luzmo-tags>
|
|
7
|
+
*
|
|
8
|
+
* @slot (default) - Tag elements to manage as a group
|
|
9
|
+
*/
|
|
10
|
+
export class LuzmoTags {
|
|
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
|
+
defaultNodes;
|
|
21
|
+
rovingTabindexController;
|
|
22
|
+
constructor() {
|
|
23
|
+
this.bindEvents();
|
|
24
|
+
this.destroyRef.onDestroy(() => {
|
|
25
|
+
for (const cleanup of this.listenerCleanup) {
|
|
26
|
+
cleanup();
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
ngOnChanges(changes) {
|
|
31
|
+
for (const key of Object.keys(changes)) {
|
|
32
|
+
switch (key) {
|
|
33
|
+
case 'defaultNodes':
|
|
34
|
+
this.setHostProperty('defaultNodes', changes['defaultNodes'].currentValue);
|
|
35
|
+
break;
|
|
36
|
+
case 'rovingTabindexController':
|
|
37
|
+
this.setHostProperty('rovingTabindexController', changes['rovingTabindexController'].currentValue);
|
|
38
|
+
break;
|
|
39
|
+
default:
|
|
40
|
+
break;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Forward a wrapper @Input to the underlying host element via Renderer2 so
|
|
46
|
+
* the wrapper stays compatible with non-DOM Angular platforms (SSR, tests).
|
|
47
|
+
* Unlike a "skip undefined" guard, this lets consumers reset values back to
|
|
48
|
+
* undefined / null by clearing their bindings.
|
|
49
|
+
*/
|
|
50
|
+
setHostProperty(key, value) {
|
|
51
|
+
this.renderer.setProperty(this.host, key, value);
|
|
52
|
+
}
|
|
53
|
+
bindEvents() {
|
|
54
|
+
// No custom events for this wrapper.
|
|
55
|
+
}
|
|
56
|
+
focus() {
|
|
57
|
+
return this.host.focus();
|
|
58
|
+
}
|
|
59
|
+
static ɵfac = function LuzmoTags_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || LuzmoTags)(); };
|
|
60
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: LuzmoTags, selectors: [["luzmo-tags"]], inputs: { defaultNodes: [0, "default-nodes", "defaultNodes"], rovingTabindexController: [0, "roving-tabindex-controller", "rovingTabindexController"] }, exportAs: ["luzmoTags"], features: [i0.ɵɵNgOnChangesFeature], ngContentSelectors: _c0, decls: 1, vars: 0, template: function LuzmoTags_Template(rf, ctx) { if (rf & 1) {
|
|
61
|
+
i0.ɵɵprojectionDef();
|
|
62
|
+
i0.ɵɵprojection(0);
|
|
63
|
+
} }, encapsulation: 2, changeDetection: 0 });
|
|
64
|
+
}
|
|
65
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(LuzmoTags, [{
|
|
66
|
+
type: Component,
|
|
67
|
+
args: [{
|
|
68
|
+
selector: 'luzmo-tags',
|
|
69
|
+
exportAs: 'luzmoTags',
|
|
70
|
+
standalone: true,
|
|
71
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
72
|
+
template: '<ng-content />'
|
|
73
|
+
}]
|
|
74
|
+
}], () => [], { defaultNodes: [{
|
|
75
|
+
type: Input,
|
|
76
|
+
args: [{ alias: 'default-nodes' }]
|
|
77
|
+
}], rovingTabindexController: [{
|
|
78
|
+
type: Input,
|
|
79
|
+
args: [{ alias: 'roving-tabindex-controller' }]
|
|
80
|
+
}] }); })();
|
|
81
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(LuzmoTags, { className: "LuzmoTags", filePath: "components/tags.ts", lineNumber: 17 }); })();
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { OnChanges, SimpleChanges } from '@angular/core';
|
|
2
|
+
import { ControlValueAccessor } from '@angular/forms';
|
|
3
|
+
import '@luzmo/lucero/text-field';
|
|
4
|
+
import type { LuzmoTextField as LuzmoTextFieldHostElement } from '@luzmo/lucero/text-field';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export declare class LuzmoTextField 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(): LuzmoTextFieldHostElement;
|
|
14
|
+
/** The value held by the form control */
|
|
15
|
+
value?: string | number;
|
|
16
|
+
helpTextManager?: unknown;
|
|
17
|
+
/** A regular expression outlining the keys that will be allowed to update the value of the form control. */
|
|
18
|
+
allowedKeys?: string;
|
|
19
|
+
/** Whether the `value` held by the form control is invalid. */
|
|
20
|
+
invalid?: boolean;
|
|
21
|
+
/** A string applied via `aria-label` to the form control when a user visible label is not provided. */
|
|
22
|
+
label?: string;
|
|
23
|
+
/** Name of the form control. */
|
|
24
|
+
name?: string;
|
|
25
|
+
/** Text that appears in the form control when it has no value set */
|
|
26
|
+
placeholder?: string;
|
|
27
|
+
type?: unknown;
|
|
28
|
+
/** Pattern the `value` must match to be valid */
|
|
29
|
+
pattern?: string;
|
|
30
|
+
/** Whether a form control delivered with the `multiline` attribute will change size vertically to accomodate longer input */
|
|
31
|
+
grows?: boolean;
|
|
32
|
+
/** Defines the maximum string length that the user can enter */
|
|
33
|
+
maxlength?: number;
|
|
34
|
+
/** Defines the minimum string length that the user can enter */
|
|
35
|
+
minlength?: number;
|
|
36
|
+
/** Whether the form control should accept a value longer than one line */
|
|
37
|
+
multiline?: boolean;
|
|
38
|
+
/** Whether a user can interact with the value of the form control */
|
|
39
|
+
readonly?: boolean;
|
|
40
|
+
/** The specific number of rows the form control should provide in the user interface */
|
|
41
|
+
rows?: number;
|
|
42
|
+
/** 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. */
|
|
43
|
+
maxRows?: number;
|
|
44
|
+
/** Whether the `value` held by the form control is valid. */
|
|
45
|
+
valid?: boolean;
|
|
46
|
+
/** Whether to hide the validation state icons (valid/invalid icons). */
|
|
47
|
+
hideValidationIcons?: boolean;
|
|
48
|
+
/** Whether to display the form control with no visible background */
|
|
49
|
+
quiet?: boolean;
|
|
50
|
+
/** Whether the form control will be found to be invalid when it holds no `value` */
|
|
51
|
+
required?: boolean;
|
|
52
|
+
/** What form of assistance should be provided when attempting to supply a value to the form control */
|
|
53
|
+
autocomplete?: unknown;
|
|
54
|
+
/** An alteration to the value of the element has been committed by the user. */
|
|
55
|
+
readonly changeEvent: import("@angular/core").OutputEmitterRef<Event>;
|
|
56
|
+
/** The value of the element has changed. */
|
|
57
|
+
readonly inputEvent: import("@angular/core").OutputEmitterRef<CustomEvent<unknown>>;
|
|
58
|
+
/** A key has been pressed. */
|
|
59
|
+
readonly keypressEvent: import("@angular/core").OutputEmitterRef<CustomEvent<unknown>>;
|
|
60
|
+
constructor();
|
|
61
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
62
|
+
/**
|
|
63
|
+
* Forward a wrapper @Input to the underlying host element via Renderer2 so
|
|
64
|
+
* the wrapper stays compatible with non-DOM Angular platforms (SSR, tests).
|
|
65
|
+
* Unlike a "skip undefined" guard, this lets consumers reset values back to
|
|
66
|
+
* undefined / null by clearing their bindings.
|
|
67
|
+
*/
|
|
68
|
+
private setHostProperty;
|
|
69
|
+
private bindEvents;
|
|
70
|
+
private onChange;
|
|
71
|
+
private onTouched;
|
|
72
|
+
private isWritingValue;
|
|
73
|
+
private lastCvaValue;
|
|
74
|
+
writeValue(value: string | number): void;
|
|
75
|
+
registerOnChange(fn: (value: string | number) => void): void;
|
|
76
|
+
registerOnTouched(fn: () => void): void;
|
|
77
|
+
setDisabledState(isDisabled: boolean): void;
|
|
78
|
+
/** Sets the start and end positions of the current selection. */
|
|
79
|
+
setSelectionRange(selectionStart: number, selectionEnd: number, selectionDirection?: 'forward' | 'backward' | 'none'): void;
|
|
80
|
+
/** Selects all the text. */
|
|
81
|
+
select(): void;
|
|
82
|
+
checkValidity(): boolean;
|
|
83
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<LuzmoTextField, never>;
|
|
84
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<LuzmoTextField, "luzmo-text-field", ["luzmoTextField"], { "value": { "alias": "value"; "required": false; }; "helpTextManager": { "alias": "help-text-manager"; "required": false; }; "allowedKeys": { "alias": "allowed-keys"; "required": false; }; "invalid": { "alias": "invalid"; "required": false; }; "label": { "alias": "label"; "required": false; }; "name": { "alias": "name"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "type": { "alias": "type"; "required": false; }; "pattern": { "alias": "pattern"; "required": false; }; "grows": { "alias": "grows"; "required": false; }; "maxlength": { "alias": "maxlength"; "required": false; }; "minlength": { "alias": "minlength"; "required": false; }; "multiline": { "alias": "multiline"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "rows": { "alias": "rows"; "required": false; }; "maxRows": { "alias": "max-rows"; "required": false; }; "valid": { "alias": "valid"; "required": false; }; "hideValidationIcons": { "alias": "hide-validation-icons"; "required": false; }; "quiet": { "alias": "quiet"; "required": false; }; "required": { "alias": "required"; "required": false; }; "autocomplete": { "alias": "autocomplete"; "required": false; }; }, { "changeEvent": "change"; "inputEvent": "input"; "keypressEvent": "keypress"; }, never, ["*"], true, never>;
|
|
85
|
+
}
|
|
86
|
+
/** The underlying custom element type for LuzmoTextField */
|
|
87
|
+
export type LuzmoTextFieldElement = LuzmoTextFieldHostElement;
|