@edsis/ui 0.0.2 → 0.0.3
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/empty/README.md +1 -1
- package/fesm2022/edsis-ui-accordion.mjs +15 -15
- package/fesm2022/edsis-ui-alert-dialog.mjs +27 -27
- package/fesm2022/edsis-ui-alert.mjs +12 -12
- package/fesm2022/edsis-ui-aspect-ratio.mjs +3 -3
- package/fesm2022/edsis-ui-avatar.mjs +18 -18
- package/fesm2022/edsis-ui-badge.mjs +3 -3
- package/fesm2022/edsis-ui-breadcrumb.mjs +21 -21
- package/fesm2022/edsis-ui-button-group.mjs +9 -9
- package/fesm2022/edsis-ui-button.mjs +3 -3
- package/fesm2022/edsis-ui-calendar.mjs +3 -3
- package/fesm2022/edsis-ui-card.mjs +21 -21
- package/fesm2022/edsis-ui-carousel.mjs +18 -18
- package/fesm2022/edsis-ui-chart.mjs +80 -78
- package/fesm2022/edsis-ui-chart.mjs.map +1 -1
- package/fesm2022/edsis-ui-checkbox.mjs +3 -3
- package/fesm2022/edsis-ui-collapsible.mjs +12 -12
- package/fesm2022/edsis-ui-combobox.mjs +3 -3
- package/fesm2022/edsis-ui-command.mjs +41 -35
- package/fesm2022/edsis-ui-command.mjs.map +1 -1
- package/fesm2022/edsis-ui-composer.mjs +21 -21
- package/fesm2022/edsis-ui-context-menu.mjs +13 -7
- package/fesm2022/edsis-ui-context-menu.mjs.map +1 -1
- package/fesm2022/edsis-ui-date-picker.mjs +3 -3
- package/fesm2022/edsis-ui-dialog.mjs +27 -23
- package/fesm2022/edsis-ui-dialog.mjs.map +1 -1
- package/fesm2022/edsis-ui-dropdown-menu.mjs +58 -46
- package/fesm2022/edsis-ui-dropdown-menu.mjs.map +1 -1
- package/fesm2022/edsis-ui-editor.mjs +22 -20
- package/fesm2022/edsis-ui-editor.mjs.map +1 -1
- package/fesm2022/edsis-ui-empty.mjs +18 -18
- package/fesm2022/edsis-ui-form.mjs +38 -38
- package/fesm2022/edsis-ui-form.mjs.map +1 -1
- package/fesm2022/edsis-ui-hover-card.mjs +34 -13
- package/fesm2022/edsis-ui-hover-card.mjs.map +1 -1
- package/fesm2022/edsis-ui-input-group.mjs +18 -18
- package/fesm2022/edsis-ui-input-otp.mjs +15 -15
- package/fesm2022/edsis-ui-input.mjs +3 -3
- package/fesm2022/edsis-ui-item.mjs +30 -30
- package/fesm2022/edsis-ui-kanban.mjs +27 -27
- package/fesm2022/edsis-ui-kbd.mjs +6 -6
- package/fesm2022/edsis-ui-label.mjs +3 -3
- package/fesm2022/edsis-ui-layout-services.mjs +6 -0
- package/fesm2022/edsis-ui-layout-services.mjs.map +1 -0
- package/fesm2022/edsis-ui-layout-types.mjs +6 -0
- package/fesm2022/edsis-ui-layout-types.mjs.map +1 -0
- package/fesm2022/edsis-ui-layout.mjs +572 -0
- package/fesm2022/edsis-ui-layout.mjs.map +1 -0
- package/fesm2022/edsis-ui-menubar.mjs +22 -16
- package/fesm2022/edsis-ui-menubar.mjs.map +1 -1
- package/fesm2022/edsis-ui-native-select.mjs +9 -9
- package/fesm2022/edsis-ui-nav-service.mjs +343 -0
- package/fesm2022/edsis-ui-nav-service.mjs.map +1 -0
- package/fesm2022/edsis-ui-nav.mjs +2340 -0
- package/fesm2022/edsis-ui-nav.mjs.map +1 -0
- package/fesm2022/edsis-ui-navigation-menu.mjs +30 -24
- package/fesm2022/edsis-ui-navigation-menu.mjs.map +1 -1
- package/fesm2022/edsis-ui-page.mjs +397 -0
- package/fesm2022/edsis-ui-page.mjs.map +1 -0
- package/fesm2022/edsis-ui-pagination.mjs +3 -3
- package/fesm2022/edsis-ui-pillbox.mjs +16 -16
- package/fesm2022/edsis-ui-pillbox.mjs.map +1 -1
- package/fesm2022/edsis-ui-popover.mjs +16 -10
- package/fesm2022/edsis-ui-popover.mjs.map +1 -1
- package/fesm2022/edsis-ui-progress.mjs +3 -3
- package/fesm2022/edsis-ui-radio.mjs +6 -6
- package/fesm2022/edsis-ui-resizable.mjs +12 -12
- package/fesm2022/edsis-ui-scroll-area.mjs +3 -3
- package/fesm2022/edsis-ui-select.mjs +6 -6
- package/fesm2022/edsis-ui-separator.mjs +3 -3
- package/fesm2022/edsis-ui-sheet.mjs +27 -23
- package/fesm2022/edsis-ui-sheet.mjs.map +1 -1
- package/fesm2022/edsis-ui-skeleton.mjs +3 -3
- package/fesm2022/edsis-ui-slider.mjs +6 -6
- package/fesm2022/edsis-ui-spinner.mjs +3 -3
- package/fesm2022/edsis-ui-switch.mjs +3 -3
- package/fesm2022/edsis-ui-table.mjs +24 -24
- package/fesm2022/edsis-ui-tabs.mjs +18 -18
- package/fesm2022/edsis-ui-textarea.mjs +3 -3
- package/fesm2022/edsis-ui-theme.mjs +209 -0
- package/fesm2022/edsis-ui-theme.mjs.map +1 -0
- package/fesm2022/edsis-ui-timeline.mjs +18 -18
- package/fesm2022/edsis-ui-toast.mjs +3 -3
- package/fesm2022/edsis-ui-toggle-group.mjs +9 -9
- package/fesm2022/edsis-ui-toggle.mjs +3 -3
- package/fesm2022/edsis-ui-tooltip.mjs +12 -12
- package/layout/README.md +454 -0
- package/nav/README.md +96 -0
- package/package.json +31 -2
- package/page/README.md +46 -0
- package/types/edsis-ui-command.d.ts +4 -1
- package/types/edsis-ui-context-menu.d.ts +2 -1
- package/types/edsis-ui-dropdown-menu.d.ts +5 -2
- package/types/edsis-ui-editor.d.ts +1 -0
- package/types/edsis-ui-hover-card.d.ts +3 -1
- package/types/edsis-ui-layout-services.d.ts +1 -0
- package/types/edsis-ui-layout-types.d.ts +1 -0
- package/types/edsis-ui-layout.d.ts +153 -0
- package/types/edsis-ui-menubar.d.ts +2 -0
- package/types/edsis-ui-nav-service.d.ts +138 -0
- package/types/edsis-ui-nav.d.ts +205 -0
- package/types/edsis-ui-navigation-menu.d.ts +2 -0
- package/types/edsis-ui-page.d.ts +137 -0
- package/types/edsis-ui-popover.d.ts +2 -1
- package/types/edsis-ui-theme.d.ts +71 -0
|
@@ -52,8 +52,8 @@ class CheckboxComponent {
|
|
|
52
52
|
setDisabledState(d) {
|
|
53
53
|
this.disabledState.set(d);
|
|
54
54
|
}
|
|
55
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
56
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.
|
|
55
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: CheckboxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
56
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.15", type: CheckboxComponent, isStandalone: true, selector: "ui-checkbox", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, indeterminate: { classPropertyName: "indeterminate", publicName: "indeterminate", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "aria-label", isSignal: true, isRequired: false, transformFunction: null }, ariaDescribedby: { classPropertyName: "ariaDescribedby", publicName: "aria-describedby", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledby: { classPropertyName: "ariaLabelledby", publicName: "aria-labelledby", isSignal: true, isRequired: false, transformFunction: null }, ariaInvalid: { classPropertyName: "ariaInvalid", publicName: "aria-invalid", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { checkedChange: "checkedChange" }, providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => CheckboxComponent), multi: true }], viewQueries: [{ propertyName: "ref", first: true, predicate: ["ref"], descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
57
57
|
<mat-checkbox
|
|
58
58
|
#ref
|
|
59
59
|
disableRipple
|
|
@@ -73,7 +73,7 @@ class CheckboxComponent {
|
|
|
73
73
|
</mat-checkbox>
|
|
74
74
|
`, isInline: true, styles: [":host{display:inline-flex}:host ::ng-deep .mat-mdc-checkbox{--mdc-checkbox-selected-icon-color: hsl(var(--primary));--mdc-checkbox-selected-focus-icon-color: hsl(var(--primary));--mdc-checkbox-selected-hover-icon-color: hsl(var(--primary));--mdc-checkbox-selected-pressed-icon-color: hsl(var(--primary));--mdc-checkbox-unselected-icon-color: hsl(var(--input));--mdc-checkbox-unselected-focus-icon-color: hsl(var(--input));--mdc-checkbox-unselected-hover-icon-color: hsl(var(--input));--mdc-checkbox-selected-checkmark-color: hsl(var(--primary-foreground));--mdc-checkbox-selected-focus-state-layer-color: transparent;--mdc-checkbox-selected-hover-state-layer-color: transparent;--mdc-checkbox-selected-pressed-state-layer-color: transparent;--mdc-checkbox-unselected-focus-state-layer-color: transparent;--mdc-checkbox-unselected-hover-state-layer-color: transparent;--mdc-checkbox-unselected-pressed-state-layer-color: transparent;--mdc-checkbox-state-layer-size: 1rem}:host ::ng-deep .mat-mdc-checkbox[aria-invalid=true]{--mdc-checkbox-selected-icon-color: hsl(var(--destructive));--mdc-checkbox-selected-focus-icon-color: hsl(var(--destructive));--mdc-checkbox-selected-hover-icon-color: hsl(var(--destructive));--mdc-checkbox-selected-pressed-icon-color: hsl(var(--destructive));--mdc-checkbox-selected-checkmark-color: hsl(var(--destructive-foreground));--mdc-checkbox-unselected-icon-color: hsl(var(--destructive));--mdc-checkbox-unselected-focus-icon-color: hsl(var(--destructive));--mdc-checkbox-unselected-hover-icon-color: hsl(var(--destructive))}:host ::ng-deep .mat-mdc-checkbox .mdc-checkbox__ripple,:host ::ng-deep .mat-mdc-checkbox .mat-mdc-checkbox-ripple,:host ::ng-deep .mat-mdc-checkbox .mat-mdc-focus-indicator{display:none}:host ::ng-deep .mat-mdc-checkbox .mat-mdc-checkbox-touch-target{display:none}:host ::ng-deep .mat-mdc-checkbox .mdc-checkbox{padding:0;margin:0;flex:0 0 1rem;width:1rem;height:1rem}:host ::ng-deep .mat-mdc-checkbox .mdc-checkbox__background{top:0;left:0;width:1rem;height:1rem;border-radius:var(--radius-sm);border-width:var(--border-width)}:host ::ng-deep .mat-mdc-checkbox[aria-invalid=true] .mdc-checkbox__background{box-shadow:0 0 0 3px hsl(var(--destructive) / .12)}:host ::ng-deep .mat-mdc-checkbox .mdc-form-field{gap:.5rem;color:hsl(var(--foreground));font-family:var(--font-sans);font-size:var(--text-sm);line-height:var(--text-sm--line-height)}:host ::ng-deep .mat-mdc-checkbox .mdc-label{padding:0;margin:0;cursor:pointer}\n"], dependencies: [{ kind: "component", type: MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "aria-expanded", "aria-controls", "aria-owns", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
75
75
|
}
|
|
76
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
76
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: CheckboxComponent, decorators: [{
|
|
77
77
|
type: Component,
|
|
78
78
|
args: [{ selector: 'ui-checkbox', imports: [MatCheckbox], changeDetection: ChangeDetectionStrategy.OnPush, providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => CheckboxComponent), multi: true }], template: `
|
|
79
79
|
<mat-checkbox
|
|
@@ -3,10 +3,10 @@ import { Directive, model, input, computed, forwardRef, ChangeDetectionStrategy,
|
|
|
3
3
|
import { cn } from '@edsis/ui/utils';
|
|
4
4
|
|
|
5
5
|
class CollapsibleContextBase {
|
|
6
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
7
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.
|
|
6
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: CollapsibleContextBase, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
7
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.15", type: CollapsibleContextBase, isStandalone: true, ngImport: i0 });
|
|
8
8
|
}
|
|
9
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
9
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: CollapsibleContextBase, decorators: [{
|
|
10
10
|
type: Directive
|
|
11
11
|
}] });
|
|
12
12
|
class CollapsibleComponent extends CollapsibleContextBase {
|
|
@@ -27,10 +27,10 @@ class CollapsibleComponent extends CollapsibleContextBase {
|
|
|
27
27
|
if (!this.disabled())
|
|
28
28
|
this.open.update((value) => !value);
|
|
29
29
|
}
|
|
30
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
31
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.
|
|
30
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: CollapsibleComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
31
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.15", type: CollapsibleComponent, isStandalone: true, selector: "ui-collapsible", inputs: { open: { classPropertyName: "open", publicName: "open", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { open: "openChange" }, host: { properties: { "class": "classes()", "attr.data-state": "open() ? \"open\" : \"closed\"", "attr.data-disabled": "disabled() ? \"\" : null" } }, providers: [{ provide: CollapsibleContextBase, useExisting: forwardRef(() => CollapsibleComponent) }], usesInheritance: true, ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
32
32
|
}
|
|
33
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
33
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: CollapsibleComponent, decorators: [{
|
|
34
34
|
type: Component,
|
|
35
35
|
args: [{
|
|
36
36
|
selector: 'ui-collapsible',
|
|
@@ -49,10 +49,10 @@ class CollapsibleTriggerDirective {
|
|
|
49
49
|
toggle() {
|
|
50
50
|
this.ctx.toggle();
|
|
51
51
|
}
|
|
52
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
53
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.
|
|
52
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: CollapsibleTriggerDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
53
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.15", type: CollapsibleTriggerDirective, isStandalone: true, selector: "button[ui-collapsible-trigger]", host: { attributes: { "type": "button" }, listeners: { "click": "toggle()" }, properties: { "attr.id": "ctx.triggerId", "attr.aria-controls": "ctx.contentId", "attr.aria-expanded": "ctx.isOpen()", "attr.data-state": "ctx.isOpen() ? \"open\" : \"closed\"", "attr.data-disabled": "ctx.isDisabled() ? \"\" : null", "disabled": "ctx.isDisabled() || null" }, classAttribute: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50" }, ngImport: i0 });
|
|
54
54
|
}
|
|
55
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
55
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: CollapsibleTriggerDirective, decorators: [{
|
|
56
56
|
type: Directive,
|
|
57
57
|
args: [{
|
|
58
58
|
selector: 'button[ui-collapsible-trigger]',
|
|
@@ -75,14 +75,14 @@ class CollapsibleContentComponent {
|
|
|
75
75
|
class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
76
76
|
classes = computed(() => cn('block overflow-hidden text-sm', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
77
77
|
renderContent = computed(() => this.ctx.isOpen() || this.forceMount(), ...(ngDevMode ? [{ debugName: "renderContent" }] : /* istanbul ignore next */ []));
|
|
78
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
79
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.
|
|
78
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: CollapsibleContentComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
79
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.15", type: CollapsibleContentComponent, isStandalone: true, selector: "ui-collapsible-content", inputs: { forceMount: { classPropertyName: "forceMount", publicName: "forceMount", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()", "attr.id": "ctx.contentId", "attr.role": "\"region\"", "attr.aria-labelledby": "ctx.triggerId", "attr.data-state": "ctx.isOpen() ? \"open\" : \"closed\"", "attr.data-disabled": "ctx.isDisabled() ? \"\" : null", "hidden": "!ctx.isOpen()" } }, ngImport: i0, template: `
|
|
80
80
|
@if (renderContent()) {
|
|
81
81
|
<ng-content />
|
|
82
82
|
}
|
|
83
83
|
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
84
84
|
}
|
|
85
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
85
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: CollapsibleContentComponent, decorators: [{
|
|
86
86
|
type: Component,
|
|
87
87
|
args: [{
|
|
88
88
|
selector: 'ui-collapsible-content',
|
|
@@ -107,8 +107,8 @@ class ComboboxComponent {
|
|
|
107
107
|
setDisabledState(state) {
|
|
108
108
|
this.disabled.set(state);
|
|
109
109
|
}
|
|
110
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
111
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.
|
|
110
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: ComboboxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
111
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.15", type: ComboboxComponent, isStandalone: true, selector: "ui-combobox", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, searchPlaceholder: { classPropertyName: "searchPlaceholder", publicName: "searchPlaceholder", isSignal: true, isRequired: false, transformFunction: null }, emptyText: { classPropertyName: "emptyText", publicName: "emptyText", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", disabled: "disabledChange", valueChange: "valueChange" }, host: { properties: { "class": "classes()" } }, providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => ComboboxComponent), multi: true }], viewQueries: [{ propertyName: "trigger", first: true, predicate: ["trigger"], descendants: true, isSignal: true }, { propertyName: "panel", first: true, predicate: ["panel"], descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
112
112
|
<button
|
|
113
113
|
#trigger
|
|
114
114
|
type="button"
|
|
@@ -173,7 +173,7 @@ class ComboboxComponent {
|
|
|
173
173
|
</ng-template>
|
|
174
174
|
`, isInline: true, dependencies: [{ kind: "component", type: CommandComponent, selector: "ui-command", inputs: ["query", "class"], outputs: ["queryChange"] }, { kind: "component", type: CommandInputComponent, selector: "input[ui-command-input]", inputs: ["placeholder", "class"] }, { kind: "component", type: CommandListComponent, selector: "ui-command-list", inputs: ["class"] }, { kind: "component", type: CommandEmptyComponent, selector: "ui-command-empty", inputs: ["class"] }, { kind: "component", type: CommandGroupComponent, selector: "ui-command-group", inputs: ["heading", "class"] }, { kind: "component", type: CommandItemComponent, selector: "ui-command-item, button[ui-command-item]", inputs: ["value", "disabled", "class"], outputs: ["selected"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
175
175
|
}
|
|
176
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
176
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: ComboboxComponent, decorators: [{
|
|
177
177
|
type: Component,
|
|
178
178
|
args: [{
|
|
179
179
|
selector: 'ui-combobox',
|
|
@@ -4,17 +4,17 @@ import { cn } from '@edsis/ui/utils';
|
|
|
4
4
|
|
|
5
5
|
/** Base class exposed to children for context lookup. */
|
|
6
6
|
class CommandContextBase {
|
|
7
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
8
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.
|
|
7
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: CommandContextBase, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
8
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.15", type: CommandContextBase, isStandalone: true, ngImport: i0 });
|
|
9
9
|
}
|
|
10
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
10
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: CommandContextBase, decorators: [{
|
|
11
11
|
type: Directive
|
|
12
12
|
}] });
|
|
13
|
+
let nextCommandItemId = 0;
|
|
13
14
|
class CommandComponent extends CommandContextBase {
|
|
14
15
|
query = model('', ...(ngDevMode ? [{ debugName: "query" }] : /* istanbul ignore next */ []));
|
|
15
16
|
class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
16
17
|
items = signal([], ...(ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []));
|
|
17
|
-
activeIndex = signal(0, ...(ngDevMode ? [{ debugName: "activeIndex" }] : /* istanbul ignore next */ []));
|
|
18
18
|
classes = computed(() => cn('flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
19
19
|
matches(text) {
|
|
20
20
|
const q = this.query().trim().toLowerCase();
|
|
@@ -38,28 +38,31 @@ class CommandComponent extends CommandContextBase {
|
|
|
38
38
|
return;
|
|
39
39
|
const active = vis.findIndex((i) => i.active());
|
|
40
40
|
const idx = active < 0 ? 0 : (active + delta + vis.length) % vis.length;
|
|
41
|
-
|
|
42
|
-
vis[idx].focus();
|
|
41
|
+
this.setActiveItem(vis[idx] ?? null);
|
|
43
42
|
}
|
|
44
43
|
focusFirst() {
|
|
45
|
-
|
|
46
|
-
vis.forEach((i, k) => i._setActive(k === 0));
|
|
47
|
-
vis[0]?.focus();
|
|
44
|
+
this.setActiveItem(this.visibleItems()[0] ?? null);
|
|
48
45
|
}
|
|
49
46
|
hasVisibleItems() {
|
|
50
47
|
return this.visibleItems().length > 0;
|
|
51
48
|
}
|
|
52
49
|
activateOnly(item) {
|
|
53
|
-
this.
|
|
50
|
+
this.setActiveItem(item);
|
|
51
|
+
}
|
|
52
|
+
activeDescendantId() {
|
|
53
|
+
return this.getActive()?.itemId ?? null;
|
|
54
54
|
}
|
|
55
55
|
/** Returns the first visible item's text if any. Used when user hits Enter with no active. */
|
|
56
56
|
getActive() {
|
|
57
57
|
return this.visibleItems().find((i) => i.active()) ?? this.visibleItems()[0] ?? null;
|
|
58
58
|
}
|
|
59
|
-
|
|
60
|
-
|
|
59
|
+
setActiveItem(activeItem) {
|
|
60
|
+
this.items().forEach((item) => item._setActive(item === activeItem));
|
|
61
|
+
}
|
|
62
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: CommandComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
63
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.15", type: CommandComponent, isStandalone: true, selector: "ui-command", inputs: { query: { classPropertyName: "query", publicName: "query", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { query: "queryChange" }, host: { properties: { "class": "classes()" } }, providers: [{ provide: CommandContextBase, useExisting: forwardRef(() => CommandComponent) }], usesInheritance: true, ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
61
64
|
}
|
|
62
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
65
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: CommandComponent, decorators: [{
|
|
63
66
|
type: Component,
|
|
64
67
|
args: [{
|
|
65
68
|
selector: 'ui-command',
|
|
@@ -76,7 +79,7 @@ class CommandInputComponent {
|
|
|
76
79
|
classes = computed(() => cn('flex h-11 w-full rounded-md bg-transparent px-3 py-3 text-sm outline-none', 'placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50', 'border-b border-border', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
77
80
|
onInput(e) {
|
|
78
81
|
this.ctx.query.set(e.target.value);
|
|
79
|
-
|
|
82
|
+
this.ctx.focusFirst();
|
|
80
83
|
}
|
|
81
84
|
onArrow(e, delta) {
|
|
82
85
|
e.preventDefault();
|
|
@@ -89,10 +92,10 @@ class CommandInputComponent {
|
|
|
89
92
|
active._select(e);
|
|
90
93
|
}
|
|
91
94
|
}
|
|
92
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
93
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.
|
|
95
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: CommandInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
96
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.15", type: CommandInputComponent, isStandalone: true, selector: "input[ui-command-input]", inputs: { placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "type": "text", "role": "combobox", "aria-autocomplete": "list", "aria-expanded": "true", "autocomplete": "off" }, listeners: { "input": "onInput($any($event))", "keydown.arrowDown": "onArrow($any($event), 1)", "keydown.arrowUp": "onArrow($any($event), -1)", "keydown.enter": "onEnter($any($event))" }, properties: { "class": "classes()", "attr.aria-activedescendant": "ctx.activeDescendantId()", "value": "ctx.query()", "placeholder": "placeholder()" } }, ngImport: i0, template: ``, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
94
97
|
}
|
|
95
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
98
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: CommandInputComponent, decorators: [{
|
|
96
99
|
type: Component,
|
|
97
100
|
args: [{
|
|
98
101
|
selector: 'input[ui-command-input]',
|
|
@@ -103,6 +106,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
|
|
|
103
106
|
role: 'combobox',
|
|
104
107
|
'aria-autocomplete': 'list',
|
|
105
108
|
'aria-expanded': 'true',
|
|
109
|
+
'[attr.aria-activedescendant]': 'ctx.activeDescendantId()',
|
|
106
110
|
autocomplete: 'off',
|
|
107
111
|
'[value]': 'ctx.query()',
|
|
108
112
|
'[placeholder]': 'placeholder()',
|
|
@@ -117,10 +121,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
|
|
|
117
121
|
class CommandListComponent {
|
|
118
122
|
class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
119
123
|
classes = computed(() => cn('max-h-[300px] overflow-y-auto overflow-x-hidden p-1', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
120
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
121
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.
|
|
124
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: CommandListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
125
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.15", type: CommandListComponent, isStandalone: true, selector: "ui-command-list", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "listbox" }, properties: { "class": "classes()" } }, ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
122
126
|
}
|
|
123
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
127
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: CommandListComponent, decorators: [{
|
|
124
128
|
type: Component,
|
|
125
129
|
args: [{
|
|
126
130
|
selector: 'ui-command-list',
|
|
@@ -133,10 +137,10 @@ class CommandEmptyComponent {
|
|
|
133
137
|
ctx = inject(CommandComponent);
|
|
134
138
|
class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
135
139
|
classes = computed(() => cn('py-6 text-center text-sm text-muted-foreground', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
136
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
137
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.
|
|
140
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: CommandEmptyComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
141
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.15", type: CommandEmptyComponent, isStandalone: true, selector: "ui-command-empty", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()", "hidden": "ctx.hasVisibleItems()" } }, ngImport: i0, template: `<ng-content>No results found.</ng-content>`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
138
142
|
}
|
|
139
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
143
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: CommandEmptyComponent, decorators: [{
|
|
140
144
|
type: Component,
|
|
141
145
|
args: [{
|
|
142
146
|
selector: 'ui-command-empty',
|
|
@@ -152,15 +156,15 @@ class CommandGroupComponent {
|
|
|
152
156
|
heading = input(null, ...(ngDevMode ? [{ debugName: "heading" }] : /* istanbul ignore next */ []));
|
|
153
157
|
class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
154
158
|
classes = computed(() => cn('overflow-hidden p-1 text-foreground', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
155
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
156
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.
|
|
159
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: CommandGroupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
160
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.15", type: CommandGroupComponent, isStandalone: true, selector: "ui-command-group", inputs: { heading: { classPropertyName: "heading", publicName: "heading", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "group" }, properties: { "class": "classes()" } }, ngImport: i0, template: `
|
|
157
161
|
@if (heading()) {
|
|
158
162
|
<div class="px-2 py-1.5 text-xs font-medium text-muted-foreground">{{ heading() }}</div>
|
|
159
163
|
}
|
|
160
164
|
<ng-content />
|
|
161
165
|
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
162
166
|
}
|
|
163
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
167
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: CommandGroupComponent, decorators: [{
|
|
164
168
|
type: Component,
|
|
165
169
|
args: [{
|
|
166
170
|
selector: 'ui-command-group',
|
|
@@ -177,10 +181,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
|
|
|
177
181
|
class CommandSeparatorComponent {
|
|
178
182
|
class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
179
183
|
classes = computed(() => cn('-mx-1 h-px bg-border block', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
180
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
181
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.
|
|
184
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: CommandSeparatorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
185
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.15", type: CommandSeparatorComponent, isStandalone: true, selector: "ui-command-separator", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "separator" }, properties: { "class": "classes()" } }, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
182
186
|
}
|
|
183
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
187
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: CommandSeparatorComponent, decorators: [{
|
|
184
188
|
type: Component,
|
|
185
189
|
args: [{
|
|
186
190
|
selector: 'ui-command-separator',
|
|
@@ -192,6 +196,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
|
|
|
192
196
|
class CommandItemComponent {
|
|
193
197
|
ctx = inject(CommandComponent);
|
|
194
198
|
el = inject(ElementRef);
|
|
199
|
+
itemId = `ui-command-item-${nextCommandItemId++}`;
|
|
195
200
|
value = input('', ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
196
201
|
disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
197
202
|
class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
@@ -222,16 +227,17 @@ class CommandItemComponent {
|
|
|
222
227
|
return;
|
|
223
228
|
this.ctx.activateOnly(this);
|
|
224
229
|
}
|
|
225
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
226
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.
|
|
230
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: CommandItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
231
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.15", type: CommandItemComponent, isStandalone: true, selector: "ui-command-item, button[ui-command-item]", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { selected: "selected" }, host: { listeners: { "click": "_select($any($event))", "mousemove": "onHover()" }, properties: { "class": "classes()", "attr.id": "itemId", "attr.role": "\"option\"", "attr.tabindex": "-1", "attr.aria-selected": "active()", "attr.data-active": "active() ? \"true\" : null", "attr.data-disabled": "disabled() ? \"true\" : null", "hidden": "!visible()" } }, ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
227
232
|
}
|
|
228
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
233
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: CommandItemComponent, decorators: [{
|
|
229
234
|
type: Component,
|
|
230
235
|
args: [{
|
|
231
236
|
selector: 'ui-command-item, button[ui-command-item]',
|
|
232
237
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
233
238
|
host: {
|
|
234
239
|
'[class]': 'classes()',
|
|
240
|
+
'[attr.id]': 'itemId',
|
|
235
241
|
'[attr.role]': '"option"',
|
|
236
242
|
'[attr.tabindex]': '-1',
|
|
237
243
|
'[attr.aria-selected]': 'active()',
|
|
@@ -247,10 +253,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
|
|
|
247
253
|
class CommandShortcutComponent {
|
|
248
254
|
class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
249
255
|
classes = computed(() => cn('ml-auto text-xs tracking-widest text-muted-foreground', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
250
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
251
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.
|
|
256
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: CommandShortcutComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
257
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.15", type: CommandShortcutComponent, isStandalone: true, selector: "span[ui-command-shortcut]", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()" } }, ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
252
258
|
}
|
|
253
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
259
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: CommandShortcutComponent, decorators: [{
|
|
254
260
|
type: Component,
|
|
255
261
|
args: [{
|
|
256
262
|
selector: 'span[ui-command-shortcut]',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"edsis-ui-command.mjs","sources":["../../../library/ui/command/command.component.ts","../../../library/ui/command/edsis-ui-command.ts"],"sourcesContent":["import {\n AfterContentInit,\n ChangeDetectionStrategy,\n Component,\n ContentChildren,\n DestroyRef,\n Directive,\n ElementRef,\n QueryList,\n ViewChild,\n computed,\n effect,\n forwardRef,\n inject,\n input,\n model,\n output,\n signal,\n} from '@angular/core';\nimport { cn } from '@edsis/ui/utils';\n\n/** Base class exposed to children for context lookup. */\n@Directive()\nexport abstract class CommandContextBase {\n abstract query: ReturnType<typeof model<string>>;\n abstract matches(text: string): boolean;\n abstract registerItem(item: CommandItemComponent): void;\n abstract unregisterItem(item: CommandItemComponent): void;\n abstract focusNext(delta: number): void;\n abstract focusFirst(): void;\n abstract hasVisibleItems(): boolean;\n abstract activateOnly(item: CommandItemComponent): void;\n}\n\n@Component({\n selector: 'ui-command',\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [{ provide: CommandContextBase, useExisting: forwardRef(() => CommandComponent) }],\n host: { '[class]': 'classes()' },\n template: `<ng-content />`,\n})\nexport class CommandComponent extends CommandContextBase {\n readonly query = model<string>('');\n readonly class = input<string>('');\n\n private readonly items = signal<CommandItemComponent[]>([]);\n private readonly activeIndex = signal(0);\n\n protected readonly classes = computed(() =>\n cn('flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground', this.class()),\n );\n\n override matches(text: string): boolean {\n const q = this.query().trim().toLowerCase();\n if (!q) return true;\n return text.toLowerCase().includes(q);\n }\n\n override registerItem(item: CommandItemComponent): void {\n this.items.update((list) => [...list, item]);\n }\n\n override unregisterItem(item: CommandItemComponent): void {\n this.items.update((list) => list.filter((i) => i !== item));\n }\n\n /** Items currently visible (not filtered out). */\n private visibleItems(): CommandItemComponent[] {\n return this.items().filter((it) => it.visible());\n }\n\n override focusNext(delta: number): void {\n const vis = this.visibleItems();\n if (vis.length === 0) return;\n const active = vis.findIndex((i) => i.active());\n const idx = active < 0 ? 0 : (active + delta + vis.length) % vis.length;\n vis.forEach((i, k) => i._setActive(k === idx));\n vis[idx].focus();\n }\n\n override focusFirst(): void {\n const vis = this.visibleItems();\n vis.forEach((i, k) => i._setActive(k === 0));\n vis[0]?.focus();\n }\n\n override hasVisibleItems(): boolean {\n return this.visibleItems().length > 0;\n }\n\n override activateOnly(item: CommandItemComponent): void {\n this.items().forEach((entry) => entry._setActive(entry === item));\n }\n\n /** Returns the first visible item's text if any. Used when user hits Enter with no active. */\n getActive(): CommandItemComponent | null {\n return this.visibleItems().find((i) => i.active()) ?? this.visibleItems()[0] ?? null;\n }\n}\n\n@Component({\n selector: 'input[ui-command-input]',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[class]': 'classes()',\n type: 'text',\n role: 'combobox',\n 'aria-autocomplete': 'list',\n 'aria-expanded': 'true',\n autocomplete: 'off',\n '[value]': 'ctx.query()',\n '[placeholder]': 'placeholder()',\n '(input)': 'onInput($any($event))',\n '(keydown.arrowDown)': 'onArrow($any($event), 1)',\n '(keydown.arrowUp)': 'onArrow($any($event), -1)',\n '(keydown.enter)': 'onEnter($any($event))',\n },\n template: ``,\n})\nexport class CommandInputComponent {\n protected readonly ctx = inject(CommandComponent);\n readonly placeholder = input<string>('Type a command or search…');\n readonly class = input<string>('');\n\n protected readonly classes = computed(() =>\n cn(\n 'flex h-11 w-full rounded-md bg-transparent px-3 py-3 text-sm outline-none',\n 'placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50',\n 'border-b border-border',\n this.class(),\n ),\n );\n\n protected onInput(e: Event): void {\n this.ctx.query.set((e.target as HTMLInputElement).value);\n queueMicrotask(() => this.ctx.focusFirst());\n }\n\n protected onArrow(e: KeyboardEvent, delta: number): void {\n e.preventDefault();\n this.ctx.focusNext(delta);\n }\n\n protected onEnter(e: KeyboardEvent): void {\n const active = this.ctx.getActive();\n if (active) {\n e.preventDefault();\n active._select(e);\n }\n }\n}\n\n@Component({\n selector: 'ui-command-list',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: { '[class]': 'classes()', role: 'listbox' },\n template: `<ng-content />`,\n})\nexport class CommandListComponent {\n readonly class = input<string>('');\n protected readonly classes = computed(() => cn('max-h-[300px] overflow-y-auto overflow-x-hidden p-1', this.class()));\n}\n\n@Component({\n selector: 'ui-command-empty',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[class]': 'classes()',\n '[hidden]': 'ctx.hasVisibleItems()',\n },\n template: `<ng-content>No results found.</ng-content>`,\n})\nexport class CommandEmptyComponent {\n protected readonly ctx = inject(CommandComponent);\n readonly class = input<string>('');\n protected readonly classes = computed(() => cn('py-6 text-center text-sm text-muted-foreground', this.class()));\n}\n\n@Component({\n selector: 'ui-command-group',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: { '[class]': 'classes()', role: 'group' },\n template: `\n @if (heading()) {\n <div class=\"px-2 py-1.5 text-xs font-medium text-muted-foreground\">{{ heading() }}</div>\n }\n <ng-content />\n `,\n})\nexport class CommandGroupComponent {\n readonly heading = input<string | null>(null);\n readonly class = input<string>('');\n protected readonly classes = computed(() => cn('overflow-hidden p-1 text-foreground', this.class()));\n}\n\n@Component({\n selector: 'ui-command-separator',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: { '[class]': 'classes()', role: 'separator' },\n template: '',\n})\nexport class CommandSeparatorComponent {\n readonly class = input<string>('');\n protected readonly classes = computed(() => cn('-mx-1 h-px bg-border block', this.class()));\n}\n\n@Component({\n selector: 'ui-command-item, button[ui-command-item]',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[class]': 'classes()',\n '[attr.role]': '\"option\"',\n '[attr.tabindex]': '-1',\n '[attr.aria-selected]': 'active()',\n '[attr.data-active]': 'active() ? \"true\" : null',\n '[attr.data-disabled]': 'disabled() ? \"true\" : null',\n '[hidden]': '!visible()',\n '(click)': '_select($any($event))',\n '(mousemove)': 'onHover()',\n },\n template: `<ng-content />`,\n})\nexport class CommandItemComponent {\n protected readonly ctx = inject(CommandComponent);\n private readonly el = inject<ElementRef<HTMLElement>>(ElementRef);\n\n readonly value = input<string>('');\n readonly disabled = input<boolean>(false);\n readonly class = input<string>('');\n\n readonly selected = output<MouseEvent | KeyboardEvent>();\n\n readonly active = signal(false);\n\n readonly visible = computed(() => {\n const text = this.value() || this.el.nativeElement.textContent || '';\n return this.ctx.matches(text);\n });\n\n protected readonly classes = computed(() =>\n cn(\n 'relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none',\n 'data-[active=true]:bg-accent data-[active=true]:text-accent-foreground',\n 'data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50',\n this.class(),\n ),\n );\n\n constructor() {\n this.ctx.registerItem(this);\n inject(DestroyRef).onDestroy(() => this.ctx.unregisterItem(this));\n }\n\n focus(): void {\n this.el.nativeElement.focus();\n }\n\n _setActive(active: boolean): void {\n this.active.set(active);\n }\n\n _select(e: MouseEvent | KeyboardEvent): void {\n if (this.disabled()) return;\n this.selected.emit(e);\n }\n\n protected onHover(): void {\n if (this.disabled()) return;\n this.ctx.activateOnly(this);\n }\n}\n\n@Component({\n selector: 'span[ui-command-shortcut]',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: { '[class]': 'classes()' },\n template: `<ng-content />`,\n})\nexport class CommandShortcutComponent {\n readonly class = input<string>('');\n protected readonly classes = computed(() =>\n cn('ml-auto text-xs tracking-widest text-muted-foreground', this.class()),\n );\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;AAqBA;MAEsB,kBAAkB,CAAA;wGAAlB,kBAAkB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;4FAAlB,kBAAkB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;4FAAlB,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBADvC;;AAmBK,MAAO,gBAAiB,SAAQ,kBAAkB,CAAA;AAC7C,IAAA,KAAK,GAAG,KAAK,CAAS,EAAE,4EAAC;AACzB,IAAA,KAAK,GAAG,KAAK,CAAS,EAAE,4EAAC;AAEjB,IAAA,KAAK,GAAG,MAAM,CAAyB,EAAE,4EAAC;AAC1C,IAAA,WAAW,GAAG,MAAM,CAAC,CAAC,kFAAC;AAErB,IAAA,OAAO,GAAG,QAAQ,CAAC,MACpC,EAAE,CAAC,2FAA2F,EAAE,IAAI,CAAC,KAAK,EAAE,CAAC,8EAC9G;AAEQ,IAAA,OAAO,CAAC,IAAY,EAAA;AAC3B,QAAA,MAAM,CAAC,GAAG,IAAI,CAAC,KAAK,EAAE,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE;AAC3C,QAAA,IAAI,CAAC,CAAC;AAAE,YAAA,OAAO,IAAI;QACnB,OAAO,IAAI,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC;IACvC;AAES,IAAA,YAAY,CAAC,IAA0B,EAAA;AAC9C,QAAA,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,KAAK,CAAC,GAAG,IAAI,EAAE,I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,EAAE,2BAA2B;oBACrC,eAAe,EAAE,uBAAuB,CAAC,MAAM;AAC/C,oBAAA,IAAI,EAAE,EAAE,SAAS,EAAE,WAAW,EAAE;AAChC,oBAAA,QAAQ,EAAE,CAAA,cAAA,CAAgB;AAC3B,iBAAA;;;ACrRD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"edsis-ui-command.mjs","sources":["../../../library/ui/command/command.component.ts","../../../library/ui/command/edsis-ui-command.ts"],"sourcesContent":["import {\n AfterContentInit,\n ChangeDetectionStrategy,\n Component,\n ContentChildren,\n DestroyRef,\n Directive,\n ElementRef,\n QueryList,\n ViewChild,\n computed,\n effect,\n forwardRef,\n inject,\n input,\n model,\n output,\n signal,\n} from '@angular/core';\nimport { cn } from '@edsis/ui/utils';\n\n/** Base class exposed to children for context lookup. */\n@Directive()\nexport abstract class CommandContextBase {\n abstract query: ReturnType<typeof model<string>>;\n abstract matches(text: string): boolean;\n abstract registerItem(item: CommandItemComponent): void;\n abstract unregisterItem(item: CommandItemComponent): void;\n abstract focusNext(delta: number): void;\n abstract focusFirst(): void;\n abstract hasVisibleItems(): boolean;\n abstract activateOnly(item: CommandItemComponent): void;\n abstract activeDescendantId(): string | null;\n}\n\nlet nextCommandItemId = 0;\n\n@Component({\n selector: 'ui-command',\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [{ provide: CommandContextBase, useExisting: forwardRef(() => CommandComponent) }],\n host: { '[class]': 'classes()' },\n template: `<ng-content />`,\n})\nexport class CommandComponent extends CommandContextBase {\n readonly query = model<string>('');\n readonly class = input<string>('');\n\n private readonly items = signal<CommandItemComponent[]>([]);\n\n protected readonly classes = computed(() =>\n cn('flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground', this.class()),\n );\n\n override matches(text: string): boolean {\n const q = this.query().trim().toLowerCase();\n if (!q) return true;\n return text.toLowerCase().includes(q);\n }\n\n override registerItem(item: CommandItemComponent): void {\n this.items.update((list) => [...list, item]);\n }\n\n override unregisterItem(item: CommandItemComponent): void {\n this.items.update((list) => list.filter((i) => i !== item));\n }\n\n /** Items currently visible (not filtered out). */\n private visibleItems(): CommandItemComponent[] {\n return this.items().filter((it) => it.visible());\n }\n\n override focusNext(delta: number): void {\n const vis = this.visibleItems();\n if (vis.length === 0) return;\n const active = vis.findIndex((i) => i.active());\n const idx = active < 0 ? 0 : (active + delta + vis.length) % vis.length;\n this.setActiveItem(vis[idx] ?? null);\n }\n\n override focusFirst(): void {\n this.setActiveItem(this.visibleItems()[0] ?? null);\n }\n\n override hasVisibleItems(): boolean {\n return this.visibleItems().length > 0;\n }\n\n override activateOnly(item: CommandItemComponent): void {\n this.setActiveItem(item);\n }\n\n override activeDescendantId(): string | null {\n return this.getActive()?.itemId ?? null;\n }\n\n /** Returns the first visible item's text if any. Used when user hits Enter with no active. */\n getActive(): CommandItemComponent | null {\n return this.visibleItems().find((i) => i.active()) ?? this.visibleItems()[0] ?? null;\n }\n\n private setActiveItem(activeItem: CommandItemComponent | null): void {\n this.items().forEach((item) => item._setActive(item === activeItem));\n }\n}\n\n@Component({\n selector: 'input[ui-command-input]',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[class]': 'classes()',\n type: 'text',\n role: 'combobox',\n 'aria-autocomplete': 'list',\n 'aria-expanded': 'true',\n '[attr.aria-activedescendant]': 'ctx.activeDescendantId()',\n autocomplete: 'off',\n '[value]': 'ctx.query()',\n '[placeholder]': 'placeholder()',\n '(input)': 'onInput($any($event))',\n '(keydown.arrowDown)': 'onArrow($any($event), 1)',\n '(keydown.arrowUp)': 'onArrow($any($event), -1)',\n '(keydown.enter)': 'onEnter($any($event))',\n },\n template: ``,\n})\nexport class CommandInputComponent {\n protected readonly ctx = inject(CommandComponent);\n readonly placeholder = input<string>('Type a command or search…');\n readonly class = input<string>('');\n\n protected readonly classes = computed(() =>\n cn(\n 'flex h-11 w-full rounded-md bg-transparent px-3 py-3 text-sm outline-none',\n 'placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50',\n 'border-b border-border',\n this.class(),\n ),\n );\n\n protected onInput(e: Event): void {\n this.ctx.query.set((e.target as HTMLInputElement).value);\n this.ctx.focusFirst();\n }\n\n protected onArrow(e: KeyboardEvent, delta: number): void {\n e.preventDefault();\n this.ctx.focusNext(delta);\n }\n\n protected onEnter(e: KeyboardEvent): void {\n const active = this.ctx.getActive();\n if (active) {\n e.preventDefault();\n active._select(e);\n }\n }\n}\n\n@Component({\n selector: 'ui-command-list',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: { '[class]': 'classes()', role: 'listbox' },\n template: `<ng-content />`,\n})\nexport class CommandListComponent {\n readonly class = input<string>('');\n protected readonly classes = computed(() => cn('max-h-[300px] overflow-y-auto overflow-x-hidden p-1', this.class()));\n}\n\n@Component({\n selector: 'ui-command-empty',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[class]': 'classes()',\n '[hidden]': 'ctx.hasVisibleItems()',\n },\n template: `<ng-content>No results found.</ng-content>`,\n})\nexport class CommandEmptyComponent {\n protected readonly ctx = inject(CommandComponent);\n readonly class = input<string>('');\n protected readonly classes = computed(() => cn('py-6 text-center text-sm text-muted-foreground', this.class()));\n}\n\n@Component({\n selector: 'ui-command-group',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: { '[class]': 'classes()', role: 'group' },\n template: `\n @if (heading()) {\n <div class=\"px-2 py-1.5 text-xs font-medium text-muted-foreground\">{{ heading() }}</div>\n }\n <ng-content />\n `,\n})\nexport class CommandGroupComponent {\n readonly heading = input<string | null>(null);\n readonly class = input<string>('');\n protected readonly classes = computed(() => cn('overflow-hidden p-1 text-foreground', this.class()));\n}\n\n@Component({\n selector: 'ui-command-separator',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: { '[class]': 'classes()', role: 'separator' },\n template: '',\n})\nexport class CommandSeparatorComponent {\n readonly class = input<string>('');\n protected readonly classes = computed(() => cn('-mx-1 h-px bg-border block', this.class()));\n}\n\n@Component({\n selector: 'ui-command-item, button[ui-command-item]',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[class]': 'classes()',\n '[attr.id]': 'itemId',\n '[attr.role]': '\"option\"',\n '[attr.tabindex]': '-1',\n '[attr.aria-selected]': 'active()',\n '[attr.data-active]': 'active() ? \"true\" : null',\n '[attr.data-disabled]': 'disabled() ? \"true\" : null',\n '[hidden]': '!visible()',\n '(click)': '_select($any($event))',\n '(mousemove)': 'onHover()',\n },\n template: `<ng-content />`,\n})\nexport class CommandItemComponent {\n protected readonly ctx = inject(CommandComponent);\n private readonly el = inject<ElementRef<HTMLElement>>(ElementRef);\n readonly itemId = `ui-command-item-${nextCommandItemId++}`;\n\n readonly value = input<string>('');\n readonly disabled = input<boolean>(false);\n readonly class = input<string>('');\n\n readonly selected = output<MouseEvent | KeyboardEvent>();\n\n readonly active = signal(false);\n\n readonly visible = computed(() => {\n const text = this.value() || this.el.nativeElement.textContent || '';\n return this.ctx.matches(text);\n });\n\n protected readonly classes = computed(() =>\n cn(\n 'relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none',\n 'data-[active=true]:bg-accent data-[active=true]:text-accent-foreground',\n 'data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50',\n this.class(),\n ),\n );\n\n constructor() {\n this.ctx.registerItem(this);\n inject(DestroyRef).onDestroy(() => this.ctx.unregisterItem(this));\n }\n\n focus(): void {\n this.el.nativeElement.focus();\n }\n\n _setActive(active: boolean): void {\n this.active.set(active);\n }\n\n _select(e: MouseEvent | KeyboardEvent): void {\n if (this.disabled()) return;\n this.selected.emit(e);\n }\n\n protected onHover(): void {\n if (this.disabled()) return;\n this.ctx.activateOnly(this);\n }\n}\n\n@Component({\n selector: 'span[ui-command-shortcut]',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: { '[class]': 'classes()' },\n template: `<ng-content />`,\n})\nexport class CommandShortcutComponent {\n readonly class = input<string>('');\n protected readonly classes = computed(() =>\n cn('ml-auto text-xs tracking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AW,EAAE;AAChC,oBAAA,QAAQ,EAAE,CAAA,cAAA,CAAgB;AAC3B,iBAAA;;;AC/RD;;AAEG;;;;"}
|
|
@@ -69,8 +69,8 @@ class ComposerComponent {
|
|
|
69
69
|
form.requestSubmit();
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
73
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.
|
|
72
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: ComposerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
73
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.15", type: ComposerComponent, isStandalone: true, selector: "ui-composer", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, inline: { classPropertyName: "inline", publicName: "inline", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, invalid: { classPropertyName: "invalid", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null }, submit: { classPropertyName: "submit", publicName: "submit", isSignal: true, isRequired: false, transformFunction: null }, submitForm: { classPropertyName: "submitForm", publicName: "submitForm", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { submitRequested: "submitRequested" }, host: { properties: { "class": "classes()", "attr.data-slot": "\"composer\"", "attr.data-variant": "variant()", "attr.data-inline": "inline() ? \"true\" : null", "attr.data-disabled": "disabled() ? \"true\" : null", "attr.aria-disabled": "disabled() ? \"true\" : null", "attr.aria-invalid": "invalid() ? \"true\" : null", "attr.inert": "disabled() ? \"\" : null" } }, ngImport: i0, template: `
|
|
74
74
|
<div
|
|
75
75
|
data-slot="composer-shell"
|
|
76
76
|
[class]="shellClasses()"
|
|
@@ -86,7 +86,7 @@ class ComposerComponent {
|
|
|
86
86
|
</div>
|
|
87
87
|
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
88
88
|
}
|
|
89
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
89
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: ComposerComponent, decorators: [{
|
|
90
90
|
type: Component,
|
|
91
91
|
args: [{
|
|
92
92
|
selector: 'ui-composer',
|
|
@@ -121,10 +121,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
|
|
|
121
121
|
class ComposerHeaderComponent {
|
|
122
122
|
class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
123
123
|
classes = computed(() => cn('flex min-w-0 flex-wrap gap-2 border-b border-border/70 px-2.5 py-2', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
124
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
125
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.
|
|
124
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: ComposerHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
125
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.15", type: ComposerHeaderComponent, isStandalone: true, selector: "ui-composer-header", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()", "attr.data-slot": "\"composer-header\"" } }, ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
126
126
|
}
|
|
127
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
127
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: ComposerHeaderComponent, decorators: [{
|
|
128
128
|
type: Component,
|
|
129
129
|
args: [{
|
|
130
130
|
selector: 'ui-composer-header',
|
|
@@ -139,10 +139,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
|
|
|
139
139
|
class ComposerFooterComponent {
|
|
140
140
|
class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
141
141
|
classes = computed(() => cn('border-t border-border/70 px-2.5 py-1.5 text-xs leading-5 text-muted-foreground', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
142
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
143
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.
|
|
142
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: ComposerFooterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
143
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.15", type: ComposerFooterComponent, isStandalone: true, selector: "ui-composer-footer", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()", "attr.data-slot": "\"composer-footer\"" } }, ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
144
144
|
}
|
|
145
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
145
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: ComposerFooterComponent, decorators: [{
|
|
146
146
|
type: Component,
|
|
147
147
|
args: [{
|
|
148
148
|
selector: 'ui-composer-footer',
|
|
@@ -157,10 +157,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
|
|
|
157
157
|
class ComposerActionsLeadingComponent {
|
|
158
158
|
class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
159
159
|
classes = computed(() => cn('flex min-h-8 shrink-0 items-center gap-1', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
160
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
161
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.
|
|
160
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: ComposerActionsLeadingComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
161
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.15", type: ComposerActionsLeadingComponent, isStandalone: true, selector: "ui-composer-actions-leading", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()", "attr.data-slot": "\"composer-actions-leading\"" } }, ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
162
162
|
}
|
|
163
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
163
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: ComposerActionsLeadingComponent, decorators: [{
|
|
164
164
|
type: Component,
|
|
165
165
|
args: [{
|
|
166
166
|
selector: 'ui-composer-actions-leading',
|
|
@@ -175,10 +175,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
|
|
|
175
175
|
class ComposerActionsTrailingComponent {
|
|
176
176
|
class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
177
177
|
classes = computed(() => cn('flex min-h-8 shrink-0 items-center justify-end gap-1', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
178
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
179
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.
|
|
178
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: ComposerActionsTrailingComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
179
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.15", type: ComposerActionsTrailingComponent, isStandalone: true, selector: "ui-composer-actions-trailing", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()", "attr.data-slot": "\"composer-actions-trailing\"" } }, ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
180
180
|
}
|
|
181
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
181
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: ComposerActionsTrailingComponent, decorators: [{
|
|
182
182
|
type: Component,
|
|
183
183
|
args: [{
|
|
184
184
|
selector: 'ui-composer-actions-trailing',
|
|
@@ -201,10 +201,10 @@ class ComposerInputComponent {
|
|
|
201
201
|
handleKeydown(event) {
|
|
202
202
|
this.composer?.handleInputKeydown(event);
|
|
203
203
|
}
|
|
204
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
205
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.
|
|
204
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: ComposerInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
205
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.15", type: ComposerInputComponent, isStandalone: true, selector: "ui-composer-input", inputs: { disabledInput: { classPropertyName: "disabledInput", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, invalidInput: { classPropertyName: "invalidInput", publicName: "aria-invalid", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "keydown": "handleKeydown($event)" }, properties: { "class": "classes()", "attr.data-slot": "\"composer-input\"", "attr.data-disabled": "disabled() ? \"true\" : null", "attr.aria-disabled": "disabled() ? \"true\" : null", "attr.aria-invalid": "invalid() ? \"true\" : null" } }, ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
206
206
|
}
|
|
207
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
207
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: ComposerInputComponent, decorators: [{
|
|
208
208
|
type: Component,
|
|
209
209
|
args: [{
|
|
210
210
|
selector: 'ui-composer-input',
|
|
@@ -286,8 +286,8 @@ class ComposerTextareaComponent {
|
|
|
286
286
|
const lineHeight = Number.parseFloat(getComputedStyle(textarea).lineHeight);
|
|
287
287
|
return Number.isFinite(lineHeight) ? lineHeight : 24;
|
|
288
288
|
}
|
|
289
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
290
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.
|
|
289
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: ComposerTextareaComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
290
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.15", type: ComposerTextareaComponent, isStandalone: true, selector: "textarea[ui-composer-input]", inputs: { rows: { classPropertyName: "rows", publicName: "rows", isSignal: true, isRequired: false, transformFunction: null }, maxRows: { classPropertyName: "maxRows", publicName: "maxRows", isSignal: true, isRequired: false, transformFunction: null }, disabledInput: { classPropertyName: "disabledInput", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, invalidInput: { classPropertyName: "invalidInput", publicName: "aria-invalid", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "input": "handleInput()", "blur": "handleBlur()", "keydown": "handleKeydown($event)" }, properties: { "class": "classes()", "attr.data-slot": "\"composer-input\"", "attr.rows": "rows()", "attr.disabled": "disabled() ? \"\" : null", "attr.aria-invalid": "invalid() ? \"true\" : null" } }, providers: [
|
|
291
291
|
{
|
|
292
292
|
provide: NG_VALUE_ACCESSOR,
|
|
293
293
|
useExisting: forwardRef(() => ComposerTextareaComponent),
|
|
@@ -295,7 +295,7 @@ class ComposerTextareaComponent {
|
|
|
295
295
|
},
|
|
296
296
|
], ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
297
297
|
}
|
|
298
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
298
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: ComposerTextareaComponent, decorators: [{
|
|
299
299
|
type: Component,
|
|
300
300
|
args: [{
|
|
301
301
|
selector: 'textarea[ui-composer-input]',
|