@ojiepermana/angular 0.1.0 → 21.0.0
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 -246
- package/chart/README.md +0 -0
- package/fesm2022/ojiepermana-angular-chart.mjs +3714 -0
- package/fesm2022/ojiepermana-angular-chart.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-component.mjs +3463 -0
- package/fesm2022/ojiepermana-angular-component.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-layout.mjs +272 -401
- package/fesm2022/ojiepermana-angular-layout.mjs.map +1 -1
- package/fesm2022/ojiepermana-angular-navigation.mjs +2225 -135
- package/fesm2022/ojiepermana-angular-navigation.mjs.map +1 -1
- package/fesm2022/ojiepermana-angular-theme.mjs +381 -1
- package/fesm2022/ojiepermana-angular-theme.mjs.map +1 -1
- package/fesm2022/ojiepermana-angular.mjs +15 -1
- package/fesm2022/ojiepermana-angular.mjs.map +1 -1
- package/package.json +49 -36
- package/theme/styles/etos.css +38 -0
- package/theme/styles/index.css +32 -8
- package/theme/styles/themes/brand/etos/color.css +21 -0
- package/theme/styles/themes/brand/etos/style.css +50 -0
- package/theme/styles/themes/library/_components.css +63 -0
- package/theme/styles/themes/library/_layers.css +15 -0
- package/theme/styles/themes/library/_material-overrides.css +254 -0
- package/theme/styles/themes/library/_tokens.css +54 -0
- package/theme/styles/themes/library/color/amber.css +18 -0
- package/theme/styles/themes/library/color/blue.css +23 -0
- package/theme/styles/themes/library/color/green.css +18 -0
- package/theme/styles/themes/library/color/index.css +9 -0
- package/theme/styles/themes/library/color/purple.css +18 -0
- package/theme/styles/themes/library/color/red.css +18 -0
- package/theme/styles/themes/library/style/brutal.css +47 -0
- package/theme/styles/themes/library/style/default.css +51 -0
- package/theme/styles/themes/library/style/index.css +8 -0
- package/theme/styles/themes/library/style/sharp.css +47 -0
- package/theme/styles/themes/library/style/soft.css +47 -0
- package/theme/styles/themes/mode/dark.css +20 -0
- package/theme/styles/themes/mode/index.css +6 -0
- package/theme/styles/themes/mode/light.css +24 -0
- package/theme/styles/themes/taildwind.css +109 -0
- package/types/ojiepermana-angular-chart.d.ts +1094 -0
- package/types/ojiepermana-angular-component.d.ts +1174 -0
- package/types/ojiepermana-angular-layout.d.ts +123 -76
- package/types/ojiepermana-angular-navigation.d.ts +257 -71
- package/types/ojiepermana-angular-theme.d.ts +170 -1
- package/types/ojiepermana-angular.d.ts +2 -1
- package/fesm2022/ojiepermana-angular-internal.mjs +0 -473
- package/fesm2022/ojiepermana-angular-internal.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-navigation-horizontal.mjs +0 -785
- package/fesm2022/ojiepermana-angular-navigation-horizontal.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-navigation-vertical.mjs +0 -1568
- package/fesm2022/ojiepermana-angular-navigation-vertical.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-shell.mjs +0 -14
- package/fesm2022/ojiepermana-angular-shell.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-theme-component.mjs +0 -235
- package/fesm2022/ojiepermana-angular-theme-component.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-theme-directive.mjs +0 -29
- package/fesm2022/ojiepermana-angular-theme-directive.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-theme-service.mjs +0 -241
- package/fesm2022/ojiepermana-angular-theme-service.mjs.map +0 -1
- package/layout/README.md +0 -144
- package/navigation/README.md +0 -215
- package/shell/README.md +0 -37
- package/styles/index.css +0 -2
- package/styles/resets.css +0 -22
- package/theme/README.md +0 -379
- package/theme/styles/adapters/material-ui/index.css +0 -205
- package/theme/styles/layout/horizontal.css +0 -109
- package/theme/styles/layout/index.css +0 -19
- package/theme/styles/layout/vertical.css +0 -75
- package/theme/styles/modes/dark.css +0 -84
- package/theme/styles/presets/colors/blue.css +0 -45
- package/theme/styles/presets/colors/brand.css +0 -52
- package/theme/styles/presets/colors/cyan.css +0 -45
- package/theme/styles/presets/colors/green.css +0 -45
- package/theme/styles/presets/colors/index.css +0 -7
- package/theme/styles/presets/colors/orange.css +0 -45
- package/theme/styles/presets/colors/purple.css +0 -45
- package/theme/styles/presets/colors/red.css +0 -45
- package/theme/styles/presets/styles/flat.css +0 -61
- package/theme/styles/presets/styles/glass.css +0 -28
- package/theme/styles/presets/styles/index.css +0 -2
- package/theme/styles/roles/index.css +0 -67
- package/theme/styles/tokens/foundation.css +0 -136
- package/theme/styles/tokens/semantic.css +0 -87
- package/theme/styles/utilities/index.css +0 -88
- package/types/ojiepermana-angular-internal.d.ts +0 -89
- package/types/ojiepermana-angular-navigation-horizontal.d.ts +0 -77
- package/types/ojiepermana-angular-navigation-vertical.d.ts +0 -260
- package/types/ojiepermana-angular-shell.d.ts +0 -12
- package/types/ojiepermana-angular-theme-component.d.ts +0 -46
- package/types/ojiepermana-angular-theme-directive.d.ts +0 -10
- package/types/ojiepermana-angular-theme-service.d.ts +0 -68
|
@@ -0,0 +1,3463 @@
|
|
|
1
|
+
import { clsx } from 'clsx';
|
|
2
|
+
import { twMerge } from 'tailwind-merge';
|
|
3
|
+
import * as i0 from '@angular/core';
|
|
4
|
+
import { Directive, input, model, computed, forwardRef, ChangeDetectionStrategy, Component, inject, signal, output, viewChild, ElementRef, DestroyRef, ViewContainerRef, effect, untracked, ContentChildren, TemplateRef, Injectable } from '@angular/core';
|
|
5
|
+
import { cva } from 'class-variance-authority';
|
|
6
|
+
import { MatCalendar, MatDatepicker, MatDatepickerInput, MatDatepickerToggle } from '@angular/material/datepicker';
|
|
7
|
+
import * as i1 from '@angular/forms';
|
|
8
|
+
import { NG_VALUE_ACCESSOR, FormControl, ReactiveFormsModule, NgControl } from '@angular/forms';
|
|
9
|
+
import { MatCheckbox } from '@angular/material/checkbox';
|
|
10
|
+
import { Overlay } from '@angular/cdk/overlay';
|
|
11
|
+
import { TemplatePortal } from '@angular/cdk/portal';
|
|
12
|
+
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
13
|
+
import { merge } from 'rxjs';
|
|
14
|
+
import { filter } from 'rxjs/operators';
|
|
15
|
+
import { MatFormField } from '@angular/material/form-field';
|
|
16
|
+
import { MatInput } from '@angular/material/input';
|
|
17
|
+
import { FocusTrapFactory, FocusKeyManager } from '@angular/cdk/a11y';
|
|
18
|
+
import { DOCUMENT } from '@angular/common';
|
|
19
|
+
import { MatRadioGroup, MatRadioButton } from '@angular/material/radio';
|
|
20
|
+
import { MatSelect } from '@angular/material/select';
|
|
21
|
+
import { MatOption } from '@angular/material/core';
|
|
22
|
+
import { MatSlideToggle } from '@angular/material/slide-toggle';
|
|
23
|
+
import { MatSnackBar } from '@angular/material/snack-bar';
|
|
24
|
+
import * as i1$1 from '@angular/material/tooltip';
|
|
25
|
+
import { MatTooltip } from '@angular/material/tooltip';
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Concatenate and dedupe Tailwind class names.
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
* cn('px-2 py-1', condition && 'bg-primary', props.class)
|
|
32
|
+
*/
|
|
33
|
+
function cn(...inputs) {
|
|
34
|
+
return twMerge(clsx(inputs));
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
class AccordionContextBase {
|
|
38
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AccordionContextBase, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
39
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.9", type: AccordionContextBase, isStandalone: true, ngImport: i0 });
|
|
40
|
+
}
|
|
41
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AccordionContextBase, decorators: [{
|
|
42
|
+
type: Directive
|
|
43
|
+
}] });
|
|
44
|
+
class AccordionComponent extends AccordionContextBase {
|
|
45
|
+
type = input('single', ...(ngDevMode ? [{ debugName: "type" }] : /* istanbul ignore next */ []));
|
|
46
|
+
collapsible = input(true, ...(ngDevMode ? [{ debugName: "collapsible" }] : /* istanbul ignore next */ []));
|
|
47
|
+
value = model(null, ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
48
|
+
class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
49
|
+
classes = computed(() => cn('block', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
50
|
+
openSet = computed(() => {
|
|
51
|
+
const v = this.value();
|
|
52
|
+
if (v == null)
|
|
53
|
+
return new Set();
|
|
54
|
+
return new Set(Array.isArray(v) ? v : [v]);
|
|
55
|
+
}, ...(ngDevMode ? [{ debugName: "openSet" }] : /* istanbul ignore next */ []));
|
|
56
|
+
isOpen(value) {
|
|
57
|
+
return this.openSet().has(value);
|
|
58
|
+
}
|
|
59
|
+
toggle(value) {
|
|
60
|
+
const isMulti = this.type() === 'multiple';
|
|
61
|
+
const current = this.openSet();
|
|
62
|
+
const open = current.has(value);
|
|
63
|
+
if (isMulti) {
|
|
64
|
+
const next = new Set(current);
|
|
65
|
+
open ? next.delete(value) : next.add(value);
|
|
66
|
+
this.value.set([...next]);
|
|
67
|
+
}
|
|
68
|
+
else {
|
|
69
|
+
if (open) {
|
|
70
|
+
if (this.collapsible())
|
|
71
|
+
this.value.set(null);
|
|
72
|
+
}
|
|
73
|
+
else {
|
|
74
|
+
this.value.set(value);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AccordionComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
79
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.9", type: AccordionComponent, isStandalone: true, selector: "ui-accordion", inputs: { type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, collapsible: { classPropertyName: "collapsible", publicName: "collapsible", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange" }, host: { properties: { "class": "classes()" } }, providers: [{ provide: AccordionContextBase, useExisting: forwardRef(() => AccordionComponent) }], usesInheritance: true, ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
80
|
+
}
|
|
81
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AccordionComponent, decorators: [{
|
|
82
|
+
type: Component,
|
|
83
|
+
args: [{
|
|
84
|
+
selector: 'ui-accordion',
|
|
85
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
86
|
+
providers: [{ provide: AccordionContextBase, useExisting: forwardRef(() => AccordionComponent) }],
|
|
87
|
+
host: { '[class]': 'classes()' },
|
|
88
|
+
template: `<ng-content />`,
|
|
89
|
+
}]
|
|
90
|
+
}], propDecorators: { type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], collapsible: [{ type: i0.Input, args: [{ isSignal: true, alias: "collapsible", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
91
|
+
class AccordionItemComponent {
|
|
92
|
+
ctx = inject(AccordionContextBase);
|
|
93
|
+
value = input.required(...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
94
|
+
disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
95
|
+
class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
96
|
+
triggerId = `ui-accordion-trigger-${nextId$1()}`;
|
|
97
|
+
contentId = `ui-accordion-content-${nextId$1()}`;
|
|
98
|
+
classes = computed(() => cn('border-b', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
99
|
+
open = computed(() => this.ctx.isOpen(this.value()), ...(ngDevMode ? [{ debugName: "open" }] : /* istanbul ignore next */ []));
|
|
100
|
+
toggle() {
|
|
101
|
+
if (!this.disabled())
|
|
102
|
+
this.ctx.toggle(this.value());
|
|
103
|
+
}
|
|
104
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AccordionItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
105
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.9", type: AccordionItemComponent, isStandalone: true, selector: "ui-accordion-item", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()", "attr.data-state": "open() ? \"open\" : \"closed\"", "attr.data-disabled": "disabled() ? \"\" : null" } }, ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
106
|
+
}
|
|
107
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AccordionItemComponent, decorators: [{
|
|
108
|
+
type: Component,
|
|
109
|
+
args: [{
|
|
110
|
+
selector: 'ui-accordion-item',
|
|
111
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
112
|
+
host: {
|
|
113
|
+
'[class]': 'classes()',
|
|
114
|
+
'[attr.data-state]': 'open() ? "open" : "closed"',
|
|
115
|
+
'[attr.data-disabled]': 'disabled() ? "" : null',
|
|
116
|
+
},
|
|
117
|
+
template: `<ng-content />`,
|
|
118
|
+
}]
|
|
119
|
+
}], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: true }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
120
|
+
class AccordionTriggerComponent {
|
|
121
|
+
item = inject(AccordionItemComponent);
|
|
122
|
+
class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
123
|
+
classes = computed(() => cn('flex flex-1 w-full items-center justify-between py-4 text-sm font-medium', 'transition-all hover:underline', 'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring', 'disabled:pointer-events-none disabled:opacity-50', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
124
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AccordionTriggerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
125
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.9", type: AccordionTriggerComponent, isStandalone: true, selector: "button[ui-accordion-trigger]", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "type": "button" }, listeners: { "click": "item.toggle()" }, properties: { "class": "classes()", "attr.id": "item.triggerId", "attr.aria-controls": "item.contentId", "attr.aria-expanded": "item.open()", "attr.data-state": "item.open() ? \"open\" : \"closed\"", "disabled": "item.disabled() || null" } }, ngImport: i0, template: `
|
|
126
|
+
<ng-content />
|
|
127
|
+
<svg
|
|
128
|
+
aria-hidden="true"
|
|
129
|
+
class="h-4 w-4 shrink-0 transition-transform duration-200"
|
|
130
|
+
[class.rotate-180]="item.open()"
|
|
131
|
+
viewBox="0 0 24 24"
|
|
132
|
+
fill="none"
|
|
133
|
+
stroke="currentColor"
|
|
134
|
+
stroke-width="2"
|
|
135
|
+
stroke-linecap="round"
|
|
136
|
+
stroke-linejoin="round">
|
|
137
|
+
<polyline points="6 9 12 15 18 9" />
|
|
138
|
+
</svg>
|
|
139
|
+
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
140
|
+
}
|
|
141
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AccordionTriggerComponent, decorators: [{
|
|
142
|
+
type: Component,
|
|
143
|
+
args: [{
|
|
144
|
+
selector: 'button[ui-accordion-trigger]',
|
|
145
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
146
|
+
host: {
|
|
147
|
+
'[class]': 'classes()',
|
|
148
|
+
type: 'button',
|
|
149
|
+
'[attr.id]': 'item.triggerId',
|
|
150
|
+
'[attr.aria-controls]': 'item.contentId',
|
|
151
|
+
'[attr.aria-expanded]': 'item.open()',
|
|
152
|
+
'[attr.data-state]': 'item.open() ? "open" : "closed"',
|
|
153
|
+
'[disabled]': 'item.disabled() || null',
|
|
154
|
+
'(click)': 'item.toggle()',
|
|
155
|
+
},
|
|
156
|
+
template: `
|
|
157
|
+
<ng-content />
|
|
158
|
+
<svg
|
|
159
|
+
aria-hidden="true"
|
|
160
|
+
class="h-4 w-4 shrink-0 transition-transform duration-200"
|
|
161
|
+
[class.rotate-180]="item.open()"
|
|
162
|
+
viewBox="0 0 24 24"
|
|
163
|
+
fill="none"
|
|
164
|
+
stroke="currentColor"
|
|
165
|
+
stroke-width="2"
|
|
166
|
+
stroke-linecap="round"
|
|
167
|
+
stroke-linejoin="round">
|
|
168
|
+
<polyline points="6 9 12 15 18 9" />
|
|
169
|
+
</svg>
|
|
170
|
+
`,
|
|
171
|
+
}]
|
|
172
|
+
}], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
173
|
+
class AccordionContentComponent {
|
|
174
|
+
item = inject(AccordionItemComponent);
|
|
175
|
+
class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
176
|
+
classes = computed(() => cn('overflow-hidden text-sm', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
177
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AccordionContentComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
178
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.9", type: AccordionContentComponent, isStandalone: true, selector: "ui-accordion-content", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()", "attr.id": "item.contentId", "attr.role": "\"region\"", "attr.aria-labelledby": "item.triggerId", "attr.data-state": "item.open() ? \"open\" : \"closed\"", "hidden": "!item.open()" } }, ngImport: i0, template: `<div class="pb-4 pt-0 text-sm"><ng-content /></div>`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
179
|
+
}
|
|
180
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AccordionContentComponent, decorators: [{
|
|
181
|
+
type: Component,
|
|
182
|
+
args: [{
|
|
183
|
+
selector: 'ui-accordion-content',
|
|
184
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
185
|
+
host: {
|
|
186
|
+
'[class]': 'classes()',
|
|
187
|
+
'[attr.id]': 'item.contentId',
|
|
188
|
+
'[attr.role]': '"region"',
|
|
189
|
+
'[attr.aria-labelledby]': 'item.triggerId',
|
|
190
|
+
'[attr.data-state]': 'item.open() ? "open" : "closed"',
|
|
191
|
+
'[hidden]': '!item.open()',
|
|
192
|
+
},
|
|
193
|
+
template: `<div class="pb-4 pt-0 text-sm"><ng-content /></div>`,
|
|
194
|
+
}]
|
|
195
|
+
}], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
196
|
+
let _id = 0;
|
|
197
|
+
function nextId$1() {
|
|
198
|
+
return ++_id;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
const alertVariants = cva([
|
|
202
|
+
'relative w-full rounded-lg border p-4',
|
|
203
|
+
'[&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px]',
|
|
204
|
+
'[&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground',
|
|
205
|
+
].join(' '), {
|
|
206
|
+
variants: {
|
|
207
|
+
variant: {
|
|
208
|
+
default: 'bg-background text-foreground',
|
|
209
|
+
destructive: 'border-destructive/50 text-destructive [&>svg]:text-destructive dark:border-destructive',
|
|
210
|
+
},
|
|
211
|
+
},
|
|
212
|
+
defaultVariants: { variant: 'default' },
|
|
213
|
+
});
|
|
214
|
+
|
|
215
|
+
class AlertComponent {
|
|
216
|
+
variant = input('default', ...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
|
|
217
|
+
class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
218
|
+
classes = computed(() => cn(alertVariants({ variant: this.variant() }), this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
219
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AlertComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
220
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.9", type: AlertComponent, isStandalone: true, selector: "ui-alert", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()", "attr.role": "\"alert\"" } }, ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
221
|
+
}
|
|
222
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AlertComponent, decorators: [{
|
|
223
|
+
type: Component,
|
|
224
|
+
args: [{
|
|
225
|
+
selector: 'ui-alert',
|
|
226
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
227
|
+
host: {
|
|
228
|
+
'[class]': 'classes()',
|
|
229
|
+
'[attr.role]': '"alert"',
|
|
230
|
+
},
|
|
231
|
+
template: `<ng-content />`,
|
|
232
|
+
}]
|
|
233
|
+
}], propDecorators: { variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
234
|
+
class AlertTitleComponent {
|
|
235
|
+
class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
236
|
+
classes = computed(() => cn('mb-1 font-medium leading-none tracking-tight', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
237
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AlertTitleComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
238
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.9", type: AlertTitleComponent, isStandalone: true, selector: "ui-alert-title, h5[ui-alert-title]", 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 });
|
|
239
|
+
}
|
|
240
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AlertTitleComponent, decorators: [{
|
|
241
|
+
type: Component,
|
|
242
|
+
args: [{
|
|
243
|
+
selector: 'ui-alert-title, h5[ui-alert-title]',
|
|
244
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
245
|
+
host: { '[class]': 'classes()' },
|
|
246
|
+
template: `<ng-content />`,
|
|
247
|
+
}]
|
|
248
|
+
}], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
249
|
+
class AlertDescriptionComponent {
|
|
250
|
+
class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
251
|
+
classes = computed(() => cn('text-sm [&_p]:leading-relaxed', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
252
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AlertDescriptionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
253
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.9", type: AlertDescriptionComponent, isStandalone: true, selector: "ui-alert-description", 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 });
|
|
254
|
+
}
|
|
255
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AlertDescriptionComponent, decorators: [{
|
|
256
|
+
type: Component,
|
|
257
|
+
args: [{
|
|
258
|
+
selector: 'ui-alert-description',
|
|
259
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
260
|
+
host: { '[class]': 'classes()' },
|
|
261
|
+
template: `<ng-content />`,
|
|
262
|
+
}]
|
|
263
|
+
}], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
264
|
+
|
|
265
|
+
class AvatarComponent {
|
|
266
|
+
class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
267
|
+
classes = computed(() => cn('relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
268
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AvatarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
269
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.9", type: AvatarComponent, isStandalone: true, selector: "ui-avatar", 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 });
|
|
270
|
+
}
|
|
271
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AvatarComponent, decorators: [{
|
|
272
|
+
type: Component,
|
|
273
|
+
args: [{
|
|
274
|
+
selector: 'ui-avatar',
|
|
275
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
276
|
+
host: { '[class]': 'classes()' },
|
|
277
|
+
template: `<ng-content />`,
|
|
278
|
+
}]
|
|
279
|
+
}], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
280
|
+
class AvatarImageComponent {
|
|
281
|
+
src = input.required(...(ngDevMode ? [{ debugName: "src" }] : /* istanbul ignore next */ []));
|
|
282
|
+
alt = input('', ...(ngDevMode ? [{ debugName: "alt" }] : /* istanbul ignore next */ []));
|
|
283
|
+
class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
284
|
+
failed = signal(false, ...(ngDevMode ? [{ debugName: "failed" }] : /* istanbul ignore next */ []));
|
|
285
|
+
classes = computed(() => cn('aspect-square h-full w-full object-cover', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
286
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AvatarImageComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
287
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: AvatarImageComponent, isStandalone: true, selector: "ui-avatar-image", inputs: { src: { classPropertyName: "src", publicName: "src", isSignal: true, isRequired: true, transformFunction: null }, alt: { classPropertyName: "alt", publicName: "alt", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
|
|
288
|
+
@if (!failed()) {
|
|
289
|
+
<img [src]="src()" [alt]="alt()" [class]="classes()" (error)="failed.set(true)" />
|
|
290
|
+
}
|
|
291
|
+
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
292
|
+
}
|
|
293
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AvatarImageComponent, decorators: [{
|
|
294
|
+
type: Component,
|
|
295
|
+
args: [{
|
|
296
|
+
selector: 'ui-avatar-image',
|
|
297
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
298
|
+
template: `
|
|
299
|
+
@if (!failed()) {
|
|
300
|
+
<img [src]="src()" [alt]="alt()" [class]="classes()" (error)="failed.set(true)" />
|
|
301
|
+
}
|
|
302
|
+
`,
|
|
303
|
+
}]
|
|
304
|
+
}], propDecorators: { src: [{ type: i0.Input, args: [{ isSignal: true, alias: "src", required: true }] }], alt: [{ type: i0.Input, args: [{ isSignal: true, alias: "alt", required: false }] }], class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
305
|
+
class AvatarFallbackComponent {
|
|
306
|
+
class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
307
|
+
classes = computed(() => cn('flex h-full w-full items-center justify-center rounded-full bg-muted text-sm font-medium text-muted-foreground', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
308
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AvatarFallbackComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
309
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.9", type: AvatarFallbackComponent, isStandalone: true, selector: "ui-avatar-fallback", 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 });
|
|
310
|
+
}
|
|
311
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AvatarFallbackComponent, decorators: [{
|
|
312
|
+
type: Component,
|
|
313
|
+
args: [{
|
|
314
|
+
selector: 'ui-avatar-fallback',
|
|
315
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
316
|
+
host: { '[class]': 'classes()' },
|
|
317
|
+
template: `<ng-content />`,
|
|
318
|
+
}]
|
|
319
|
+
}], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
320
|
+
|
|
321
|
+
const badgeVariants = cva([
|
|
322
|
+
'inline-flex items-center rounded-full border px-2.5 py-0.5',
|
|
323
|
+
'text-xs font-semibold transition-colors',
|
|
324
|
+
'focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2',
|
|
325
|
+
].join(' '), {
|
|
326
|
+
variants: {
|
|
327
|
+
variant: {
|
|
328
|
+
default: 'border-transparent bg-primary text-primary-foreground hover:bg-primary/80',
|
|
329
|
+
secondary: 'border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80',
|
|
330
|
+
destructive: 'border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80',
|
|
331
|
+
outline: 'text-foreground',
|
|
332
|
+
},
|
|
333
|
+
},
|
|
334
|
+
defaultVariants: { variant: 'default' },
|
|
335
|
+
});
|
|
336
|
+
|
|
337
|
+
class BadgeComponent {
|
|
338
|
+
variant = input('default', ...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
|
|
339
|
+
class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
340
|
+
classes = computed(() => cn(badgeVariants({ variant: this.variant() }), this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
341
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: BadgeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
342
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.9", type: BadgeComponent, isStandalone: true, selector: "ui-badge, span[ui-badge]", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, 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 });
|
|
343
|
+
}
|
|
344
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: BadgeComponent, decorators: [{
|
|
345
|
+
type: Component,
|
|
346
|
+
args: [{
|
|
347
|
+
selector: 'ui-badge, span[ui-badge]',
|
|
348
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
349
|
+
host: { '[class]': 'classes()' },
|
|
350
|
+
template: `<ng-content />`,
|
|
351
|
+
}]
|
|
352
|
+
}], propDecorators: { variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
353
|
+
|
|
354
|
+
class BreadcrumbComponent {
|
|
355
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: BreadcrumbComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
356
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.9", type: BreadcrumbComponent, isStandalone: true, selector: "ui-breadcrumb, nav[ui-breadcrumb]", host: { properties: { "attr.aria-label": "\"breadcrumb\"" } }, ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
357
|
+
}
|
|
358
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: BreadcrumbComponent, decorators: [{
|
|
359
|
+
type: Component,
|
|
360
|
+
args: [{
|
|
361
|
+
selector: 'ui-breadcrumb, nav[ui-breadcrumb]',
|
|
362
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
363
|
+
host: {
|
|
364
|
+
'[attr.aria-label]': '"breadcrumb"',
|
|
365
|
+
},
|
|
366
|
+
template: `<ng-content />`,
|
|
367
|
+
}]
|
|
368
|
+
}] });
|
|
369
|
+
class BreadcrumbListComponent {
|
|
370
|
+
class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
371
|
+
classes = computed(() => cn('flex flex-wrap items-center gap-1.5 break-words text-sm text-muted-foreground sm:gap-2.5', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
372
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: BreadcrumbListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
373
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.9", type: BreadcrumbListComponent, isStandalone: true, selector: "ol[ui-breadcrumb-list]", 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 });
|
|
374
|
+
}
|
|
375
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: BreadcrumbListComponent, decorators: [{
|
|
376
|
+
type: Component,
|
|
377
|
+
args: [{
|
|
378
|
+
selector: 'ol[ui-breadcrumb-list]',
|
|
379
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
380
|
+
host: { '[class]': 'classes()' },
|
|
381
|
+
template: `<ng-content />`,
|
|
382
|
+
}]
|
|
383
|
+
}], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
384
|
+
class BreadcrumbItemComponent {
|
|
385
|
+
class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
386
|
+
classes = computed(() => cn('inline-flex items-center gap-1.5', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
387
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: BreadcrumbItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
388
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.9", type: BreadcrumbItemComponent, isStandalone: true, selector: "li[ui-breadcrumb-item]", 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 });
|
|
389
|
+
}
|
|
390
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: BreadcrumbItemComponent, decorators: [{
|
|
391
|
+
type: Component,
|
|
392
|
+
args: [{
|
|
393
|
+
selector: 'li[ui-breadcrumb-item]',
|
|
394
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
395
|
+
host: { '[class]': 'classes()' },
|
|
396
|
+
template: `<ng-content />`,
|
|
397
|
+
}]
|
|
398
|
+
}], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
399
|
+
class BreadcrumbLinkComponent {
|
|
400
|
+
class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
401
|
+
classes = computed(() => cn('transition-colors hover:text-foreground', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
402
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: BreadcrumbLinkComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
403
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.9", type: BreadcrumbLinkComponent, isStandalone: true, selector: "a[ui-breadcrumb-link]", 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 });
|
|
404
|
+
}
|
|
405
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: BreadcrumbLinkComponent, decorators: [{
|
|
406
|
+
type: Component,
|
|
407
|
+
args: [{
|
|
408
|
+
selector: 'a[ui-breadcrumb-link]',
|
|
409
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
410
|
+
host: { '[class]': 'classes()' },
|
|
411
|
+
template: `<ng-content />`,
|
|
412
|
+
}]
|
|
413
|
+
}], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
414
|
+
class BreadcrumbPageComponent {
|
|
415
|
+
class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
416
|
+
classes = computed(() => cn('font-normal text-foreground', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
417
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: BreadcrumbPageComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
418
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.9", type: BreadcrumbPageComponent, isStandalone: true, selector: "span[ui-breadcrumb-page]", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "link", "aria-disabled": "true", "aria-current": "page" }, properties: { "class": "classes()" } }, ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
419
|
+
}
|
|
420
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: BreadcrumbPageComponent, decorators: [{
|
|
421
|
+
type: Component,
|
|
422
|
+
args: [{
|
|
423
|
+
selector: 'span[ui-breadcrumb-page]',
|
|
424
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
425
|
+
host: {
|
|
426
|
+
'[class]': 'classes()',
|
|
427
|
+
role: 'link',
|
|
428
|
+
'aria-disabled': 'true',
|
|
429
|
+
'aria-current': 'page',
|
|
430
|
+
},
|
|
431
|
+
template: `<ng-content />`,
|
|
432
|
+
}]
|
|
433
|
+
}], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
434
|
+
class BreadcrumbSeparatorComponent {
|
|
435
|
+
class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
436
|
+
classes = computed(() => cn('[&>svg]:size-3.5', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
437
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: BreadcrumbSeparatorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
438
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.9", type: BreadcrumbSeparatorComponent, isStandalone: true, selector: "li[ui-breadcrumb-separator]", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "presentation", "aria-hidden": "true" }, properties: { "class": "classes()" } }, ngImport: i0, template: `
|
|
439
|
+
<ng-content>
|
|
440
|
+
<svg
|
|
441
|
+
class="h-3.5 w-3.5"
|
|
442
|
+
viewBox="0 0 24 24"
|
|
443
|
+
fill="none"
|
|
444
|
+
stroke="currentColor"
|
|
445
|
+
stroke-width="2"
|
|
446
|
+
stroke-linecap="round"
|
|
447
|
+
stroke-linejoin="round">
|
|
448
|
+
<polyline points="9 18 15 12 9 6" />
|
|
449
|
+
</svg>
|
|
450
|
+
</ng-content>
|
|
451
|
+
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
452
|
+
}
|
|
453
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: BreadcrumbSeparatorComponent, decorators: [{
|
|
454
|
+
type: Component,
|
|
455
|
+
args: [{
|
|
456
|
+
selector: 'li[ui-breadcrumb-separator]',
|
|
457
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
458
|
+
host: {
|
|
459
|
+
'[class]': 'classes()',
|
|
460
|
+
role: 'presentation',
|
|
461
|
+
'aria-hidden': 'true',
|
|
462
|
+
},
|
|
463
|
+
template: `
|
|
464
|
+
<ng-content>
|
|
465
|
+
<svg
|
|
466
|
+
class="h-3.5 w-3.5"
|
|
467
|
+
viewBox="0 0 24 24"
|
|
468
|
+
fill="none"
|
|
469
|
+
stroke="currentColor"
|
|
470
|
+
stroke-width="2"
|
|
471
|
+
stroke-linecap="round"
|
|
472
|
+
stroke-linejoin="round">
|
|
473
|
+
<polyline points="9 18 15 12 9 6" />
|
|
474
|
+
</svg>
|
|
475
|
+
</ng-content>
|
|
476
|
+
`,
|
|
477
|
+
}]
|
|
478
|
+
}], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
479
|
+
class BreadcrumbEllipsisComponent {
|
|
480
|
+
class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
481
|
+
classes = computed(() => cn('flex h-9 w-9 items-center justify-center', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
482
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: BreadcrumbEllipsisComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
483
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.9", type: BreadcrumbEllipsisComponent, isStandalone: true, selector: "span[ui-breadcrumb-ellipsis]", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "presentation", "aria-hidden": "true" }, properties: { "class": "classes()" } }, ngImport: i0, template: `
|
|
484
|
+
<svg
|
|
485
|
+
class="h-4 w-4"
|
|
486
|
+
viewBox="0 0 24 24"
|
|
487
|
+
fill="none"
|
|
488
|
+
stroke="currentColor"
|
|
489
|
+
stroke-width="2"
|
|
490
|
+
stroke-linecap="round"
|
|
491
|
+
stroke-linejoin="round">
|
|
492
|
+
<circle cx="12" cy="12" r="1" />
|
|
493
|
+
<circle cx="19" cy="12" r="1" />
|
|
494
|
+
<circle cx="5" cy="12" r="1" />
|
|
495
|
+
</svg>
|
|
496
|
+
<span class="sr-only">More</span>
|
|
497
|
+
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
498
|
+
}
|
|
499
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: BreadcrumbEllipsisComponent, decorators: [{
|
|
500
|
+
type: Component,
|
|
501
|
+
args: [{
|
|
502
|
+
selector: 'span[ui-breadcrumb-ellipsis]',
|
|
503
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
504
|
+
host: {
|
|
505
|
+
'[class]': 'classes()',
|
|
506
|
+
role: 'presentation',
|
|
507
|
+
'aria-hidden': 'true',
|
|
508
|
+
},
|
|
509
|
+
template: `
|
|
510
|
+
<svg
|
|
511
|
+
class="h-4 w-4"
|
|
512
|
+
viewBox="0 0 24 24"
|
|
513
|
+
fill="none"
|
|
514
|
+
stroke="currentColor"
|
|
515
|
+
stroke-width="2"
|
|
516
|
+
stroke-linecap="round"
|
|
517
|
+
stroke-linejoin="round">
|
|
518
|
+
<circle cx="12" cy="12" r="1" />
|
|
519
|
+
<circle cx="19" cy="12" r="1" />
|
|
520
|
+
<circle cx="5" cy="12" r="1" />
|
|
521
|
+
</svg>
|
|
522
|
+
<span class="sr-only">More</span>
|
|
523
|
+
`,
|
|
524
|
+
}]
|
|
525
|
+
}], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
526
|
+
|
|
527
|
+
const buttonVariants = cva([
|
|
528
|
+
'inline-flex items-center justify-center gap-2 whitespace-nowrap',
|
|
529
|
+
'rounded-md text-sm font-medium',
|
|
530
|
+
'transition-colors',
|
|
531
|
+
'focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring',
|
|
532
|
+
'disabled:pointer-events-none disabled:opacity-50',
|
|
533
|
+
'[&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0',
|
|
534
|
+
].join(' '), {
|
|
535
|
+
variants: {
|
|
536
|
+
variant: {
|
|
537
|
+
default: 'bg-primary text-primary-foreground hover:bg-primary/90',
|
|
538
|
+
destructive: 'bg-destructive text-destructive-foreground hover:bg-destructive/90',
|
|
539
|
+
outline: 'border border-input bg-background hover:bg-accent hover:text-accent-foreground',
|
|
540
|
+
secondary: 'bg-secondary text-secondary-foreground hover:bg-secondary/80',
|
|
541
|
+
ghost: 'hover:bg-accent hover:text-accent-foreground',
|
|
542
|
+
link: 'text-primary underline-offset-4 hover:underline',
|
|
543
|
+
},
|
|
544
|
+
size: {
|
|
545
|
+
default: 'h-9 px-4 py-2',
|
|
546
|
+
sm: 'h-8 rounded-md px-3 text-xs',
|
|
547
|
+
lg: 'h-10 rounded-md px-8',
|
|
548
|
+
icon: 'h-9 w-9',
|
|
549
|
+
},
|
|
550
|
+
},
|
|
551
|
+
defaultVariants: { variant: 'default', size: 'default' },
|
|
552
|
+
});
|
|
553
|
+
|
|
554
|
+
/**
|
|
555
|
+
* Button component (native <button>, no Material).
|
|
556
|
+
* Use on `<button>` or `<a>` via the attribute selectors.
|
|
557
|
+
*/
|
|
558
|
+
class ButtonComponent {
|
|
559
|
+
variant = input('default', ...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
|
|
560
|
+
size = input('default', ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
561
|
+
class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
562
|
+
classes = computed(() => cn(buttonVariants({ variant: this.variant(), size: this.size() }), this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
563
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: ButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
564
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.9", type: ButtonComponent, isStandalone: true, selector: "button[ui-button], a[ui-button]", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()", "attr.data-variant": "variant()", "attr.data-size": "size()" } }, ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
565
|
+
}
|
|
566
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: ButtonComponent, decorators: [{
|
|
567
|
+
type: Component,
|
|
568
|
+
args: [{
|
|
569
|
+
selector: 'button[ui-button], a[ui-button]',
|
|
570
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
571
|
+
host: {
|
|
572
|
+
'[class]': 'classes()',
|
|
573
|
+
'[attr.data-variant]': 'variant()',
|
|
574
|
+
'[attr.data-size]': 'size()',
|
|
575
|
+
},
|
|
576
|
+
template: `<ng-content />`,
|
|
577
|
+
}]
|
|
578
|
+
}], propDecorators: { variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
579
|
+
|
|
580
|
+
/**
|
|
581
|
+
* Inline calendar built on MatCalendar. Requires a date adapter provider in the
|
|
582
|
+
* consumer app (e.g. `provideNativeDateAdapter()` from `@angular/material/core`).
|
|
583
|
+
*/
|
|
584
|
+
class CalendarComponent {
|
|
585
|
+
value = model(null, ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
586
|
+
min = input(null, ...(ngDevMode ? [{ debugName: "min" }] : /* istanbul ignore next */ []));
|
|
587
|
+
max = input(null, ...(ngDevMode ? [{ debugName: "max" }] : /* istanbul ignore next */ []));
|
|
588
|
+
startAt = input(null, ...(ngDevMode ? [{ debugName: "startAt" }] : /* istanbul ignore next */ []));
|
|
589
|
+
class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
590
|
+
classes = computed(() => cn('', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
591
|
+
onChangeFn = () => { };
|
|
592
|
+
onTouchedFn = () => { };
|
|
593
|
+
onSelect(d) {
|
|
594
|
+
this.value.set(d);
|
|
595
|
+
this.onChangeFn(d);
|
|
596
|
+
this.onTouchedFn();
|
|
597
|
+
}
|
|
598
|
+
writeValue(v) {
|
|
599
|
+
this.value.set(v);
|
|
600
|
+
}
|
|
601
|
+
registerOnChange(fn) {
|
|
602
|
+
this.onChangeFn = fn;
|
|
603
|
+
}
|
|
604
|
+
registerOnTouched(fn) {
|
|
605
|
+
this.onTouchedFn = fn;
|
|
606
|
+
}
|
|
607
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: CalendarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
608
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.9", type: CalendarComponent, isStandalone: true, selector: "ui-calendar", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, startAt: { classPropertyName: "startAt", publicName: "startAt", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange" }, host: { properties: { "class": "classes()" } }, providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => CalendarComponent), multi: true }], ngImport: i0, template: `
|
|
609
|
+
<mat-calendar
|
|
610
|
+
class="ui-calendar"
|
|
611
|
+
[selected]="value()"
|
|
612
|
+
[minDate]="min()"
|
|
613
|
+
[maxDate]="max()"
|
|
614
|
+
[startAt]="startAt()"
|
|
615
|
+
(selectedChange)="onSelect($event)" />
|
|
616
|
+
`, isInline: true, styles: [":host{display:inline-block;padding:.75rem;border-radius:var(--radius);border:1px solid hsl(var(--border));background:hsl(var(--background));color:hsl(var(--foreground))}.ui-calendar{display:block}\n"], dependencies: [{ kind: "component", type: MatCalendar, selector: "mat-calendar", inputs: ["headerComponent", "startAt", "startView", "selected", "minDate", "maxDate", "dateFilter", "dateClass", "comparisonStart", "comparisonEnd", "startDateAccessibleName", "endDateAccessibleName"], outputs: ["selectedChange", "yearSelected", "monthSelected", "viewChanged", "_userSelection", "_userDragDrop"], exportAs: ["matCalendar"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
617
|
+
}
|
|
618
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: CalendarComponent, decorators: [{
|
|
619
|
+
type: Component,
|
|
620
|
+
args: [{ selector: 'ui-calendar', changeDetection: ChangeDetectionStrategy.OnPush, imports: [MatCalendar], host: { '[class]': 'classes()' }, providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => CalendarComponent), multi: true }], template: `
|
|
621
|
+
<mat-calendar
|
|
622
|
+
class="ui-calendar"
|
|
623
|
+
[selected]="value()"
|
|
624
|
+
[minDate]="min()"
|
|
625
|
+
[maxDate]="max()"
|
|
626
|
+
[startAt]="startAt()"
|
|
627
|
+
(selectedChange)="onSelect($event)" />
|
|
628
|
+
`, styles: [":host{display:inline-block;padding:.75rem;border-radius:var(--radius);border:1px solid hsl(var(--border));background:hsl(var(--background));color:hsl(var(--foreground))}.ui-calendar{display:block}\n"] }]
|
|
629
|
+
}], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], min: [{ type: i0.Input, args: [{ isSignal: true, alias: "min", required: false }] }], max: [{ type: i0.Input, args: [{ isSignal: true, alias: "max", required: false }] }], startAt: [{ type: i0.Input, args: [{ isSignal: true, alias: "startAt", required: false }] }], class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
630
|
+
|
|
631
|
+
class CardComponent {
|
|
632
|
+
class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
633
|
+
classes = computed(() => cn('rounded-lg border bg-card text-card-foreground shadow-sm', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
634
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: CardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
635
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.9", type: CardComponent, isStandalone: true, selector: "ui-card", 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 });
|
|
636
|
+
}
|
|
637
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: CardComponent, decorators: [{
|
|
638
|
+
type: Component,
|
|
639
|
+
args: [{
|
|
640
|
+
selector: 'ui-card',
|
|
641
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
642
|
+
host: { '[class]': 'classes()' },
|
|
643
|
+
template: `<ng-content />`,
|
|
644
|
+
}]
|
|
645
|
+
}], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
646
|
+
|
|
647
|
+
class CardHeaderComponent {
|
|
648
|
+
class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
649
|
+
classes = computed(() => cn('flex flex-col gap-1.5 p-6', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
650
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: CardHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
651
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.9", type: CardHeaderComponent, isStandalone: true, selector: "ui-card-header", 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 });
|
|
652
|
+
}
|
|
653
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: CardHeaderComponent, decorators: [{
|
|
654
|
+
type: Component,
|
|
655
|
+
args: [{
|
|
656
|
+
selector: 'ui-card-header',
|
|
657
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
658
|
+
host: { '[class]': 'classes()' },
|
|
659
|
+
template: `<ng-content />`,
|
|
660
|
+
}]
|
|
661
|
+
}], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
662
|
+
|
|
663
|
+
class CardTitleComponent {
|
|
664
|
+
class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
665
|
+
classes = computed(() => cn('text-lg font-semibold leading-none tracking-tight', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
666
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: CardTitleComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
667
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.9", type: CardTitleComponent, isStandalone: true, selector: "ui-card-title, h3[ui-card-title]", 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 });
|
|
668
|
+
}
|
|
669
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: CardTitleComponent, decorators: [{
|
|
670
|
+
type: Component,
|
|
671
|
+
args: [{
|
|
672
|
+
selector: 'ui-card-title, h3[ui-card-title]',
|
|
673
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
674
|
+
host: { '[class]': 'classes()' },
|
|
675
|
+
template: `<ng-content />`,
|
|
676
|
+
}]
|
|
677
|
+
}], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
678
|
+
|
|
679
|
+
class CardDescriptionComponent {
|
|
680
|
+
class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
681
|
+
classes = computed(() => cn('text-sm text-muted-foreground', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
682
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: CardDescriptionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
683
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.9", type: CardDescriptionComponent, isStandalone: true, selector: "ui-card-description, p[ui-card-description]", 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 });
|
|
684
|
+
}
|
|
685
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: CardDescriptionComponent, decorators: [{
|
|
686
|
+
type: Component,
|
|
687
|
+
args: [{
|
|
688
|
+
selector: 'ui-card-description, p[ui-card-description]',
|
|
689
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
690
|
+
host: { '[class]': 'classes()' },
|
|
691
|
+
template: `<ng-content />`,
|
|
692
|
+
}]
|
|
693
|
+
}], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
694
|
+
|
|
695
|
+
class CardContentComponent {
|
|
696
|
+
class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
697
|
+
classes = computed(() => cn('p-6 pt-0', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
698
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: CardContentComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
699
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.9", type: CardContentComponent, isStandalone: true, selector: "ui-card-content", 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 });
|
|
700
|
+
}
|
|
701
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: CardContentComponent, decorators: [{
|
|
702
|
+
type: Component,
|
|
703
|
+
args: [{
|
|
704
|
+
selector: 'ui-card-content',
|
|
705
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
706
|
+
host: { '[class]': 'classes()' },
|
|
707
|
+
template: `<ng-content />`,
|
|
708
|
+
}]
|
|
709
|
+
}], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
710
|
+
|
|
711
|
+
class CardFooterComponent {
|
|
712
|
+
class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
713
|
+
classes = computed(() => cn('flex items-center p-6 pt-0', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
714
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: CardFooterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
715
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.9", type: CardFooterComponent, isStandalone: true, selector: "ui-card-footer", 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 });
|
|
716
|
+
}
|
|
717
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: CardFooterComponent, decorators: [{
|
|
718
|
+
type: Component,
|
|
719
|
+
args: [{
|
|
720
|
+
selector: 'ui-card-footer',
|
|
721
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
722
|
+
host: { '[class]': 'classes()' },
|
|
723
|
+
template: `<ng-content />`,
|
|
724
|
+
}]
|
|
725
|
+
}], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
726
|
+
|
|
727
|
+
class CheckboxComponent {
|
|
728
|
+
indeterminate = input(false, ...(ngDevMode ? [{ debugName: "indeterminate" }] : /* istanbul ignore next */ []));
|
|
729
|
+
required = input(false, ...(ngDevMode ? [{ debugName: "required" }] : /* istanbul ignore next */ []));
|
|
730
|
+
ariaLabel = input(null, { ...(ngDevMode ? { debugName: "ariaLabel" } : /* istanbul ignore next */ {}), alias: 'aria-label' });
|
|
731
|
+
ariaLabelledby = input(null, { ...(ngDevMode ? { debugName: "ariaLabelledby" } : /* istanbul ignore next */ {}), alias: 'aria-labelledby' });
|
|
732
|
+
class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
733
|
+
checkedChange = output();
|
|
734
|
+
ref = viewChild.required('ref');
|
|
735
|
+
checked = signal(false, ...(ngDevMode ? [{ debugName: "checked" }] : /* istanbul ignore next */ []));
|
|
736
|
+
disabled = signal(false, ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
737
|
+
classes = computed(() => cn('ui-checkbox', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
738
|
+
onChange = () => { };
|
|
739
|
+
onTouched = () => { };
|
|
740
|
+
handleChange(e) {
|
|
741
|
+
this.checked.set(e.checked);
|
|
742
|
+
this.onChange(e.checked);
|
|
743
|
+
this.onTouched();
|
|
744
|
+
this.checkedChange.emit(e.checked);
|
|
745
|
+
}
|
|
746
|
+
focus() {
|
|
747
|
+
this.ref().focus();
|
|
748
|
+
}
|
|
749
|
+
writeValue(v) {
|
|
750
|
+
this.checked.set(!!v);
|
|
751
|
+
}
|
|
752
|
+
registerOnChange(fn) {
|
|
753
|
+
this.onChange = fn;
|
|
754
|
+
}
|
|
755
|
+
registerOnTouched(fn) {
|
|
756
|
+
this.onTouched = fn;
|
|
757
|
+
}
|
|
758
|
+
setDisabledState(d) {
|
|
759
|
+
this.disabled.set(d);
|
|
760
|
+
}
|
|
761
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: CheckboxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
762
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.9", type: CheckboxComponent, isStandalone: true, selector: "ui-checkbox", inputs: { 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 }, ariaLabelledby: { classPropertyName: "ariaLabelledby", publicName: "aria-labelledby", 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: `
|
|
763
|
+
<mat-checkbox
|
|
764
|
+
#ref
|
|
765
|
+
disableRipple
|
|
766
|
+
[class]="classes()"
|
|
767
|
+
[checked]="checked()"
|
|
768
|
+
[disabled]="disabled()"
|
|
769
|
+
[indeterminate]="indeterminate()"
|
|
770
|
+
[required]="required()"
|
|
771
|
+
[attr.aria-label]="ariaLabel()"
|
|
772
|
+
[attr.aria-labelledby]="ariaLabelledby()"
|
|
773
|
+
(change)="handleChange($event)">
|
|
774
|
+
<ng-content />
|
|
775
|
+
</mat-checkbox>
|
|
776
|
+
`, 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 .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 .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 });
|
|
777
|
+
}
|
|
778
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: CheckboxComponent, decorators: [{
|
|
779
|
+
type: Component,
|
|
780
|
+
args: [{ selector: 'ui-checkbox', imports: [MatCheckbox], changeDetection: ChangeDetectionStrategy.OnPush, providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => CheckboxComponent), multi: true }], template: `
|
|
781
|
+
<mat-checkbox
|
|
782
|
+
#ref
|
|
783
|
+
disableRipple
|
|
784
|
+
[class]="classes()"
|
|
785
|
+
[checked]="checked()"
|
|
786
|
+
[disabled]="disabled()"
|
|
787
|
+
[indeterminate]="indeterminate()"
|
|
788
|
+
[required]="required()"
|
|
789
|
+
[attr.aria-label]="ariaLabel()"
|
|
790
|
+
[attr.aria-labelledby]="ariaLabelledby()"
|
|
791
|
+
(change)="handleChange($event)">
|
|
792
|
+
<ng-content />
|
|
793
|
+
</mat-checkbox>
|
|
794
|
+
`, 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 .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 .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"] }]
|
|
795
|
+
}], propDecorators: { indeterminate: [{ type: i0.Input, args: [{ isSignal: true, alias: "indeterminate", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-label", required: false }] }], ariaLabelledby: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-labelledby", required: false }] }], class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], checkedChange: [{ type: i0.Output, args: ["checkedChange"] }], ref: [{ type: i0.ViewChild, args: ['ref', { isSignal: true }] }] } });
|
|
796
|
+
|
|
797
|
+
/** Base class exposed to children for context lookup. */
|
|
798
|
+
class CommandContextBase {
|
|
799
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: CommandContextBase, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
800
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.9", type: CommandContextBase, isStandalone: true, ngImport: i0 });
|
|
801
|
+
}
|
|
802
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: CommandContextBase, decorators: [{
|
|
803
|
+
type: Directive
|
|
804
|
+
}] });
|
|
805
|
+
class CommandComponent extends CommandContextBase {
|
|
806
|
+
query = model('', ...(ngDevMode ? [{ debugName: "query" }] : /* istanbul ignore next */ []));
|
|
807
|
+
class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
808
|
+
items = signal([], ...(ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []));
|
|
809
|
+
activeIndex = signal(0, ...(ngDevMode ? [{ debugName: "activeIndex" }] : /* istanbul ignore next */ []));
|
|
810
|
+
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 */ []));
|
|
811
|
+
matches(text) {
|
|
812
|
+
const q = this.query().trim().toLowerCase();
|
|
813
|
+
if (!q)
|
|
814
|
+
return true;
|
|
815
|
+
return text.toLowerCase().includes(q);
|
|
816
|
+
}
|
|
817
|
+
registerItem(item) {
|
|
818
|
+
this.items.update((list) => [...list, item]);
|
|
819
|
+
}
|
|
820
|
+
unregisterItem(item) {
|
|
821
|
+
this.items.update((list) => list.filter((i) => i !== item));
|
|
822
|
+
}
|
|
823
|
+
/** Items currently visible (not filtered out). */
|
|
824
|
+
visibleItems() {
|
|
825
|
+
return this.items().filter((it) => it.visible());
|
|
826
|
+
}
|
|
827
|
+
focusNext(delta) {
|
|
828
|
+
const vis = this.visibleItems();
|
|
829
|
+
if (vis.length === 0)
|
|
830
|
+
return;
|
|
831
|
+
const active = vis.findIndex((i) => i.active());
|
|
832
|
+
const idx = active < 0 ? 0 : (active + delta + vis.length) % vis.length;
|
|
833
|
+
vis.forEach((i, k) => i._setActive(k === idx));
|
|
834
|
+
vis[idx].focus();
|
|
835
|
+
}
|
|
836
|
+
focusFirst() {
|
|
837
|
+
const vis = this.visibleItems();
|
|
838
|
+
vis.forEach((i, k) => i._setActive(k === 0));
|
|
839
|
+
vis[0]?.focus();
|
|
840
|
+
}
|
|
841
|
+
/** Returns the first visible item's text if any. Used when user hits Enter with no active. */
|
|
842
|
+
getActive() {
|
|
843
|
+
return this.visibleItems().find((i) => i.active()) ?? this.visibleItems()[0] ?? null;
|
|
844
|
+
}
|
|
845
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: CommandComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
846
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.9", 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 });
|
|
847
|
+
}
|
|
848
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: CommandComponent, decorators: [{
|
|
849
|
+
type: Component,
|
|
850
|
+
args: [{
|
|
851
|
+
selector: 'ui-command',
|
|
852
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
853
|
+
providers: [{ provide: CommandContextBase, useExisting: forwardRef(() => CommandComponent) }],
|
|
854
|
+
host: { '[class]': 'classes()' },
|
|
855
|
+
template: `<ng-content />`,
|
|
856
|
+
}]
|
|
857
|
+
}], propDecorators: { query: [{ type: i0.Input, args: [{ isSignal: true, alias: "query", required: false }] }, { type: i0.Output, args: ["queryChange"] }], class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
858
|
+
class CommandInputComponent {
|
|
859
|
+
ctx = inject(CommandComponent);
|
|
860
|
+
placeholder = input('Type a command or search…', ...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
|
|
861
|
+
class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
862
|
+
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 */ []));
|
|
863
|
+
onInput(e) {
|
|
864
|
+
this.ctx.query.set(e.target.value);
|
|
865
|
+
queueMicrotask(() => this.ctx.focusFirst());
|
|
866
|
+
}
|
|
867
|
+
onArrow(e, delta) {
|
|
868
|
+
e.preventDefault();
|
|
869
|
+
this.ctx.focusNext(delta);
|
|
870
|
+
}
|
|
871
|
+
onEnter(e) {
|
|
872
|
+
const active = this.ctx.getActive();
|
|
873
|
+
if (active) {
|
|
874
|
+
e.preventDefault();
|
|
875
|
+
active._select(e);
|
|
876
|
+
}
|
|
877
|
+
}
|
|
878
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: CommandInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
879
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.9", 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()", "value": "ctx.query()", "placeholder": "placeholder()" } }, ngImport: i0, template: ``, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
880
|
+
}
|
|
881
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: CommandInputComponent, decorators: [{
|
|
882
|
+
type: Component,
|
|
883
|
+
args: [{
|
|
884
|
+
selector: 'input[ui-command-input]',
|
|
885
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
886
|
+
host: {
|
|
887
|
+
'[class]': 'classes()',
|
|
888
|
+
type: 'text',
|
|
889
|
+
role: 'combobox',
|
|
890
|
+
'aria-autocomplete': 'list',
|
|
891
|
+
'aria-expanded': 'true',
|
|
892
|
+
autocomplete: 'off',
|
|
893
|
+
'[value]': 'ctx.query()',
|
|
894
|
+
'[placeholder]': 'placeholder()',
|
|
895
|
+
'(input)': 'onInput($any($event))',
|
|
896
|
+
'(keydown.arrowDown)': 'onArrow($any($event), 1)',
|
|
897
|
+
'(keydown.arrowUp)': 'onArrow($any($event), -1)',
|
|
898
|
+
'(keydown.enter)': 'onEnter($any($event))',
|
|
899
|
+
},
|
|
900
|
+
template: ``,
|
|
901
|
+
}]
|
|
902
|
+
}], propDecorators: { placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
903
|
+
class CommandListComponent {
|
|
904
|
+
class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
905
|
+
classes = computed(() => cn('max-h-[300px] overflow-y-auto overflow-x-hidden p-1', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
906
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: CommandListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
907
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.9", 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 });
|
|
908
|
+
}
|
|
909
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: CommandListComponent, decorators: [{
|
|
910
|
+
type: Component,
|
|
911
|
+
args: [{
|
|
912
|
+
selector: 'ui-command-list',
|
|
913
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
914
|
+
host: { '[class]': 'classes()', role: 'listbox' },
|
|
915
|
+
template: `<ng-content />`,
|
|
916
|
+
}]
|
|
917
|
+
}], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
918
|
+
class CommandEmptyComponent {
|
|
919
|
+
class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
920
|
+
classes = computed(() => cn('py-6 text-center text-sm text-muted-foreground', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
921
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: CommandEmptyComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
922
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.9", type: CommandEmptyComponent, isStandalone: true, selector: "ui-command-empty", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()" } }, ngImport: i0, template: `<ng-content>No results found.</ng-content>`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
923
|
+
}
|
|
924
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: CommandEmptyComponent, decorators: [{
|
|
925
|
+
type: Component,
|
|
926
|
+
args: [{
|
|
927
|
+
selector: 'ui-command-empty',
|
|
928
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
929
|
+
host: { '[class]': 'classes()' },
|
|
930
|
+
template: `<ng-content>No results found.</ng-content>`,
|
|
931
|
+
}]
|
|
932
|
+
}], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
933
|
+
class CommandGroupComponent {
|
|
934
|
+
heading = input(null, ...(ngDevMode ? [{ debugName: "heading" }] : /* istanbul ignore next */ []));
|
|
935
|
+
class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
936
|
+
classes = computed(() => cn('overflow-hidden p-1 text-foreground', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
937
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: CommandGroupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
938
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", 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: `
|
|
939
|
+
@if (heading()) {
|
|
940
|
+
<div class="px-2 py-1.5 text-xs font-medium text-muted-foreground">{{ heading() }}</div>
|
|
941
|
+
}
|
|
942
|
+
<ng-content />
|
|
943
|
+
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
944
|
+
}
|
|
945
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: CommandGroupComponent, decorators: [{
|
|
946
|
+
type: Component,
|
|
947
|
+
args: [{
|
|
948
|
+
selector: 'ui-command-group',
|
|
949
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
950
|
+
host: { '[class]': 'classes()', role: 'group' },
|
|
951
|
+
template: `
|
|
952
|
+
@if (heading()) {
|
|
953
|
+
<div class="px-2 py-1.5 text-xs font-medium text-muted-foreground">{{ heading() }}</div>
|
|
954
|
+
}
|
|
955
|
+
<ng-content />
|
|
956
|
+
`,
|
|
957
|
+
}]
|
|
958
|
+
}], propDecorators: { heading: [{ type: i0.Input, args: [{ isSignal: true, alias: "heading", required: false }] }], class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
959
|
+
class CommandSeparatorComponent {
|
|
960
|
+
class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
961
|
+
classes = computed(() => cn('-mx-1 h-px bg-border block', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
962
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: CommandSeparatorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
963
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.9", 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 });
|
|
964
|
+
}
|
|
965
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: CommandSeparatorComponent, decorators: [{
|
|
966
|
+
type: Component,
|
|
967
|
+
args: [{
|
|
968
|
+
selector: 'ui-command-separator',
|
|
969
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
970
|
+
host: { '[class]': 'classes()', role: 'separator' },
|
|
971
|
+
template: '',
|
|
972
|
+
}]
|
|
973
|
+
}], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
974
|
+
class CommandItemComponent {
|
|
975
|
+
ctx = inject(CommandComponent);
|
|
976
|
+
el = inject(ElementRef);
|
|
977
|
+
value = input('', ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
978
|
+
disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
979
|
+
class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
980
|
+
selected = output();
|
|
981
|
+
active = signal(false, ...(ngDevMode ? [{ debugName: "active" }] : /* istanbul ignore next */ []));
|
|
982
|
+
visible = computed(() => {
|
|
983
|
+
const text = this.value() || this.el.nativeElement.textContent || '';
|
|
984
|
+
return this.ctx.matches(text);
|
|
985
|
+
}, ...(ngDevMode ? [{ debugName: "visible" }] : /* istanbul ignore next */ []));
|
|
986
|
+
classes = computed(() => cn('relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none', 'data-[active=true]:bg-accent data-[active=true]:text-accent-foreground', 'data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
987
|
+
constructor() {
|
|
988
|
+
this.ctx.registerItem(this);
|
|
989
|
+
inject(DestroyRef).onDestroy(() => this.ctx.unregisterItem(this));
|
|
990
|
+
}
|
|
991
|
+
focus() {
|
|
992
|
+
this.el.nativeElement.focus();
|
|
993
|
+
}
|
|
994
|
+
_setActive(active) {
|
|
995
|
+
this.active.set(active);
|
|
996
|
+
}
|
|
997
|
+
_select(e) {
|
|
998
|
+
if (this.disabled())
|
|
999
|
+
return;
|
|
1000
|
+
this.selected.emit(e);
|
|
1001
|
+
}
|
|
1002
|
+
onHover() {
|
|
1003
|
+
if (this.disabled())
|
|
1004
|
+
return;
|
|
1005
|
+
// Mark this item active; deactivate siblings.
|
|
1006
|
+
this.ctx._activateOnly?.(this);
|
|
1007
|
+
this._setActive(true);
|
|
1008
|
+
}
|
|
1009
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: CommandItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1010
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.9", 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.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 });
|
|
1011
|
+
}
|
|
1012
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: CommandItemComponent, decorators: [{
|
|
1013
|
+
type: Component,
|
|
1014
|
+
args: [{
|
|
1015
|
+
selector: 'ui-command-item, button[ui-command-item]',
|
|
1016
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1017
|
+
host: {
|
|
1018
|
+
'[class]': 'classes()',
|
|
1019
|
+
'[attr.role]': '"option"',
|
|
1020
|
+
'[attr.tabindex]': '-1',
|
|
1021
|
+
'[attr.aria-selected]': 'active()',
|
|
1022
|
+
'[attr.data-active]': 'active() ? "true" : null',
|
|
1023
|
+
'[attr.data-disabled]': 'disabled() ? "true" : null',
|
|
1024
|
+
'[hidden]': '!visible()',
|
|
1025
|
+
'(click)': '_select($any($event))',
|
|
1026
|
+
'(mousemove)': 'onHover()',
|
|
1027
|
+
},
|
|
1028
|
+
template: `<ng-content />`,
|
|
1029
|
+
}]
|
|
1030
|
+
}], ctorParameters: () => [], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], selected: [{ type: i0.Output, args: ["selected"] }] } });
|
|
1031
|
+
class CommandShortcutComponent {
|
|
1032
|
+
class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
1033
|
+
classes = computed(() => cn('ml-auto text-xs tracking-widest text-muted-foreground', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
1034
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: CommandShortcutComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1035
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.9", 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 });
|
|
1036
|
+
}
|
|
1037
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: CommandShortcutComponent, decorators: [{
|
|
1038
|
+
type: Component,
|
|
1039
|
+
args: [{
|
|
1040
|
+
selector: 'span[ui-command-shortcut]',
|
|
1041
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1042
|
+
host: { '[class]': 'classes()' },
|
|
1043
|
+
template: `<ng-content />`,
|
|
1044
|
+
}]
|
|
1045
|
+
}], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
1046
|
+
|
|
1047
|
+
/**
|
|
1048
|
+
* Combobox with searchable option list. Options passed via `[options]`.
|
|
1049
|
+
* Emits two-way `value` and supports forms via ControlValueAccessor.
|
|
1050
|
+
*/
|
|
1051
|
+
class ComboboxComponent {
|
|
1052
|
+
overlay = inject(Overlay);
|
|
1053
|
+
vcr = inject(ViewContainerRef);
|
|
1054
|
+
destroyRef = inject(DestroyRef);
|
|
1055
|
+
options = input([], ...(ngDevMode ? [{ debugName: "options" }] : /* istanbul ignore next */ []));
|
|
1056
|
+
value = model(null, ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
1057
|
+
placeholder = input('Select…', ...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
|
|
1058
|
+
searchPlaceholder = input('Search…', ...(ngDevMode ? [{ debugName: "searchPlaceholder" }] : /* istanbul ignore next */ []));
|
|
1059
|
+
emptyText = input('No results found.', ...(ngDevMode ? [{ debugName: "emptyText" }] : /* istanbul ignore next */ []));
|
|
1060
|
+
disabled = model(false, ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
1061
|
+
class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
1062
|
+
valueChange = output();
|
|
1063
|
+
trigger = viewChild.required('trigger');
|
|
1064
|
+
panel = viewChild.required('panel');
|
|
1065
|
+
overlayRef = null;
|
|
1066
|
+
isOpen = signal(false, ...(ngDevMode ? [{ debugName: "isOpen" }] : /* istanbul ignore next */ []));
|
|
1067
|
+
classes = computed(() => cn('inline-block', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
1068
|
+
triggerClasses = computed(() => cn(buttonVariants({ variant: 'outline', size: 'default' }), 'w-[200px] justify-between'), ...(ngDevMode ? [{ debugName: "triggerClasses" }] : /* istanbul ignore next */ []));
|
|
1069
|
+
selectedLabel = computed(() => {
|
|
1070
|
+
const v = this.value();
|
|
1071
|
+
return this.options().find((o) => o.value === v)?.label ?? '';
|
|
1072
|
+
}, ...(ngDevMode ? [{ debugName: "selectedLabel" }] : /* istanbul ignore next */ []));
|
|
1073
|
+
onChangeFn = () => { };
|
|
1074
|
+
onTouchedFn = () => { };
|
|
1075
|
+
isSelected(opt) {
|
|
1076
|
+
return opt.value === this.value();
|
|
1077
|
+
}
|
|
1078
|
+
toggle() {
|
|
1079
|
+
if (this.disabled())
|
|
1080
|
+
return;
|
|
1081
|
+
this.isOpen() ? this.close() : this.open();
|
|
1082
|
+
}
|
|
1083
|
+
open() {
|
|
1084
|
+
if (this.isOpen())
|
|
1085
|
+
return;
|
|
1086
|
+
const triggerEl = this.trigger().nativeElement;
|
|
1087
|
+
triggerEl.style.setProperty('--ui-combobox-trigger-width', triggerEl.offsetWidth + 'px');
|
|
1088
|
+
this.overlayRef = this.overlay.create({
|
|
1089
|
+
positionStrategy: this.overlay
|
|
1090
|
+
.position()
|
|
1091
|
+
.flexibleConnectedTo(triggerEl)
|
|
1092
|
+
.withPositions([
|
|
1093
|
+
{ originX: 'start', originY: 'bottom', overlayX: 'start', overlayY: 'top', offsetY: 4 },
|
|
1094
|
+
{ originX: 'start', originY: 'top', overlayX: 'start', overlayY: 'bottom', offsetY: -4 },
|
|
1095
|
+
]),
|
|
1096
|
+
scrollStrategy: this.overlay.scrollStrategies.reposition(),
|
|
1097
|
+
hasBackdrop: false,
|
|
1098
|
+
panelClass: 'ui-combobox-panel',
|
|
1099
|
+
minWidth: triggerEl.offsetWidth,
|
|
1100
|
+
});
|
|
1101
|
+
const portal = new TemplatePortal(this.panel(), this.vcr);
|
|
1102
|
+
this.overlayRef.attach(portal);
|
|
1103
|
+
merge(this.overlayRef.outsidePointerEvents().pipe(filter((e) => !triggerEl.contains(e.target))), this.overlayRef.keydownEvents().pipe(filter((e) => e.key === 'Escape')), this.overlayRef.detachments())
|
|
1104
|
+
.pipe(takeUntilDestroyed(this.destroyRef))
|
|
1105
|
+
.subscribe(() => this.close());
|
|
1106
|
+
this.isOpen.set(true);
|
|
1107
|
+
// Focus search input after attach tick
|
|
1108
|
+
queueMicrotask(() => this.overlayRef?.overlayElement.querySelector('input')?.focus());
|
|
1109
|
+
}
|
|
1110
|
+
close() {
|
|
1111
|
+
if (!this.isOpen())
|
|
1112
|
+
return;
|
|
1113
|
+
this.overlayRef?.dispose();
|
|
1114
|
+
this.overlayRef = null;
|
|
1115
|
+
this.isOpen.set(false);
|
|
1116
|
+
this.trigger().nativeElement.focus();
|
|
1117
|
+
this.onTouchedFn();
|
|
1118
|
+
}
|
|
1119
|
+
pick(opt) {
|
|
1120
|
+
if (opt.disabled)
|
|
1121
|
+
return;
|
|
1122
|
+
const next = opt.value === this.value() ? null : opt.value;
|
|
1123
|
+
this.value.set(next);
|
|
1124
|
+
this.onChangeFn(next);
|
|
1125
|
+
this.valueChange.emit(next);
|
|
1126
|
+
this.close();
|
|
1127
|
+
}
|
|
1128
|
+
writeValue(v) {
|
|
1129
|
+
this.value.set(v);
|
|
1130
|
+
}
|
|
1131
|
+
registerOnChange(fn) {
|
|
1132
|
+
this.onChangeFn = fn;
|
|
1133
|
+
}
|
|
1134
|
+
registerOnTouched(fn) {
|
|
1135
|
+
this.onTouchedFn = fn;
|
|
1136
|
+
}
|
|
1137
|
+
setDisabledState(state) {
|
|
1138
|
+
this.disabled.set(state);
|
|
1139
|
+
}
|
|
1140
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: ComboboxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1141
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", 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: `
|
|
1142
|
+
<button
|
|
1143
|
+
#trigger
|
|
1144
|
+
type="button"
|
|
1145
|
+
role="combobox"
|
|
1146
|
+
[attr.aria-expanded]="isOpen()"
|
|
1147
|
+
[attr.aria-controls]="isOpen() ? 'ui-combobox-panel' : null"
|
|
1148
|
+
[class]="triggerClasses()"
|
|
1149
|
+
[disabled]="disabled() || null"
|
|
1150
|
+
(click)="toggle()">
|
|
1151
|
+
<span [class.text-muted-foreground]="!selectedLabel()">
|
|
1152
|
+
{{ selectedLabel() || placeholder() }}
|
|
1153
|
+
</span>
|
|
1154
|
+
<svg
|
|
1155
|
+
class="ml-2 h-4 w-4 shrink-0 opacity-50"
|
|
1156
|
+
viewBox="0 0 24 24"
|
|
1157
|
+
fill="none"
|
|
1158
|
+
stroke="currentColor"
|
|
1159
|
+
stroke-width="2"
|
|
1160
|
+
stroke-linecap="round"
|
|
1161
|
+
stroke-linejoin="round">
|
|
1162
|
+
<polyline points="6 9 12 15 18 9" />
|
|
1163
|
+
</svg>
|
|
1164
|
+
</button>
|
|
1165
|
+
|
|
1166
|
+
<ng-template #panel>
|
|
1167
|
+
<div
|
|
1168
|
+
id="ui-combobox-panel"
|
|
1169
|
+
class="w-[var(--ui-combobox-trigger-width)] rounded-md border bg-popover text-popover-foreground shadow-md">
|
|
1170
|
+
<ui-command>
|
|
1171
|
+
<input ui-command-input [placeholder]="searchPlaceholder()" />
|
|
1172
|
+
<ui-command-list>
|
|
1173
|
+
<ui-command-empty>{{ emptyText() }}</ui-command-empty>
|
|
1174
|
+
<ui-command-group>
|
|
1175
|
+
@for (opt of options(); track opt.value) {
|
|
1176
|
+
<button
|
|
1177
|
+
type="button"
|
|
1178
|
+
ui-command-item
|
|
1179
|
+
[value]="opt.label"
|
|
1180
|
+
[disabled]="!!opt.disabled"
|
|
1181
|
+
(selected)="pick(opt)">
|
|
1182
|
+
{{ opt.label }}
|
|
1183
|
+
@if (isSelected(opt)) {
|
|
1184
|
+
<svg
|
|
1185
|
+
class="ml-auto h-4 w-4"
|
|
1186
|
+
viewBox="0 0 24 24"
|
|
1187
|
+
fill="none"
|
|
1188
|
+
stroke="currentColor"
|
|
1189
|
+
stroke-width="2"
|
|
1190
|
+
stroke-linecap="round"
|
|
1191
|
+
stroke-linejoin="round">
|
|
1192
|
+
<polyline points="20 6 9 17 4 12" />
|
|
1193
|
+
</svg>
|
|
1194
|
+
}
|
|
1195
|
+
</button>
|
|
1196
|
+
}
|
|
1197
|
+
</ui-command-group>
|
|
1198
|
+
</ui-command-list>
|
|
1199
|
+
</ui-command>
|
|
1200
|
+
</div>
|
|
1201
|
+
</ng-template>
|
|
1202
|
+
`, 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 });
|
|
1203
|
+
}
|
|
1204
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: ComboboxComponent, decorators: [{
|
|
1205
|
+
type: Component,
|
|
1206
|
+
args: [{
|
|
1207
|
+
selector: 'ui-combobox',
|
|
1208
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1209
|
+
imports: [
|
|
1210
|
+
CommandComponent,
|
|
1211
|
+
CommandInputComponent,
|
|
1212
|
+
CommandListComponent,
|
|
1213
|
+
CommandEmptyComponent,
|
|
1214
|
+
CommandGroupComponent,
|
|
1215
|
+
CommandItemComponent,
|
|
1216
|
+
],
|
|
1217
|
+
providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => ComboboxComponent), multi: true }],
|
|
1218
|
+
host: { '[class]': 'classes()' },
|
|
1219
|
+
template: `
|
|
1220
|
+
<button
|
|
1221
|
+
#trigger
|
|
1222
|
+
type="button"
|
|
1223
|
+
role="combobox"
|
|
1224
|
+
[attr.aria-expanded]="isOpen()"
|
|
1225
|
+
[attr.aria-controls]="isOpen() ? 'ui-combobox-panel' : null"
|
|
1226
|
+
[class]="triggerClasses()"
|
|
1227
|
+
[disabled]="disabled() || null"
|
|
1228
|
+
(click)="toggle()">
|
|
1229
|
+
<span [class.text-muted-foreground]="!selectedLabel()">
|
|
1230
|
+
{{ selectedLabel() || placeholder() }}
|
|
1231
|
+
</span>
|
|
1232
|
+
<svg
|
|
1233
|
+
class="ml-2 h-4 w-4 shrink-0 opacity-50"
|
|
1234
|
+
viewBox="0 0 24 24"
|
|
1235
|
+
fill="none"
|
|
1236
|
+
stroke="currentColor"
|
|
1237
|
+
stroke-width="2"
|
|
1238
|
+
stroke-linecap="round"
|
|
1239
|
+
stroke-linejoin="round">
|
|
1240
|
+
<polyline points="6 9 12 15 18 9" />
|
|
1241
|
+
</svg>
|
|
1242
|
+
</button>
|
|
1243
|
+
|
|
1244
|
+
<ng-template #panel>
|
|
1245
|
+
<div
|
|
1246
|
+
id="ui-combobox-panel"
|
|
1247
|
+
class="w-[var(--ui-combobox-trigger-width)] rounded-md border bg-popover text-popover-foreground shadow-md">
|
|
1248
|
+
<ui-command>
|
|
1249
|
+
<input ui-command-input [placeholder]="searchPlaceholder()" />
|
|
1250
|
+
<ui-command-list>
|
|
1251
|
+
<ui-command-empty>{{ emptyText() }}</ui-command-empty>
|
|
1252
|
+
<ui-command-group>
|
|
1253
|
+
@for (opt of options(); track opt.value) {
|
|
1254
|
+
<button
|
|
1255
|
+
type="button"
|
|
1256
|
+
ui-command-item
|
|
1257
|
+
[value]="opt.label"
|
|
1258
|
+
[disabled]="!!opt.disabled"
|
|
1259
|
+
(selected)="pick(opt)">
|
|
1260
|
+
{{ opt.label }}
|
|
1261
|
+
@if (isSelected(opt)) {
|
|
1262
|
+
<svg
|
|
1263
|
+
class="ml-auto h-4 w-4"
|
|
1264
|
+
viewBox="0 0 24 24"
|
|
1265
|
+
fill="none"
|
|
1266
|
+
stroke="currentColor"
|
|
1267
|
+
stroke-width="2"
|
|
1268
|
+
stroke-linecap="round"
|
|
1269
|
+
stroke-linejoin="round">
|
|
1270
|
+
<polyline points="20 6 9 17 4 12" />
|
|
1271
|
+
</svg>
|
|
1272
|
+
}
|
|
1273
|
+
</button>
|
|
1274
|
+
}
|
|
1275
|
+
</ui-command-group>
|
|
1276
|
+
</ui-command-list>
|
|
1277
|
+
</ui-command>
|
|
1278
|
+
</div>
|
|
1279
|
+
</ng-template>
|
|
1280
|
+
`,
|
|
1281
|
+
}]
|
|
1282
|
+
}], propDecorators: { options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], searchPlaceholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchPlaceholder", required: false }] }], emptyText: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyText", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }, { type: i0.Output, args: ["disabledChange"] }], class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], valueChange: [{ type: i0.Output, args: ["valueChange"] }], trigger: [{ type: i0.ViewChild, args: ['trigger', { isSignal: true }] }], panel: [{ type: i0.ViewChild, args: ['panel', { isSignal: true }] }] } });
|
|
1283
|
+
|
|
1284
|
+
/**
|
|
1285
|
+
* Opens a menu anchored to the cursor when the host fires `contextmenu`.
|
|
1286
|
+
* Reuses `<ng-template uiMenuContent>` from the dropdown-menu entry.
|
|
1287
|
+
*
|
|
1288
|
+
* @example
|
|
1289
|
+
* <div [uiContextMenuTrigger]="menu" class="p-12 border">Right-click me</div>
|
|
1290
|
+
* <ng-template uiMenuContent #menu>
|
|
1291
|
+
* <ui-menu-surface>
|
|
1292
|
+
* <button ui-menu-item>Copy</button>
|
|
1293
|
+
* <button ui-menu-item>Paste</button>
|
|
1294
|
+
* </ui-menu-surface>
|
|
1295
|
+
* </ng-template>
|
|
1296
|
+
*/
|
|
1297
|
+
class ContextMenuTriggerDirective {
|
|
1298
|
+
overlay = inject(Overlay);
|
|
1299
|
+
vcr = inject(ViewContainerRef);
|
|
1300
|
+
el = inject(ElementRef);
|
|
1301
|
+
destroyRef = inject(DestroyRef);
|
|
1302
|
+
uiContextMenuTrigger = input.required(...(ngDevMode ? [{ debugName: "uiContextMenuTrigger" }] : /* istanbul ignore next */ []));
|
|
1303
|
+
disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
1304
|
+
openedChange = output();
|
|
1305
|
+
overlayRef = null;
|
|
1306
|
+
isOpen = signal(false, ...(ngDevMode ? [{ debugName: "isOpen" }] : /* istanbul ignore next */ []));
|
|
1307
|
+
onContextMenu(event) {
|
|
1308
|
+
if (this.disabled())
|
|
1309
|
+
return;
|
|
1310
|
+
event.preventDefault();
|
|
1311
|
+
this.close();
|
|
1312
|
+
this.openAt(event.clientX, event.clientY);
|
|
1313
|
+
}
|
|
1314
|
+
openAt(x, y) {
|
|
1315
|
+
this.overlayRef = this.overlay.create({
|
|
1316
|
+
positionStrategy: this.overlay
|
|
1317
|
+
.position()
|
|
1318
|
+
.flexibleConnectedTo({ x, y })
|
|
1319
|
+
.withPositions([
|
|
1320
|
+
{ originX: 'start', originY: 'bottom', overlayX: 'start', overlayY: 'top' },
|
|
1321
|
+
{ originX: 'start', originY: 'top', overlayX: 'start', overlayY: 'bottom' },
|
|
1322
|
+
{ originX: 'end', originY: 'bottom', overlayX: 'end', overlayY: 'top' },
|
|
1323
|
+
{ originX: 'end', originY: 'top', overlayX: 'end', overlayY: 'bottom' },
|
|
1324
|
+
]),
|
|
1325
|
+
scrollStrategy: this.overlay.scrollStrategies.close(),
|
|
1326
|
+
hasBackdrop: false,
|
|
1327
|
+
panelClass: 'ui-menu-panel',
|
|
1328
|
+
});
|
|
1329
|
+
const portal = new TemplatePortal(this.uiContextMenuTrigger().template, this.vcr);
|
|
1330
|
+
this.overlayRef.attach(portal);
|
|
1331
|
+
merge(this.overlayRef.outsidePointerEvents(), this.overlayRef.keydownEvents().pipe(filter((e) => e.key === 'Escape')), this.overlayRef.detachments())
|
|
1332
|
+
.pipe(takeUntilDestroyed(this.destroyRef))
|
|
1333
|
+
.subscribe(() => this.close());
|
|
1334
|
+
this.isOpen.set(true);
|
|
1335
|
+
this.openedChange.emit(true);
|
|
1336
|
+
}
|
|
1337
|
+
close() {
|
|
1338
|
+
if (!this.overlayRef)
|
|
1339
|
+
return;
|
|
1340
|
+
this.overlayRef.dispose();
|
|
1341
|
+
this.overlayRef = null;
|
|
1342
|
+
this.isOpen.set(false);
|
|
1343
|
+
this.openedChange.emit(false);
|
|
1344
|
+
}
|
|
1345
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: ContextMenuTriggerDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1346
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.9", type: ContextMenuTriggerDirective, isStandalone: true, selector: "[uiContextMenuTrigger]", inputs: { uiContextMenuTrigger: { classPropertyName: "uiContextMenuTrigger", publicName: "uiContextMenuTrigger", isSignal: true, isRequired: true, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { openedChange: "openedChange" }, host: { listeners: { "contextmenu": "onContextMenu($event)" } }, exportAs: ["uiContextMenuTrigger"], ngImport: i0 });
|
|
1347
|
+
}
|
|
1348
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: ContextMenuTriggerDirective, decorators: [{
|
|
1349
|
+
type: Directive,
|
|
1350
|
+
args: [{
|
|
1351
|
+
selector: '[uiContextMenuTrigger]',
|
|
1352
|
+
exportAs: 'uiContextMenuTrigger',
|
|
1353
|
+
host: {
|
|
1354
|
+
'(contextmenu)': 'onContextMenu($event)',
|
|
1355
|
+
},
|
|
1356
|
+
}]
|
|
1357
|
+
}], propDecorators: { uiContextMenuTrigger: [{ type: i0.Input, args: [{ isSignal: true, alias: "uiContextMenuTrigger", required: true }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], openedChange: [{ type: i0.Output, args: ["openedChange"] }] } });
|
|
1358
|
+
|
|
1359
|
+
/**
|
|
1360
|
+
* Popup date picker. Requires a date adapter provider in the consumer app
|
|
1361
|
+
* (e.g. `provideNativeDateAdapter()` from `@angular/material/core`).
|
|
1362
|
+
*/
|
|
1363
|
+
class DatePickerComponent {
|
|
1364
|
+
value = model(null, ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
1365
|
+
placeholder = input('Pick a date', ...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
|
|
1366
|
+
min = input(null, ...(ngDevMode ? [{ debugName: "min" }] : /* istanbul ignore next */ []));
|
|
1367
|
+
max = input(null, ...(ngDevMode ? [{ debugName: "max" }] : /* istanbul ignore next */ []));
|
|
1368
|
+
disabled = model(false, ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
1369
|
+
class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
1370
|
+
classes = computed(() => cn('inline-block', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
1371
|
+
control = new FormControl(null);
|
|
1372
|
+
onChangeFn = () => { };
|
|
1373
|
+
onTouchedFn = () => { };
|
|
1374
|
+
constructor() {
|
|
1375
|
+
effect(() => {
|
|
1376
|
+
const next = this.value();
|
|
1377
|
+
if (this.control.value !== next) {
|
|
1378
|
+
this.control.setValue(next, { emitEvent: false });
|
|
1379
|
+
}
|
|
1380
|
+
});
|
|
1381
|
+
effect(() => {
|
|
1382
|
+
const d = this.disabled();
|
|
1383
|
+
d ? this.control.disable({ emitEvent: false }) : this.control.enable({ emitEvent: false });
|
|
1384
|
+
});
|
|
1385
|
+
this.control.valueChanges.pipe(takeUntilDestroyed(inject(DestroyRef))).subscribe((next) => {
|
|
1386
|
+
untracked(() => this.value.set(next));
|
|
1387
|
+
this.onChangeFn(next);
|
|
1388
|
+
this.onTouchedFn();
|
|
1389
|
+
});
|
|
1390
|
+
}
|
|
1391
|
+
writeValue(v) {
|
|
1392
|
+
this.value.set(v);
|
|
1393
|
+
}
|
|
1394
|
+
registerOnChange(fn) {
|
|
1395
|
+
this.onChangeFn = fn;
|
|
1396
|
+
}
|
|
1397
|
+
registerOnTouched(fn) {
|
|
1398
|
+
this.onTouchedFn = fn;
|
|
1399
|
+
}
|
|
1400
|
+
setDisabledState(state) {
|
|
1401
|
+
this.disabled.set(state);
|
|
1402
|
+
}
|
|
1403
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DatePickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1404
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.9", type: DatePickerComponent, isStandalone: true, selector: "ui-date-picker", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", 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" }, host: { properties: { "class": "classes()" } }, providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => DatePickerComponent), multi: true }], ngImport: i0, template: `
|
|
1405
|
+
<mat-form-field class="ui-date-picker" appearance="outline" subscriptSizing="dynamic">
|
|
1406
|
+
<input
|
|
1407
|
+
matInput
|
|
1408
|
+
[matDatepicker]="picker"
|
|
1409
|
+
[placeholder]="placeholder()"
|
|
1410
|
+
[min]="min()"
|
|
1411
|
+
[max]="max()"
|
|
1412
|
+
[formControl]="control" />
|
|
1413
|
+
<mat-datepicker-toggle matIconSuffix [for]="picker" />
|
|
1414
|
+
<mat-datepicker #picker panelClass="ui-datepicker-panel" />
|
|
1415
|
+
</mat-form-field>
|
|
1416
|
+
`, isInline: true, dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "component", type: MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }, { kind: "directive", type: MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }, { kind: "component", type: MatDatepickerToggle, selector: "mat-datepicker-toggle", inputs: ["for", "tabIndex", "aria-label", "disabled", "disableRipple"], exportAs: ["matDatepickerToggle"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1417
|
+
}
|
|
1418
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DatePickerComponent, decorators: [{
|
|
1419
|
+
type: Component,
|
|
1420
|
+
args: [{
|
|
1421
|
+
selector: 'ui-date-picker',
|
|
1422
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1423
|
+
imports: [ReactiveFormsModule, MatFormField, MatInput, MatDatepicker, MatDatepickerInput, MatDatepickerToggle],
|
|
1424
|
+
host: { '[class]': 'classes()' },
|
|
1425
|
+
providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => DatePickerComponent), multi: true }],
|
|
1426
|
+
template: `
|
|
1427
|
+
<mat-form-field class="ui-date-picker" appearance="outline" subscriptSizing="dynamic">
|
|
1428
|
+
<input
|
|
1429
|
+
matInput
|
|
1430
|
+
[matDatepicker]="picker"
|
|
1431
|
+
[placeholder]="placeholder()"
|
|
1432
|
+
[min]="min()"
|
|
1433
|
+
[max]="max()"
|
|
1434
|
+
[formControl]="control" />
|
|
1435
|
+
<mat-datepicker-toggle matIconSuffix [for]="picker" />
|
|
1436
|
+
<mat-datepicker #picker panelClass="ui-datepicker-panel" />
|
|
1437
|
+
</mat-form-field>
|
|
1438
|
+
`,
|
|
1439
|
+
}]
|
|
1440
|
+
}], ctorParameters: () => [], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], min: [{ type: i0.Input, args: [{ isSignal: true, alias: "min", required: false }] }], max: [{ type: i0.Input, args: [{ isSignal: true, alias: "max", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }, { type: i0.Output, args: ["disabledChange"] }], class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
1441
|
+
|
|
1442
|
+
/**
|
|
1443
|
+
* Declarative modal dialog. Renders into the body via CDK overlay when
|
|
1444
|
+
* `open` becomes `true`. Focus is trapped inside; restored to trigger on close.
|
|
1445
|
+
*
|
|
1446
|
+
* @example
|
|
1447
|
+
* <button ui-button (click)="open.set(true)">Open</button>
|
|
1448
|
+
* <ui-dialog [(open)]="open">
|
|
1449
|
+
* <ui-dialog-header>
|
|
1450
|
+
* <ui-dialog-title>Are you sure?</ui-dialog-title>
|
|
1451
|
+
* <ui-dialog-description>This action cannot be undone.</ui-dialog-description>
|
|
1452
|
+
* </ui-dialog-header>
|
|
1453
|
+
* <ui-dialog-footer>
|
|
1454
|
+
* <button ui-button variant="outline" (click)="open.set(false)">Cancel</button>
|
|
1455
|
+
* <button ui-button variant="destructive" (click)="confirm()">Delete</button>
|
|
1456
|
+
* </ui-dialog-footer>
|
|
1457
|
+
* </ui-dialog>
|
|
1458
|
+
*/
|
|
1459
|
+
class DialogComponent {
|
|
1460
|
+
overlay = inject(Overlay);
|
|
1461
|
+
vcr = inject(ViewContainerRef);
|
|
1462
|
+
trapFactory = inject(FocusTrapFactory);
|
|
1463
|
+
doc = inject(DOCUMENT);
|
|
1464
|
+
destroyRef = inject(DestroyRef);
|
|
1465
|
+
open = model(false, ...(ngDevMode ? [{ debugName: "open" }] : /* istanbul ignore next */ []));
|
|
1466
|
+
closeOnEscape = input(true, ...(ngDevMode ? [{ debugName: "closeOnEscape" }] : /* istanbul ignore next */ []));
|
|
1467
|
+
closeOnBackdropClick = input(true, ...(ngDevMode ? [{ debugName: "closeOnBackdropClick" }] : /* istanbul ignore next */ []));
|
|
1468
|
+
labelledBy = input(null, { ...(ngDevMode ? { debugName: "labelledBy" } : /* istanbul ignore next */ {}), alias: 'aria-labelledby' });
|
|
1469
|
+
describedBy = input(null, { ...(ngDevMode ? { debugName: "describedBy" } : /* istanbul ignore next */ {}), alias: 'aria-describedby' });
|
|
1470
|
+
class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
1471
|
+
openedChange = output();
|
|
1472
|
+
tpl = viewChild.required('tpl');
|
|
1473
|
+
overlayRef = null;
|
|
1474
|
+
focusTrap = null;
|
|
1475
|
+
previousFocus = null;
|
|
1476
|
+
surfaceClasses = computed(() => cn('relative grid w-full max-w-lg gap-4 rounded-lg border bg-background p-6 shadow-lg duration-200', this.class()), ...(ngDevMode ? [{ debugName: "surfaceClasses" }] : /* istanbul ignore next */ []));
|
|
1477
|
+
constructor() {
|
|
1478
|
+
effect(() => {
|
|
1479
|
+
this.open() ? this.attach() : this.detach();
|
|
1480
|
+
});
|
|
1481
|
+
}
|
|
1482
|
+
attach() {
|
|
1483
|
+
if (this.overlayRef)
|
|
1484
|
+
return;
|
|
1485
|
+
this.previousFocus = this.doc.activeElement;
|
|
1486
|
+
this.overlayRef = this.overlay.create({
|
|
1487
|
+
hasBackdrop: true,
|
|
1488
|
+
backdropClass: 'ui-dialog-backdrop',
|
|
1489
|
+
panelClass: 'ui-dialog-panel',
|
|
1490
|
+
scrollStrategy: this.overlay.scrollStrategies.block(),
|
|
1491
|
+
positionStrategy: this.overlay.position().global().centerHorizontally().centerVertically(),
|
|
1492
|
+
});
|
|
1493
|
+
const portal = new TemplatePortal(this.tpl(), this.vcr);
|
|
1494
|
+
this.overlayRef.attach(portal);
|
|
1495
|
+
this.focusTrap = this.trapFactory.create(this.overlayRef.hostElement);
|
|
1496
|
+
this.focusTrap.focusInitialElementWhenReady();
|
|
1497
|
+
if (this.closeOnBackdropClick()) {
|
|
1498
|
+
this.overlayRef
|
|
1499
|
+
.backdropClick()
|
|
1500
|
+
.pipe(takeUntilDestroyed(this.destroyRef))
|
|
1501
|
+
.subscribe(() => this.requestClose());
|
|
1502
|
+
}
|
|
1503
|
+
this.overlayRef
|
|
1504
|
+
.keydownEvents()
|
|
1505
|
+
.pipe(takeUntilDestroyed(this.destroyRef), filter((e) => e.key === 'Escape' && this.closeOnEscape()))
|
|
1506
|
+
.subscribe((e) => {
|
|
1507
|
+
e.preventDefault();
|
|
1508
|
+
this.requestClose();
|
|
1509
|
+
});
|
|
1510
|
+
this.openedChange.emit(true);
|
|
1511
|
+
}
|
|
1512
|
+
detach() {
|
|
1513
|
+
if (!this.overlayRef)
|
|
1514
|
+
return;
|
|
1515
|
+
this.focusTrap?.destroy();
|
|
1516
|
+
this.focusTrap = null;
|
|
1517
|
+
this.overlayRef.dispose();
|
|
1518
|
+
this.overlayRef = null;
|
|
1519
|
+
this.previousFocus?.focus?.();
|
|
1520
|
+
this.openedChange.emit(false);
|
|
1521
|
+
}
|
|
1522
|
+
requestClose() {
|
|
1523
|
+
this.open.set(false);
|
|
1524
|
+
}
|
|
1525
|
+
close() {
|
|
1526
|
+
this.requestClose();
|
|
1527
|
+
}
|
|
1528
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1529
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.9", type: DialogComponent, isStandalone: true, selector: "ui-dialog", inputs: { open: { classPropertyName: "open", publicName: "open", isSignal: true, isRequired: false, transformFunction: null }, closeOnEscape: { classPropertyName: "closeOnEscape", publicName: "closeOnEscape", isSignal: true, isRequired: false, transformFunction: null }, closeOnBackdropClick: { classPropertyName: "closeOnBackdropClick", publicName: "closeOnBackdropClick", isSignal: true, isRequired: false, transformFunction: null }, labelledBy: { classPropertyName: "labelledBy", publicName: "aria-labelledby", isSignal: true, isRequired: false, transformFunction: null }, describedBy: { classPropertyName: "describedBy", publicName: "aria-describedby", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { open: "openChange", openedChange: "openedChange" }, viewQueries: [{ propertyName: "tpl", first: true, predicate: ["tpl"], descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
1530
|
+
<ng-template #tpl>
|
|
1531
|
+
<div
|
|
1532
|
+
class="ui-dialog-surface"
|
|
1533
|
+
role="dialog"
|
|
1534
|
+
aria-modal="true"
|
|
1535
|
+
[attr.aria-labelledby]="labelledBy()"
|
|
1536
|
+
[attr.aria-describedby]="describedBy()"
|
|
1537
|
+
[class]="surfaceClasses()">
|
|
1538
|
+
<ng-content />
|
|
1539
|
+
</div>
|
|
1540
|
+
</ng-template>
|
|
1541
|
+
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1542
|
+
}
|
|
1543
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DialogComponent, decorators: [{
|
|
1544
|
+
type: Component,
|
|
1545
|
+
args: [{
|
|
1546
|
+
selector: 'ui-dialog',
|
|
1547
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1548
|
+
template: `
|
|
1549
|
+
<ng-template #tpl>
|
|
1550
|
+
<div
|
|
1551
|
+
class="ui-dialog-surface"
|
|
1552
|
+
role="dialog"
|
|
1553
|
+
aria-modal="true"
|
|
1554
|
+
[attr.aria-labelledby]="labelledBy()"
|
|
1555
|
+
[attr.aria-describedby]="describedBy()"
|
|
1556
|
+
[class]="surfaceClasses()">
|
|
1557
|
+
<ng-content />
|
|
1558
|
+
</div>
|
|
1559
|
+
</ng-template>
|
|
1560
|
+
`,
|
|
1561
|
+
}]
|
|
1562
|
+
}], ctorParameters: () => [], propDecorators: { open: [{ type: i0.Input, args: [{ isSignal: true, alias: "open", required: false }] }, { type: i0.Output, args: ["openChange"] }], closeOnEscape: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeOnEscape", required: false }] }], closeOnBackdropClick: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeOnBackdropClick", required: false }] }], labelledBy: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-labelledby", required: false }] }], describedBy: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-describedby", required: false }] }], class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], openedChange: [{ type: i0.Output, args: ["openedChange"] }], tpl: [{ type: i0.ViewChild, args: ['tpl', { isSignal: true }] }] } });
|
|
1563
|
+
|
|
1564
|
+
class DialogHeaderComponent {
|
|
1565
|
+
class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
1566
|
+
classes = computed(() => cn('flex flex-col gap-1.5 text-center sm:text-left', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
1567
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DialogHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1568
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.9", type: DialogHeaderComponent, isStandalone: true, selector: "ui-dialog-header", 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 });
|
|
1569
|
+
}
|
|
1570
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DialogHeaderComponent, decorators: [{
|
|
1571
|
+
type: Component,
|
|
1572
|
+
args: [{
|
|
1573
|
+
selector: 'ui-dialog-header',
|
|
1574
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1575
|
+
host: { '[class]': 'classes()' },
|
|
1576
|
+
template: `<ng-content />`,
|
|
1577
|
+
}]
|
|
1578
|
+
}], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
1579
|
+
class DialogTitleComponent {
|
|
1580
|
+
class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
1581
|
+
classes = computed(() => cn('text-lg font-semibold leading-none tracking-tight', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
1582
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DialogTitleComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1583
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.9", type: DialogTitleComponent, isStandalone: true, selector: "ui-dialog-title, h2[ui-dialog-title]", 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 });
|
|
1584
|
+
}
|
|
1585
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DialogTitleComponent, decorators: [{
|
|
1586
|
+
type: Component,
|
|
1587
|
+
args: [{
|
|
1588
|
+
selector: 'ui-dialog-title, h2[ui-dialog-title]',
|
|
1589
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1590
|
+
host: { '[class]': 'classes()' },
|
|
1591
|
+
template: `<ng-content />`,
|
|
1592
|
+
}]
|
|
1593
|
+
}], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
1594
|
+
class DialogDescriptionComponent {
|
|
1595
|
+
class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
1596
|
+
classes = computed(() => cn('text-sm text-muted-foreground', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
1597
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DialogDescriptionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1598
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.9", type: DialogDescriptionComponent, isStandalone: true, selector: "ui-dialog-description, p[ui-dialog-description]", 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 });
|
|
1599
|
+
}
|
|
1600
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DialogDescriptionComponent, decorators: [{
|
|
1601
|
+
type: Component,
|
|
1602
|
+
args: [{
|
|
1603
|
+
selector: 'ui-dialog-description, p[ui-dialog-description]',
|
|
1604
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1605
|
+
host: { '[class]': 'classes()' },
|
|
1606
|
+
template: `<ng-content />`,
|
|
1607
|
+
}]
|
|
1608
|
+
}], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
1609
|
+
class DialogContentComponent {
|
|
1610
|
+
class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
1611
|
+
classes = computed(() => cn('grid gap-4', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
1612
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DialogContentComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1613
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.9", type: DialogContentComponent, isStandalone: true, selector: "ui-dialog-content", 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 });
|
|
1614
|
+
}
|
|
1615
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DialogContentComponent, decorators: [{
|
|
1616
|
+
type: Component,
|
|
1617
|
+
args: [{
|
|
1618
|
+
selector: 'ui-dialog-content',
|
|
1619
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1620
|
+
host: { '[class]': 'classes()' },
|
|
1621
|
+
template: `<ng-content />`,
|
|
1622
|
+
}]
|
|
1623
|
+
}], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
1624
|
+
class DialogFooterComponent {
|
|
1625
|
+
class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
1626
|
+
classes = computed(() => cn('flex flex-col-reverse gap-2 sm:flex-row sm:justify-end sm:gap-2', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
1627
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DialogFooterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1628
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.9", type: DialogFooterComponent, isStandalone: true, selector: "ui-dialog-footer", 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 });
|
|
1629
|
+
}
|
|
1630
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DialogFooterComponent, decorators: [{
|
|
1631
|
+
type: Component,
|
|
1632
|
+
args: [{
|
|
1633
|
+
selector: 'ui-dialog-footer',
|
|
1634
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1635
|
+
host: { '[class]': 'classes()' },
|
|
1636
|
+
template: `<ng-content />`,
|
|
1637
|
+
}]
|
|
1638
|
+
}], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
1639
|
+
|
|
1640
|
+
class MenuItemComponent {
|
|
1641
|
+
el = inject(ElementRef);
|
|
1642
|
+
disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
1643
|
+
inset = input(false, ...(ngDevMode ? [{ debugName: "inset" }] : /* istanbul ignore next */ []));
|
|
1644
|
+
class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
1645
|
+
selected = output();
|
|
1646
|
+
classes = computed(() => cn('relative flex w-full cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none', 'transition-colors focus:bg-accent focus:text-accent-foreground', 'data-[inset=true]:pl-8', 'aria-disabled:pointer-events-none aria-disabled:opacity-50', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
1647
|
+
focus() {
|
|
1648
|
+
this.el.nativeElement.focus();
|
|
1649
|
+
}
|
|
1650
|
+
getLabel() {
|
|
1651
|
+
return this.el.nativeElement.textContent?.trim() ?? '';
|
|
1652
|
+
}
|
|
1653
|
+
handleClick(e) {
|
|
1654
|
+
if (this.disabled())
|
|
1655
|
+
return;
|
|
1656
|
+
this.selected.emit(e);
|
|
1657
|
+
}
|
|
1658
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: MenuItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1659
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.9", type: MenuItemComponent, isStandalone: true, selector: "ui-menu-item, button[ui-menu-item]", inputs: { disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, inset: { classPropertyName: "inset", publicName: "inset", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { selected: "selected" }, host: { listeners: { "click": "handleClick($any($event))", "keydown.enter": "handleClick($any($event))", "keydown.space": "handleClick($any($event))" }, properties: { "class": "classes()", "attr.role": "\"menuitem\"", "attr.tabindex": "disabled() ? -1 : -1", "attr.aria-disabled": "disabled() ? \"true\" : null", "attr.data-inset": "inset() ? \"true\" : null" } }, ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1660
|
+
}
|
|
1661
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: MenuItemComponent, decorators: [{
|
|
1662
|
+
type: Component,
|
|
1663
|
+
args: [{
|
|
1664
|
+
selector: 'ui-menu-item, button[ui-menu-item]',
|
|
1665
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1666
|
+
host: {
|
|
1667
|
+
'[class]': 'classes()',
|
|
1668
|
+
'[attr.role]': '"menuitem"',
|
|
1669
|
+
'[attr.tabindex]': 'disabled() ? -1 : -1',
|
|
1670
|
+
'[attr.aria-disabled]': 'disabled() ? "true" : null',
|
|
1671
|
+
'[attr.data-inset]': 'inset() ? "true" : null',
|
|
1672
|
+
'(click)': 'handleClick($any($event))',
|
|
1673
|
+
'(keydown.enter)': 'handleClick($any($event))',
|
|
1674
|
+
'(keydown.space)': 'handleClick($any($event))',
|
|
1675
|
+
},
|
|
1676
|
+
template: `<ng-content />`,
|
|
1677
|
+
}]
|
|
1678
|
+
}], propDecorators: { disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], inset: [{ type: i0.Input, args: [{ isSignal: true, alias: "inset", required: false }] }], class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], selected: [{ type: i0.Output, args: ["selected"] }] } });
|
|
1679
|
+
class MenuSeparatorComponent {
|
|
1680
|
+
class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
1681
|
+
classes = computed(() => cn('-mx-1 my-1 h-px bg-muted block', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
1682
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: MenuSeparatorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1683
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.9", type: MenuSeparatorComponent, isStandalone: true, selector: "ui-menu-separator", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()", "attr.role": "\"separator\"", "attr.aria-orientation": "\"horizontal\"" } }, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1684
|
+
}
|
|
1685
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: MenuSeparatorComponent, decorators: [{
|
|
1686
|
+
type: Component,
|
|
1687
|
+
args: [{
|
|
1688
|
+
selector: 'ui-menu-separator',
|
|
1689
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1690
|
+
host: {
|
|
1691
|
+
'[class]': 'classes()',
|
|
1692
|
+
'[attr.role]': '"separator"',
|
|
1693
|
+
'[attr.aria-orientation]': '"horizontal"',
|
|
1694
|
+
},
|
|
1695
|
+
template: '',
|
|
1696
|
+
}]
|
|
1697
|
+
}], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
1698
|
+
class MenuLabelComponent {
|
|
1699
|
+
inset = input(false, ...(ngDevMode ? [{ debugName: "inset" }] : /* istanbul ignore next */ []));
|
|
1700
|
+
class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
1701
|
+
classes = computed(() => cn('px-2 py-1.5 text-sm font-semibold text-foreground', this.inset() ? 'pl-8' : '', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
1702
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: MenuLabelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1703
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.9", type: MenuLabelComponent, isStandalone: true, selector: "ui-menu-label", inputs: { inset: { classPropertyName: "inset", publicName: "inset", isSignal: true, isRequired: false, transformFunction: null }, 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 });
|
|
1704
|
+
}
|
|
1705
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: MenuLabelComponent, decorators: [{
|
|
1706
|
+
type: Component,
|
|
1707
|
+
args: [{
|
|
1708
|
+
selector: 'ui-menu-label',
|
|
1709
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1710
|
+
host: { '[class]': 'classes()' },
|
|
1711
|
+
template: `<ng-content />`,
|
|
1712
|
+
}]
|
|
1713
|
+
}], propDecorators: { inset: [{ type: i0.Input, args: [{ isSignal: true, alias: "inset", required: false }] }], class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
1714
|
+
class MenuShortcutComponent {
|
|
1715
|
+
class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
1716
|
+
classes = computed(() => cn('ml-auto text-xs tracking-widest text-muted-foreground', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
1717
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: MenuShortcutComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1718
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.9", type: MenuShortcutComponent, isStandalone: true, selector: "ui-menu-shortcut, span[ui-menu-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 });
|
|
1719
|
+
}
|
|
1720
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: MenuShortcutComponent, decorators: [{
|
|
1721
|
+
type: Component,
|
|
1722
|
+
args: [{
|
|
1723
|
+
selector: 'ui-menu-shortcut, span[ui-menu-shortcut]',
|
|
1724
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1725
|
+
host: { '[class]': 'classes()' },
|
|
1726
|
+
template: `<ng-content />`,
|
|
1727
|
+
}]
|
|
1728
|
+
}], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
1729
|
+
|
|
1730
|
+
/**
|
|
1731
|
+
* Surface rendered inside the overlay. Hosts keyboard navigation for its items.
|
|
1732
|
+
*/
|
|
1733
|
+
class MenuSurfaceComponent {
|
|
1734
|
+
class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
1735
|
+
items;
|
|
1736
|
+
closeRequested = output();
|
|
1737
|
+
keyManager = null;
|
|
1738
|
+
classes = computed(() => cn('z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md outline-none', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
1739
|
+
ngAfterContentInit() {
|
|
1740
|
+
this.keyManager = new FocusKeyManager(this.items)
|
|
1741
|
+
.withWrap()
|
|
1742
|
+
.withTypeAhead();
|
|
1743
|
+
// Focus the first enabled item when the menu opens.
|
|
1744
|
+
queueMicrotask(() => this.keyManager?.setFirstItemActive());
|
|
1745
|
+
}
|
|
1746
|
+
onArrow(e, delta) {
|
|
1747
|
+
e.preventDefault();
|
|
1748
|
+
if (!this.keyManager)
|
|
1749
|
+
return;
|
|
1750
|
+
delta > 0 ? this.keyManager.setNextItemActive() : this.keyManager.setPreviousItemActive();
|
|
1751
|
+
}
|
|
1752
|
+
onHome(e) {
|
|
1753
|
+
e.preventDefault();
|
|
1754
|
+
this.keyManager?.setFirstItemActive();
|
|
1755
|
+
}
|
|
1756
|
+
onEnd(e) {
|
|
1757
|
+
e.preventDefault();
|
|
1758
|
+
this.keyManager?.setLastItemActive();
|
|
1759
|
+
}
|
|
1760
|
+
onTab(e) {
|
|
1761
|
+
e.preventDefault();
|
|
1762
|
+
this.closeRequested.emit();
|
|
1763
|
+
}
|
|
1764
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: MenuSurfaceComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1765
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.9", type: MenuSurfaceComponent, isStandalone: true, selector: "ui-menu-surface", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { closeRequested: "closeRequested" }, host: { attributes: { "tabindex": "-1" }, listeners: { "keydown.arrowDown": "onArrow($any($event), 1)", "keydown.arrowUp": "onArrow($any($event), -1)", "keydown.home": "onHome($any($event))", "keydown.end": "onEnd($any($event))", "keydown.tab": "onTab($any($event))" }, properties: { "class": "classes()", "attr.role": "\"menu\"" } }, queries: [{ propertyName: "items", predicate: MenuItemComponent, descendants: true }], ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1766
|
+
}
|
|
1767
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: MenuSurfaceComponent, decorators: [{
|
|
1768
|
+
type: Component,
|
|
1769
|
+
args: [{
|
|
1770
|
+
selector: 'ui-menu-surface',
|
|
1771
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1772
|
+
host: {
|
|
1773
|
+
'[class]': 'classes()',
|
|
1774
|
+
'[attr.role]': '"menu"',
|
|
1775
|
+
tabindex: '-1',
|
|
1776
|
+
'(keydown.arrowDown)': 'onArrow($any($event), 1)',
|
|
1777
|
+
'(keydown.arrowUp)': 'onArrow($any($event), -1)',
|
|
1778
|
+
'(keydown.home)': 'onHome($any($event))',
|
|
1779
|
+
'(keydown.end)': 'onEnd($any($event))',
|
|
1780
|
+
'(keydown.tab)': 'onTab($any($event))',
|
|
1781
|
+
},
|
|
1782
|
+
template: `<ng-content />`,
|
|
1783
|
+
}]
|
|
1784
|
+
}], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], items: [{
|
|
1785
|
+
type: ContentChildren,
|
|
1786
|
+
args: [MenuItemComponent, { descendants: true }]
|
|
1787
|
+
}], closeRequested: [{ type: i0.Output, args: ["closeRequested"] }] } });
|
|
1788
|
+
/**
|
|
1789
|
+
* Wraps an `<ng-template>` that holds `<ui-menu-surface>` + items.
|
|
1790
|
+
*/
|
|
1791
|
+
class MenuContentDirective {
|
|
1792
|
+
template = inject(TemplateRef);
|
|
1793
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: MenuContentDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1794
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.9", type: MenuContentDirective, isStandalone: true, selector: "ng-template[uiMenuContent]", exportAs: ["uiMenuContent"], ngImport: i0 });
|
|
1795
|
+
}
|
|
1796
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: MenuContentDirective, decorators: [{
|
|
1797
|
+
type: Directive,
|
|
1798
|
+
args: [{
|
|
1799
|
+
selector: 'ng-template[uiMenuContent]',
|
|
1800
|
+
exportAs: 'uiMenuContent',
|
|
1801
|
+
}]
|
|
1802
|
+
}] });
|
|
1803
|
+
|
|
1804
|
+
function position(side, align) {
|
|
1805
|
+
const ax = align === 'start' ? 'start' : align === 'end' ? 'end' : 'center';
|
|
1806
|
+
const ay = align === 'start' ? 'top' : align === 'end' ? 'bottom' : 'center';
|
|
1807
|
+
switch (side) {
|
|
1808
|
+
case 'bottom':
|
|
1809
|
+
return { originX: ax, originY: 'bottom', overlayX: ax, overlayY: 'top', offsetY: 4 };
|
|
1810
|
+
case 'top':
|
|
1811
|
+
return { originX: ax, originY: 'top', overlayX: ax, overlayY: 'bottom', offsetY: -4 };
|
|
1812
|
+
case 'right':
|
|
1813
|
+
return { originX: 'end', originY: ay, overlayX: 'start', overlayY: ay, offsetX: 4 };
|
|
1814
|
+
case 'left':
|
|
1815
|
+
return { originX: 'start', originY: ay, overlayX: 'end', overlayY: ay, offsetX: -4 };
|
|
1816
|
+
}
|
|
1817
|
+
}
|
|
1818
|
+
/**
|
|
1819
|
+
* Opens an `<ng-template uiMenuContent>` anchored to the trigger element.
|
|
1820
|
+
*/
|
|
1821
|
+
class MenuTriggerDirective {
|
|
1822
|
+
overlay = inject(Overlay);
|
|
1823
|
+
vcr = inject(ViewContainerRef);
|
|
1824
|
+
el = inject(ElementRef);
|
|
1825
|
+
destroyRef = inject(DestroyRef);
|
|
1826
|
+
uiMenuTrigger = input.required(...(ngDevMode ? [{ debugName: "uiMenuTrigger" }] : /* istanbul ignore next */ []));
|
|
1827
|
+
side = input('bottom', ...(ngDevMode ? [{ debugName: "side" }] : /* istanbul ignore next */ []));
|
|
1828
|
+
align = input('start', ...(ngDevMode ? [{ debugName: "align" }] : /* istanbul ignore next */ []));
|
|
1829
|
+
disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
1830
|
+
openedChange = output();
|
|
1831
|
+
overlayRef = null;
|
|
1832
|
+
isOpen = signal(false, ...(ngDevMode ? [{ debugName: "isOpen" }] : /* istanbul ignore next */ []));
|
|
1833
|
+
toggle() {
|
|
1834
|
+
if (this.disabled())
|
|
1835
|
+
return;
|
|
1836
|
+
this.isOpen() ? this.close() : this.open();
|
|
1837
|
+
}
|
|
1838
|
+
openAndFocus(e) {
|
|
1839
|
+
if (this.disabled())
|
|
1840
|
+
return;
|
|
1841
|
+
e.preventDefault();
|
|
1842
|
+
this.open();
|
|
1843
|
+
}
|
|
1844
|
+
open() {
|
|
1845
|
+
if (this.isOpen() || this.disabled())
|
|
1846
|
+
return;
|
|
1847
|
+
const primary = position(this.side(), this.align());
|
|
1848
|
+
const fallback = position(this.side() === 'top' ? 'bottom' : this.side() === 'bottom' ? 'top' : this.side(), this.align());
|
|
1849
|
+
this.overlayRef = this.overlay.create({
|
|
1850
|
+
positionStrategy: this.overlay.position().flexibleConnectedTo(this.el).withPositions([primary, fallback]),
|
|
1851
|
+
scrollStrategy: this.overlay.scrollStrategies.reposition(),
|
|
1852
|
+
hasBackdrop: false,
|
|
1853
|
+
panelClass: 'ui-menu-panel',
|
|
1854
|
+
});
|
|
1855
|
+
const portal = new TemplatePortal(this.uiMenuTrigger().template, this.vcr);
|
|
1856
|
+
this.overlayRef.attach(portal);
|
|
1857
|
+
merge(this.overlayRef.outsidePointerEvents().pipe(filter((e) => !this.el.nativeElement.contains(e.target))), this.overlayRef.keydownEvents().pipe(filter((e) => e.key === 'Escape')), this.overlayRef.detachments())
|
|
1858
|
+
.pipe(takeUntilDestroyed(this.destroyRef))
|
|
1859
|
+
.subscribe(() => this.close());
|
|
1860
|
+
this.isOpen.set(true);
|
|
1861
|
+
this.openedChange.emit(true);
|
|
1862
|
+
}
|
|
1863
|
+
close() {
|
|
1864
|
+
if (!this.isOpen())
|
|
1865
|
+
return;
|
|
1866
|
+
this.overlayRef?.dispose();
|
|
1867
|
+
this.overlayRef = null;
|
|
1868
|
+
this.isOpen.set(false);
|
|
1869
|
+
this.openedChange.emit(false);
|
|
1870
|
+
// Restore focus to trigger
|
|
1871
|
+
this.el.nativeElement.focus();
|
|
1872
|
+
}
|
|
1873
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: MenuTriggerDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1874
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.9", type: MenuTriggerDirective, isStandalone: true, selector: "[uiMenuTrigger]", inputs: { uiMenuTrigger: { classPropertyName: "uiMenuTrigger", publicName: "uiMenuTrigger", isSignal: true, isRequired: true, transformFunction: null }, side: { classPropertyName: "side", publicName: "side", isSignal: true, isRequired: false, transformFunction: null }, align: { classPropertyName: "align", publicName: "align", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { openedChange: "openedChange" }, host: { listeners: { "click": "toggle()", "keydown.enter": "openAndFocus($any($event))", "keydown.space": "openAndFocus($any($event))", "keydown.arrowDown": "openAndFocus($any($event))" }, properties: { "attr.aria-haspopup": "\"menu\"", "attr.aria-expanded": "isOpen()" } }, exportAs: ["uiMenuTrigger"], ngImport: i0 });
|
|
1875
|
+
}
|
|
1876
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: MenuTriggerDirective, decorators: [{
|
|
1877
|
+
type: Directive,
|
|
1878
|
+
args: [{
|
|
1879
|
+
selector: '[uiMenuTrigger]',
|
|
1880
|
+
exportAs: 'uiMenuTrigger',
|
|
1881
|
+
host: {
|
|
1882
|
+
'[attr.aria-haspopup]': '"menu"',
|
|
1883
|
+
'[attr.aria-expanded]': 'isOpen()',
|
|
1884
|
+
'(click)': 'toggle()',
|
|
1885
|
+
'(keydown.enter)': 'openAndFocus($any($event))',
|
|
1886
|
+
'(keydown.space)': 'openAndFocus($any($event))',
|
|
1887
|
+
'(keydown.arrowDown)': 'openAndFocus($any($event))',
|
|
1888
|
+
},
|
|
1889
|
+
}]
|
|
1890
|
+
}], propDecorators: { uiMenuTrigger: [{ type: i0.Input, args: [{ isSignal: true, alias: "uiMenuTrigger", required: true }] }], side: [{ type: i0.Input, args: [{ isSignal: true, alias: "side", required: false }] }], align: [{ type: i0.Input, args: [{ isSignal: true, alias: "align", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], openedChange: [{ type: i0.Output, args: ["openedChange"] }] } });
|
|
1891
|
+
|
|
1892
|
+
let nextId = 0;
|
|
1893
|
+
/**
|
|
1894
|
+
* Backing store for a single `<ui-form-field>`. Provided on the component
|
|
1895
|
+
* so descendant parts (label, description, message, control) can inject it.
|
|
1896
|
+
*/
|
|
1897
|
+
class FormFieldContext {
|
|
1898
|
+
uid = ++nextId;
|
|
1899
|
+
controlId = `ui-form-field-${this.uid}`;
|
|
1900
|
+
descriptionId = `${this.controlId}-description`;
|
|
1901
|
+
messageId = `${this.controlId}-message`;
|
|
1902
|
+
control = signal(null, ...(ngDevMode ? [{ debugName: "control" }] : /* istanbul ignore next */ []));
|
|
1903
|
+
hasDescription = signal(false, ...(ngDevMode ? [{ debugName: "hasDescription" }] : /* istanbul ignore next */ []));
|
|
1904
|
+
hasMessage = signal(false, ...(ngDevMode ? [{ debugName: "hasMessage" }] : /* istanbul ignore next */ []));
|
|
1905
|
+
statusTick = signal(0, ...(ngDevMode ? [{ debugName: "statusTick" }] : /* istanbul ignore next */ []));
|
|
1906
|
+
invalid = computed(() => {
|
|
1907
|
+
this.statusTick();
|
|
1908
|
+
const c = this.control();
|
|
1909
|
+
return !!c && c.invalid && (c.touched || c.dirty);
|
|
1910
|
+
}, ...(ngDevMode ? [{ debugName: "invalid" }] : /* istanbul ignore next */ []));
|
|
1911
|
+
firstError = computed(() => {
|
|
1912
|
+
this.statusTick();
|
|
1913
|
+
const c = this.control();
|
|
1914
|
+
if (!c?.errors)
|
|
1915
|
+
return null;
|
|
1916
|
+
const keys = Object.keys(c.errors);
|
|
1917
|
+
return keys.length > 0 ? keys[0] : null;
|
|
1918
|
+
}, ...(ngDevMode ? [{ debugName: "firstError" }] : /* istanbul ignore next */ []));
|
|
1919
|
+
describedBy = computed(() => {
|
|
1920
|
+
const parts = [];
|
|
1921
|
+
if (this.hasDescription())
|
|
1922
|
+
parts.push(this.descriptionId);
|
|
1923
|
+
if (this.hasMessage() && this.invalid())
|
|
1924
|
+
parts.push(this.messageId);
|
|
1925
|
+
return parts.length > 0 ? parts.join(' ') : null;
|
|
1926
|
+
}, ...(ngDevMode ? [{ debugName: "describedBy" }] : /* istanbul ignore next */ []));
|
|
1927
|
+
constructor() {
|
|
1928
|
+
// Re-run computed() above whenever the control's status changes.
|
|
1929
|
+
effect((onCleanup) => {
|
|
1930
|
+
const c = this.control();
|
|
1931
|
+
if (!c)
|
|
1932
|
+
return;
|
|
1933
|
+
const sub = c.statusChanges.subscribe(() => this.statusTick.update((n) => n + 1));
|
|
1934
|
+
onCleanup(() => sub.unsubscribe());
|
|
1935
|
+
});
|
|
1936
|
+
}
|
|
1937
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: FormFieldContext, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1938
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: FormFieldContext });
|
|
1939
|
+
}
|
|
1940
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: FormFieldContext, decorators: [{
|
|
1941
|
+
type: Injectable
|
|
1942
|
+
}], ctorParameters: () => [] });
|
|
1943
|
+
|
|
1944
|
+
/**
|
|
1945
|
+
* Groups a label, control, description, and validation message.
|
|
1946
|
+
* Provides ids + invalid state to descendants via {@link FormFieldContext}.
|
|
1947
|
+
*/
|
|
1948
|
+
class FormFieldComponent {
|
|
1949
|
+
class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
1950
|
+
classes = computed(() => cn('flex flex-col gap-2', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
1951
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: FormFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1952
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.9", type: FormFieldComponent, isStandalone: true, selector: "ui-form-field", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()" } }, providers: [FormFieldContext], ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1953
|
+
}
|
|
1954
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: FormFieldComponent, decorators: [{
|
|
1955
|
+
type: Component,
|
|
1956
|
+
args: [{
|
|
1957
|
+
selector: 'ui-form-field',
|
|
1958
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1959
|
+
providers: [FormFieldContext],
|
|
1960
|
+
host: { '[class]': 'classes()' },
|
|
1961
|
+
template: `<ng-content />`,
|
|
1962
|
+
}]
|
|
1963
|
+
}], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
1964
|
+
|
|
1965
|
+
class FormLabelComponent {
|
|
1966
|
+
ctx = inject(FormFieldContext);
|
|
1967
|
+
class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
1968
|
+
classes = computed(() => cn('text-sm font-medium leading-none', this.ctx.invalid() ? 'text-destructive' : 'text-foreground', 'peer-disabled:cursor-not-allowed peer-disabled:opacity-70', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
1969
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: FormLabelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1970
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.9", type: FormLabelComponent, isStandalone: true, selector: "ui-form-label, label[ui-form-label]", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()", "attr.for": "ctx.controlId" } }, ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1971
|
+
}
|
|
1972
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: FormLabelComponent, decorators: [{
|
|
1973
|
+
type: Component,
|
|
1974
|
+
args: [{
|
|
1975
|
+
selector: 'ui-form-label, label[ui-form-label]',
|
|
1976
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1977
|
+
host: {
|
|
1978
|
+
'[class]': 'classes()',
|
|
1979
|
+
'[attr.for]': 'ctx.controlId',
|
|
1980
|
+
},
|
|
1981
|
+
template: `<ng-content />`,
|
|
1982
|
+
}]
|
|
1983
|
+
}], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
1984
|
+
|
|
1985
|
+
class FormDescriptionComponent {
|
|
1986
|
+
ctx = inject(FormFieldContext);
|
|
1987
|
+
class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
1988
|
+
classes = computed(() => cn('text-sm text-muted-foreground', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
1989
|
+
ngOnInit() {
|
|
1990
|
+
this.ctx.hasDescription.set(true);
|
|
1991
|
+
}
|
|
1992
|
+
ngOnDestroy() {
|
|
1993
|
+
this.ctx.hasDescription.set(false);
|
|
1994
|
+
}
|
|
1995
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: FormDescriptionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1996
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.9", type: FormDescriptionComponent, isStandalone: true, selector: "ui-form-description, p[ui-form-description]", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()", "attr.id": "ctx.descriptionId" } }, ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1997
|
+
}
|
|
1998
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: FormDescriptionComponent, decorators: [{
|
|
1999
|
+
type: Component,
|
|
2000
|
+
args: [{
|
|
2001
|
+
selector: 'ui-form-description, p[ui-form-description]',
|
|
2002
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
2003
|
+
host: {
|
|
2004
|
+
'[class]': 'classes()',
|
|
2005
|
+
'[attr.id]': 'ctx.descriptionId',
|
|
2006
|
+
},
|
|
2007
|
+
template: `<ng-content />`,
|
|
2008
|
+
}]
|
|
2009
|
+
}], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
2010
|
+
|
|
2011
|
+
/**
|
|
2012
|
+
* Renders validation errors for the field's control.
|
|
2013
|
+
* By default, surfaces the first error key. Provide custom content to override.
|
|
2014
|
+
*/
|
|
2015
|
+
class FormMessageComponent {
|
|
2016
|
+
ctx = inject(FormFieldContext);
|
|
2017
|
+
class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
2018
|
+
show = computed(() => this.ctx.invalid(), ...(ngDevMode ? [{ debugName: "show" }] : /* istanbul ignore next */ []));
|
|
2019
|
+
classes = computed(() => cn('text-sm font-medium text-destructive', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
2020
|
+
ngOnInit() {
|
|
2021
|
+
this.ctx.hasMessage.set(true);
|
|
2022
|
+
}
|
|
2023
|
+
ngOnDestroy() {
|
|
2024
|
+
this.ctx.hasMessage.set(false);
|
|
2025
|
+
}
|
|
2026
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: FormMessageComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2027
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: FormMessageComponent, isStandalone: true, selector: "ui-form-message, p[ui-form-message]", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()", "attr.id": "ctx.messageId", "attr.role": "\"alert\"", "attr.aria-live": "\"polite\"" } }, ngImport: i0, template: `
|
|
2028
|
+
@if (show()) {
|
|
2029
|
+
<ng-content>{{ ctx.firstError() }}</ng-content>
|
|
2030
|
+
}
|
|
2031
|
+
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2032
|
+
}
|
|
2033
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: FormMessageComponent, decorators: [{
|
|
2034
|
+
type: Component,
|
|
2035
|
+
args: [{
|
|
2036
|
+
selector: 'ui-form-message, p[ui-form-message]',
|
|
2037
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
2038
|
+
host: {
|
|
2039
|
+
'[class]': 'classes()',
|
|
2040
|
+
'[attr.id]': 'ctx.messageId',
|
|
2041
|
+
'[attr.role]': '"alert"',
|
|
2042
|
+
'[attr.aria-live]': '"polite"',
|
|
2043
|
+
},
|
|
2044
|
+
template: `
|
|
2045
|
+
@if (show()) {
|
|
2046
|
+
<ng-content>{{ ctx.firstError() }}</ng-content>
|
|
2047
|
+
}
|
|
2048
|
+
`,
|
|
2049
|
+
}]
|
|
2050
|
+
}], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
2051
|
+
|
|
2052
|
+
/**
|
|
2053
|
+
* Attach to the native form control inside a `<ui-form-field>` to auto-wire:
|
|
2054
|
+
* - `id` ↔ `<ui-form-label for>`
|
|
2055
|
+
* - `aria-describedby` ↔ description + error message
|
|
2056
|
+
* - `aria-invalid` ↔ control validity (after touch/dirty)
|
|
2057
|
+
*
|
|
2058
|
+
* @example
|
|
2059
|
+
* <ui-form-field>
|
|
2060
|
+
* <ui-form-label>Email</ui-form-label>
|
|
2061
|
+
* <input ui-input uiFormControl [formControl]="email" />
|
|
2062
|
+
* <ui-form-description>We'll never share it.</ui-form-description>
|
|
2063
|
+
* <ui-form-message />
|
|
2064
|
+
* </ui-form-field>
|
|
2065
|
+
*/
|
|
2066
|
+
class FormControlDirective {
|
|
2067
|
+
ctx = inject(FormFieldContext);
|
|
2068
|
+
ngControl = inject(NgControl, { optional: true, self: true });
|
|
2069
|
+
ngOnInit() {
|
|
2070
|
+
if (this.ngControl?.control) {
|
|
2071
|
+
this.ctx.control.set(this.ngControl.control);
|
|
2072
|
+
}
|
|
2073
|
+
}
|
|
2074
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: FormControlDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
2075
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.9", type: FormControlDirective, isStandalone: true, selector: "[uiFormControl]", host: { properties: { "attr.id": "ctx.controlId", "attr.aria-describedby": "ctx.describedBy()", "attr.aria-invalid": "ctx.invalid() ? \"true\" : null" } }, ngImport: i0 });
|
|
2076
|
+
}
|
|
2077
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: FormControlDirective, decorators: [{
|
|
2078
|
+
type: Directive,
|
|
2079
|
+
args: [{
|
|
2080
|
+
selector: '[uiFormControl]',
|
|
2081
|
+
host: {
|
|
2082
|
+
'[attr.id]': 'ctx.controlId',
|
|
2083
|
+
'[attr.aria-describedby]': 'ctx.describedBy()',
|
|
2084
|
+
'[attr.aria-invalid]': 'ctx.invalid() ? "true" : null',
|
|
2085
|
+
},
|
|
2086
|
+
}]
|
|
2087
|
+
}] });
|
|
2088
|
+
|
|
2089
|
+
const BASE = [
|
|
2090
|
+
'flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1',
|
|
2091
|
+
'text-sm shadow-sm transition-colors',
|
|
2092
|
+
'file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground',
|
|
2093
|
+
'placeholder:text-muted-foreground',
|
|
2094
|
+
'focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring',
|
|
2095
|
+
'disabled:cursor-not-allowed disabled:opacity-50',
|
|
2096
|
+
'aria-[invalid=true]:border-destructive aria-[invalid=true]:focus-visible:ring-destructive',
|
|
2097
|
+
].join(' ');
|
|
2098
|
+
/**
|
|
2099
|
+
* Styled native `<input>`. Works with Angular's DefaultValueAccessor,
|
|
2100
|
+
* so `ngModel` and reactive forms just work.
|
|
2101
|
+
*/
|
|
2102
|
+
class InputComponent {
|
|
2103
|
+
el = inject(ElementRef);
|
|
2104
|
+
class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
2105
|
+
classes = computed(() => cn(BASE, this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
2106
|
+
focus() {
|
|
2107
|
+
this.el.nativeElement.focus();
|
|
2108
|
+
}
|
|
2109
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: InputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2110
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.9", type: InputComponent, isStandalone: true, selector: "input[ui-input]", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()" } }, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2111
|
+
}
|
|
2112
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: InputComponent, decorators: [{
|
|
2113
|
+
type: Component,
|
|
2114
|
+
args: [{
|
|
2115
|
+
selector: 'input[ui-input]',
|
|
2116
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
2117
|
+
host: { '[class]': 'classes()' },
|
|
2118
|
+
template: '',
|
|
2119
|
+
}]
|
|
2120
|
+
}], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
2121
|
+
|
|
2122
|
+
class LabelComponent {
|
|
2123
|
+
for = input(null, ...(ngDevMode ? [{ debugName: "for" }] : /* istanbul ignore next */ []));
|
|
2124
|
+
class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
2125
|
+
classes = computed(() => cn('text-sm font-medium leading-none text-foreground', 'peer-disabled:cursor-not-allowed peer-disabled:opacity-70', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
2126
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: LabelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2127
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.9", type: LabelComponent, isStandalone: true, selector: "ui-label, label[ui-label]", inputs: { for: { classPropertyName: "for", publicName: "for", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()", "attr.for": "for() || null" } }, ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2128
|
+
}
|
|
2129
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: LabelComponent, decorators: [{
|
|
2130
|
+
type: Component,
|
|
2131
|
+
args: [{
|
|
2132
|
+
selector: 'ui-label, label[ui-label]',
|
|
2133
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
2134
|
+
host: {
|
|
2135
|
+
'[class]': 'classes()',
|
|
2136
|
+
'[attr.for]': 'for() || null',
|
|
2137
|
+
},
|
|
2138
|
+
template: `<ng-content />`,
|
|
2139
|
+
}]
|
|
2140
|
+
}], propDecorators: { for: [{ type: i0.Input, args: [{ isSignal: true, alias: "for", required: false }] }], class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
2141
|
+
|
|
2142
|
+
/**
|
|
2143
|
+
* Simple pagination. Emits the desired page via `(pageChange)` and reflects
|
|
2144
|
+
* the current page through the `page` model input.
|
|
2145
|
+
*/
|
|
2146
|
+
class PaginationComponent {
|
|
2147
|
+
page = model(1, ...(ngDevMode ? [{ debugName: "page" }] : /* istanbul ignore next */ []));
|
|
2148
|
+
total = input(1, ...(ngDevMode ? [{ debugName: "total" }] : /* istanbul ignore next */ []));
|
|
2149
|
+
/** Number of sibling pages on each side of current. */
|
|
2150
|
+
siblingCount = input(1, ...(ngDevMode ? [{ debugName: "siblingCount" }] : /* istanbul ignore next */ []));
|
|
2151
|
+
class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
2152
|
+
pageChange = output();
|
|
2153
|
+
classes = computed(() => cn('mx-auto flex w-full justify-center', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
2154
|
+
pages = computed(() => {
|
|
2155
|
+
const total = Math.max(1, this.total());
|
|
2156
|
+
const current = Math.min(Math.max(1, this.page()), total);
|
|
2157
|
+
const siblings = Math.max(0, this.siblingCount());
|
|
2158
|
+
const range = [];
|
|
2159
|
+
const start = Math.max(2, current - siblings);
|
|
2160
|
+
const end = Math.min(total - 1, current + siblings);
|
|
2161
|
+
range.push({ key: 'p-1', kind: 'page', value: 1 });
|
|
2162
|
+
if (start > 2)
|
|
2163
|
+
range.push({ key: 'e-start', kind: 'ellipsis', value: -1 });
|
|
2164
|
+
for (let i = start; i <= end; i++)
|
|
2165
|
+
range.push({ key: `p-${i}`, kind: 'page', value: i });
|
|
2166
|
+
if (end < total - 1)
|
|
2167
|
+
range.push({ key: 'e-end', kind: 'ellipsis', value: -1 });
|
|
2168
|
+
if (total > 1)
|
|
2169
|
+
range.push({ key: `p-${total}`, kind: 'page', value: total });
|
|
2170
|
+
return range;
|
|
2171
|
+
}, ...(ngDevMode ? [{ debugName: "pages" }] : /* istanbul ignore next */ []));
|
|
2172
|
+
navClasses() {
|
|
2173
|
+
return cn(buttonVariants({ variant: 'ghost', size: 'default' }), 'gap-1 pl-2.5 pr-2.5');
|
|
2174
|
+
}
|
|
2175
|
+
pageClasses(active) {
|
|
2176
|
+
return cn(buttonVariants({ variant: active ? 'outline' : 'ghost', size: 'icon' }), 'h-9 w-9');
|
|
2177
|
+
}
|
|
2178
|
+
go(target) {
|
|
2179
|
+
const total = Math.max(1, this.total());
|
|
2180
|
+
const next = Math.min(Math.max(1, target), total);
|
|
2181
|
+
if (next === this.page())
|
|
2182
|
+
return;
|
|
2183
|
+
this.page.set(next);
|
|
2184
|
+
this.pageChange.emit(next);
|
|
2185
|
+
}
|
|
2186
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: PaginationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2187
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: PaginationComponent, isStandalone: true, selector: "ui-pagination, nav[ui-pagination]", inputs: { page: { classPropertyName: "page", publicName: "page", isSignal: true, isRequired: false, transformFunction: null }, total: { classPropertyName: "total", publicName: "total", isSignal: true, isRequired: false, transformFunction: null }, siblingCount: { classPropertyName: "siblingCount", publicName: "siblingCount", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { page: "pageChange", pageChange: "pageChange" }, host: { attributes: { "role": "navigation", "aria-label": "pagination" }, properties: { "class": "classes()" } }, ngImport: i0, template: `
|
|
2188
|
+
<ul class="flex flex-row items-center gap-1">
|
|
2189
|
+
<li>
|
|
2190
|
+
<button
|
|
2191
|
+
type="button"
|
|
2192
|
+
[disabled]="page() <= 1 || null"
|
|
2193
|
+
[attr.aria-label]="'Go to previous page'"
|
|
2194
|
+
[class]="navClasses()"
|
|
2195
|
+
(click)="go(page() - 1)">
|
|
2196
|
+
<svg
|
|
2197
|
+
class="h-4 w-4"
|
|
2198
|
+
viewBox="0 0 24 24"
|
|
2199
|
+
fill="none"
|
|
2200
|
+
stroke="currentColor"
|
|
2201
|
+
stroke-width="2"
|
|
2202
|
+
stroke-linecap="round"
|
|
2203
|
+
stroke-linejoin="round">
|
|
2204
|
+
<polyline points="15 18 9 12 15 6" />
|
|
2205
|
+
</svg>
|
|
2206
|
+
<span>Previous</span>
|
|
2207
|
+
</button>
|
|
2208
|
+
</li>
|
|
2209
|
+
|
|
2210
|
+
@for (p of pages(); track p.key) {
|
|
2211
|
+
<li>
|
|
2212
|
+
@if (p.kind === 'page') {
|
|
2213
|
+
<button
|
|
2214
|
+
type="button"
|
|
2215
|
+
[attr.aria-current]="p.value === page() ? 'page' : null"
|
|
2216
|
+
[class]="pageClasses(p.value === page())"
|
|
2217
|
+
(click)="go(p.value)">
|
|
2218
|
+
{{ p.value }}
|
|
2219
|
+
</button>
|
|
2220
|
+
} @else {
|
|
2221
|
+
<span class="flex h-9 w-9 items-center justify-center" aria-hidden="true">…</span>
|
|
2222
|
+
}
|
|
2223
|
+
</li>
|
|
2224
|
+
}
|
|
2225
|
+
|
|
2226
|
+
<li>
|
|
2227
|
+
<button
|
|
2228
|
+
type="button"
|
|
2229
|
+
[disabled]="page() >= total() || null"
|
|
2230
|
+
[attr.aria-label]="'Go to next page'"
|
|
2231
|
+
[class]="navClasses()"
|
|
2232
|
+
(click)="go(page() + 1)">
|
|
2233
|
+
<span>Next</span>
|
|
2234
|
+
<svg
|
|
2235
|
+
class="h-4 w-4"
|
|
2236
|
+
viewBox="0 0 24 24"
|
|
2237
|
+
fill="none"
|
|
2238
|
+
stroke="currentColor"
|
|
2239
|
+
stroke-width="2"
|
|
2240
|
+
stroke-linecap="round"
|
|
2241
|
+
stroke-linejoin="round">
|
|
2242
|
+
<polyline points="9 18 15 12 9 6" />
|
|
2243
|
+
</svg>
|
|
2244
|
+
</button>
|
|
2245
|
+
</li>
|
|
2246
|
+
</ul>
|
|
2247
|
+
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2248
|
+
}
|
|
2249
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: PaginationComponent, decorators: [{
|
|
2250
|
+
type: Component,
|
|
2251
|
+
args: [{
|
|
2252
|
+
selector: 'ui-pagination, nav[ui-pagination]',
|
|
2253
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
2254
|
+
host: {
|
|
2255
|
+
role: 'navigation',
|
|
2256
|
+
'aria-label': 'pagination',
|
|
2257
|
+
'[class]': 'classes()',
|
|
2258
|
+
},
|
|
2259
|
+
template: `
|
|
2260
|
+
<ul class="flex flex-row items-center gap-1">
|
|
2261
|
+
<li>
|
|
2262
|
+
<button
|
|
2263
|
+
type="button"
|
|
2264
|
+
[disabled]="page() <= 1 || null"
|
|
2265
|
+
[attr.aria-label]="'Go to previous page'"
|
|
2266
|
+
[class]="navClasses()"
|
|
2267
|
+
(click)="go(page() - 1)">
|
|
2268
|
+
<svg
|
|
2269
|
+
class="h-4 w-4"
|
|
2270
|
+
viewBox="0 0 24 24"
|
|
2271
|
+
fill="none"
|
|
2272
|
+
stroke="currentColor"
|
|
2273
|
+
stroke-width="2"
|
|
2274
|
+
stroke-linecap="round"
|
|
2275
|
+
stroke-linejoin="round">
|
|
2276
|
+
<polyline points="15 18 9 12 15 6" />
|
|
2277
|
+
</svg>
|
|
2278
|
+
<span>Previous</span>
|
|
2279
|
+
</button>
|
|
2280
|
+
</li>
|
|
2281
|
+
|
|
2282
|
+
@for (p of pages(); track p.key) {
|
|
2283
|
+
<li>
|
|
2284
|
+
@if (p.kind === 'page') {
|
|
2285
|
+
<button
|
|
2286
|
+
type="button"
|
|
2287
|
+
[attr.aria-current]="p.value === page() ? 'page' : null"
|
|
2288
|
+
[class]="pageClasses(p.value === page())"
|
|
2289
|
+
(click)="go(p.value)">
|
|
2290
|
+
{{ p.value }}
|
|
2291
|
+
</button>
|
|
2292
|
+
} @else {
|
|
2293
|
+
<span class="flex h-9 w-9 items-center justify-center" aria-hidden="true">…</span>
|
|
2294
|
+
}
|
|
2295
|
+
</li>
|
|
2296
|
+
}
|
|
2297
|
+
|
|
2298
|
+
<li>
|
|
2299
|
+
<button
|
|
2300
|
+
type="button"
|
|
2301
|
+
[disabled]="page() >= total() || null"
|
|
2302
|
+
[attr.aria-label]="'Go to next page'"
|
|
2303
|
+
[class]="navClasses()"
|
|
2304
|
+
(click)="go(page() + 1)">
|
|
2305
|
+
<span>Next</span>
|
|
2306
|
+
<svg
|
|
2307
|
+
class="h-4 w-4"
|
|
2308
|
+
viewBox="0 0 24 24"
|
|
2309
|
+
fill="none"
|
|
2310
|
+
stroke="currentColor"
|
|
2311
|
+
stroke-width="2"
|
|
2312
|
+
stroke-linecap="round"
|
|
2313
|
+
stroke-linejoin="round">
|
|
2314
|
+
<polyline points="9 18 15 12 9 6" />
|
|
2315
|
+
</svg>
|
|
2316
|
+
</button>
|
|
2317
|
+
</li>
|
|
2318
|
+
</ul>
|
|
2319
|
+
`,
|
|
2320
|
+
}]
|
|
2321
|
+
}], propDecorators: { page: [{ type: i0.Input, args: [{ isSignal: true, alias: "page", required: false }] }, { type: i0.Output, args: ["pageChange"] }], total: [{ type: i0.Input, args: [{ isSignal: true, alias: "total", required: false }] }], siblingCount: [{ type: i0.Input, args: [{ isSignal: true, alias: "siblingCount", required: false }] }], class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], pageChange: [{ type: i0.Output, args: ["pageChange"] }] } });
|
|
2322
|
+
|
|
2323
|
+
/**
|
|
2324
|
+
* Wraps a template that will be rendered inside a popover overlay.
|
|
2325
|
+
* Must be used on an `<ng-template>` element.
|
|
2326
|
+
*
|
|
2327
|
+
* @example
|
|
2328
|
+
* <ng-template uiPopoverContent #popover>
|
|
2329
|
+
* <div class="p-4">Content</div>
|
|
2330
|
+
* </ng-template>
|
|
2331
|
+
*/
|
|
2332
|
+
class PopoverContentDirective {
|
|
2333
|
+
template = inject(TemplateRef);
|
|
2334
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: PopoverContentDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
2335
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.9", type: PopoverContentDirective, isStandalone: true, selector: "ng-template[uiPopoverContent]", exportAs: ["uiPopoverContent"], ngImport: i0 });
|
|
2336
|
+
}
|
|
2337
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: PopoverContentDirective, decorators: [{
|
|
2338
|
+
type: Directive,
|
|
2339
|
+
args: [{
|
|
2340
|
+
selector: 'ng-template[uiPopoverContent]',
|
|
2341
|
+
exportAs: 'uiPopoverContent',
|
|
2342
|
+
}]
|
|
2343
|
+
}] });
|
|
2344
|
+
|
|
2345
|
+
const POSITIONS = {
|
|
2346
|
+
top: (a) => ({
|
|
2347
|
+
originX: a === 'start' ? 'start' : a === 'end' ? 'end' : 'center',
|
|
2348
|
+
originY: 'top',
|
|
2349
|
+
overlayX: a === 'start' ? 'start' : a === 'end' ? 'end' : 'center',
|
|
2350
|
+
overlayY: 'bottom',
|
|
2351
|
+
offsetY: -8,
|
|
2352
|
+
}),
|
|
2353
|
+
bottom: (a) => ({
|
|
2354
|
+
originX: a === 'start' ? 'start' : a === 'end' ? 'end' : 'center',
|
|
2355
|
+
originY: 'bottom',
|
|
2356
|
+
overlayX: a === 'start' ? 'start' : a === 'end' ? 'end' : 'center',
|
|
2357
|
+
overlayY: 'top',
|
|
2358
|
+
offsetY: 8,
|
|
2359
|
+
}),
|
|
2360
|
+
left: (a) => ({
|
|
2361
|
+
originX: 'start',
|
|
2362
|
+
originY: a === 'start' ? 'top' : a === 'end' ? 'bottom' : 'center',
|
|
2363
|
+
overlayX: 'end',
|
|
2364
|
+
overlayY: a === 'start' ? 'top' : a === 'end' ? 'bottom' : 'center',
|
|
2365
|
+
offsetX: -8,
|
|
2366
|
+
}),
|
|
2367
|
+
right: (a) => ({
|
|
2368
|
+
originX: 'end',
|
|
2369
|
+
originY: a === 'start' ? 'top' : a === 'end' ? 'bottom' : 'center',
|
|
2370
|
+
overlayX: 'start',
|
|
2371
|
+
overlayY: a === 'start' ? 'top' : a === 'end' ? 'bottom' : 'center',
|
|
2372
|
+
offsetX: 8,
|
|
2373
|
+
}),
|
|
2374
|
+
};
|
|
2375
|
+
/**
|
|
2376
|
+
* Toggle a `<ng-template uiPopoverContent>` anchored to the host element.
|
|
2377
|
+
*
|
|
2378
|
+
* @example
|
|
2379
|
+
* <button ui-button [uiPopoverTrigger]="pop">Open</button>
|
|
2380
|
+
* <ng-template uiPopoverContent #pop>
|
|
2381
|
+
* <div class="w-64 p-4">…</div>
|
|
2382
|
+
* </ng-template>
|
|
2383
|
+
*/
|
|
2384
|
+
class PopoverTriggerDirective {
|
|
2385
|
+
overlay = inject(Overlay);
|
|
2386
|
+
vcr = inject(ViewContainerRef);
|
|
2387
|
+
el = inject(ElementRef);
|
|
2388
|
+
destroyRef = inject(DestroyRef);
|
|
2389
|
+
uiPopoverTrigger = input.required(...(ngDevMode ? [{ debugName: "uiPopoverTrigger" }] : /* istanbul ignore next */ []));
|
|
2390
|
+
side = input('bottom', ...(ngDevMode ? [{ debugName: "side" }] : /* istanbul ignore next */ []));
|
|
2391
|
+
align = input('center', ...(ngDevMode ? [{ debugName: "align" }] : /* istanbul ignore next */ []));
|
|
2392
|
+
disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
2393
|
+
openedChange = output();
|
|
2394
|
+
overlayRef = null;
|
|
2395
|
+
isOpen = signal(false, ...(ngDevMode ? [{ debugName: "isOpen" }] : /* istanbul ignore next */ []));
|
|
2396
|
+
toggle() {
|
|
2397
|
+
if (this.disabled())
|
|
2398
|
+
return;
|
|
2399
|
+
this.isOpen() ? this.close() : this.open();
|
|
2400
|
+
}
|
|
2401
|
+
open() {
|
|
2402
|
+
if (this.isOpen() || this.disabled())
|
|
2403
|
+
return;
|
|
2404
|
+
const primary = POSITIONS[this.side()](this.align());
|
|
2405
|
+
const fallback = POSITIONS[this.oppositeSide(this.side())](this.align());
|
|
2406
|
+
const positionStrategy = this.overlay
|
|
2407
|
+
.position()
|
|
2408
|
+
.flexibleConnectedTo(this.el)
|
|
2409
|
+
.withPositions([primary, fallback])
|
|
2410
|
+
.withPush(false)
|
|
2411
|
+
.withFlexibleDimensions(false);
|
|
2412
|
+
this.overlayRef = this.overlay.create({
|
|
2413
|
+
positionStrategy,
|
|
2414
|
+
scrollStrategy: this.overlay.scrollStrategies.reposition(),
|
|
2415
|
+
hasBackdrop: false,
|
|
2416
|
+
panelClass: 'ui-popover-panel',
|
|
2417
|
+
});
|
|
2418
|
+
const portal = new TemplatePortal(this.uiPopoverTrigger().template, this.vcr);
|
|
2419
|
+
this.overlayRef.attach(portal);
|
|
2420
|
+
merge(this.overlayRef.outsidePointerEvents().pipe(filter((e) => !this.el.nativeElement.contains(e.target))), this.overlayRef.keydownEvents().pipe(filter((e) => e.key === 'Escape')), this.overlayRef.detachments())
|
|
2421
|
+
.pipe(takeUntilDestroyed(this.destroyRef))
|
|
2422
|
+
.subscribe(() => this.close());
|
|
2423
|
+
this.isOpen.set(true);
|
|
2424
|
+
this.openedChange.emit(true);
|
|
2425
|
+
}
|
|
2426
|
+
close() {
|
|
2427
|
+
if (!this.isOpen())
|
|
2428
|
+
return;
|
|
2429
|
+
this.overlayRef?.dispose();
|
|
2430
|
+
this.overlayRef = null;
|
|
2431
|
+
this.isOpen.set(false);
|
|
2432
|
+
this.openedChange.emit(false);
|
|
2433
|
+
}
|
|
2434
|
+
oppositeSide(side) {
|
|
2435
|
+
return side === 'top' ? 'bottom' : side === 'bottom' ? 'top' : side === 'left' ? 'right' : 'left';
|
|
2436
|
+
}
|
|
2437
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: PopoverTriggerDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
2438
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.9", type: PopoverTriggerDirective, isStandalone: true, selector: "[uiPopoverTrigger]", inputs: { uiPopoverTrigger: { classPropertyName: "uiPopoverTrigger", publicName: "uiPopoverTrigger", isSignal: true, isRequired: true, transformFunction: null }, side: { classPropertyName: "side", publicName: "side", isSignal: true, isRequired: false, transformFunction: null }, align: { classPropertyName: "align", publicName: "align", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { openedChange: "openedChange" }, host: { listeners: { "click": "toggle()", "keydown.escape": "close()" }, properties: { "attr.aria-expanded": "isOpen()", "attr.aria-haspopup": "\"dialog\"" } }, exportAs: ["uiPopoverTrigger"], ngImport: i0 });
|
|
2439
|
+
}
|
|
2440
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: PopoverTriggerDirective, decorators: [{
|
|
2441
|
+
type: Directive,
|
|
2442
|
+
args: [{
|
|
2443
|
+
selector: '[uiPopoverTrigger]',
|
|
2444
|
+
exportAs: 'uiPopoverTrigger',
|
|
2445
|
+
host: {
|
|
2446
|
+
'[attr.aria-expanded]': 'isOpen()',
|
|
2447
|
+
'[attr.aria-haspopup]': '"dialog"',
|
|
2448
|
+
'(click)': 'toggle()',
|
|
2449
|
+
'(keydown.escape)': 'close()',
|
|
2450
|
+
},
|
|
2451
|
+
}]
|
|
2452
|
+
}], propDecorators: { uiPopoverTrigger: [{ type: i0.Input, args: [{ isSignal: true, alias: "uiPopoverTrigger", required: true }] }], side: [{ type: i0.Input, args: [{ isSignal: true, alias: "side", required: false }] }], align: [{ type: i0.Input, args: [{ isSignal: true, alias: "align", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], openedChange: [{ type: i0.Output, args: ["openedChange"] }] } });
|
|
2453
|
+
|
|
2454
|
+
class ProgressComponent {
|
|
2455
|
+
value = input(0, ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
2456
|
+
max = input(100, ...(ngDevMode ? [{ debugName: "max" }] : /* istanbul ignore next */ []));
|
|
2457
|
+
indeterminate = input(false, ...(ngDevMode ? [{ debugName: "indeterminate" }] : /* istanbul ignore next */ []));
|
|
2458
|
+
ariaLabel = input(null, { ...(ngDevMode ? { debugName: "ariaLabel" } : /* istanbul ignore next */ {}), alias: 'aria-label' });
|
|
2459
|
+
ariaLabelledby = input(null, { ...(ngDevMode ? { debugName: "ariaLabelledby" } : /* istanbul ignore next */ {}), alias: 'aria-labelledby' });
|
|
2460
|
+
class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
2461
|
+
clamped = computed(() => {
|
|
2462
|
+
const v = this.value() ?? 0;
|
|
2463
|
+
return Math.max(0, Math.min(this.max(), v));
|
|
2464
|
+
}, ...(ngDevMode ? [{ debugName: "clamped" }] : /* istanbul ignore next */ []));
|
|
2465
|
+
indicatorTransform = computed(() => {
|
|
2466
|
+
if (this.indeterminate())
|
|
2467
|
+
return 'translateX(-100%)';
|
|
2468
|
+
const pct = (this.clamped() / this.max()) * 100;
|
|
2469
|
+
return `translateX(-${100 - pct}%)`;
|
|
2470
|
+
}, ...(ngDevMode ? [{ debugName: "indicatorTransform" }] : /* istanbul ignore next */ []));
|
|
2471
|
+
classes = computed(() => cn('relative h-2 w-full overflow-hidden rounded-full bg-secondary', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
2472
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: ProgressComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2473
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.9", type: ProgressComponent, isStandalone: true, selector: "ui-progress", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, indeterminate: { classPropertyName: "indeterminate", publicName: "indeterminate", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "aria-label", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledby: { classPropertyName: "ariaLabelledby", publicName: "aria-labelledby", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()", "attr.role": "\"progressbar\"", "attr.aria-valuemin": "0", "attr.aria-valuemax": "max()", "attr.aria-valuenow": "indeterminate() ? null : clamped()", "attr.aria-label": "ariaLabel()", "attr.aria-labelledby": "ariaLabelledby()", "attr.data-state": "indeterminate() ? \"indeterminate\" : \"determinate\"" } }, ngImport: i0, template: `
|
|
2474
|
+
<div
|
|
2475
|
+
class="ui-progress-indicator h-full w-full flex-1 bg-primary transition-transform"
|
|
2476
|
+
[style.transform]="indicatorTransform()"></div>
|
|
2477
|
+
`, isInline: true, styles: [":host{display:block}:host[data-state=indeterminate] .ui-progress-indicator{animation:ui-progress-indeterminate 1.5s cubic-bezier(.65,.815,.735,.395) infinite}@keyframes ui-progress-indeterminate{0%{transform:translate(-100%)}to{transform:translate(100%)}}@media(prefers-reduced-motion:reduce){:host[data-state=indeterminate] .ui-progress-indicator{animation:none}}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2478
|
+
}
|
|
2479
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: ProgressComponent, decorators: [{
|
|
2480
|
+
type: Component,
|
|
2481
|
+
args: [{ selector: 'ui-progress', changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
2482
|
+
'[class]': 'classes()',
|
|
2483
|
+
'[attr.role]': '"progressbar"',
|
|
2484
|
+
'[attr.aria-valuemin]': '0',
|
|
2485
|
+
'[attr.aria-valuemax]': 'max()',
|
|
2486
|
+
'[attr.aria-valuenow]': 'indeterminate() ? null : clamped()',
|
|
2487
|
+
'[attr.aria-label]': 'ariaLabel()',
|
|
2488
|
+
'[attr.aria-labelledby]': 'ariaLabelledby()',
|
|
2489
|
+
'[attr.data-state]': 'indeterminate() ? "indeterminate" : "determinate"',
|
|
2490
|
+
}, template: `
|
|
2491
|
+
<div
|
|
2492
|
+
class="ui-progress-indicator h-full w-full flex-1 bg-primary transition-transform"
|
|
2493
|
+
[style.transform]="indicatorTransform()"></div>
|
|
2494
|
+
`, styles: [":host{display:block}:host[data-state=indeterminate] .ui-progress-indicator{animation:ui-progress-indeterminate 1.5s cubic-bezier(.65,.815,.735,.395) infinite}@keyframes ui-progress-indeterminate{0%{transform:translate(-100%)}to{transform:translate(100%)}}@media(prefers-reduced-motion:reduce){:host[data-state=indeterminate] .ui-progress-indicator{animation:none}}\n"] }]
|
|
2495
|
+
}], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }], max: [{ type: i0.Input, args: [{ isSignal: true, alias: "max", required: false }] }], indeterminate: [{ type: i0.Input, args: [{ isSignal: true, alias: "indeterminate", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-label", required: false }] }], ariaLabelledby: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-labelledby", required: false }] }], class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
2496
|
+
|
|
2497
|
+
class RadioGroupComponent {
|
|
2498
|
+
name = input('', ...(ngDevMode ? [{ debugName: "name" }] : /* istanbul ignore next */ []));
|
|
2499
|
+
orientation = input('vertical', ...(ngDevMode ? [{ debugName: "orientation" }] : /* istanbul ignore next */ []));
|
|
2500
|
+
class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
2501
|
+
valueChange = output();
|
|
2502
|
+
ref = viewChild.required('ref');
|
|
2503
|
+
value = signal(null, ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
2504
|
+
disabled = signal(false, ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
2505
|
+
classes = computed(() => cn('ui-radio-group grid gap-2', this.orientation() === 'horizontal' ? 'grid-flow-col auto-cols-max' : '', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
2506
|
+
onChange = () => { };
|
|
2507
|
+
onTouched = () => { };
|
|
2508
|
+
handleChange(e) {
|
|
2509
|
+
this.value.set(e.value);
|
|
2510
|
+
this.onChange(e.value);
|
|
2511
|
+
this.onTouched();
|
|
2512
|
+
this.valueChange.emit(e.value);
|
|
2513
|
+
}
|
|
2514
|
+
focus() {
|
|
2515
|
+
this.ref()._radios?.first?.focus();
|
|
2516
|
+
}
|
|
2517
|
+
writeValue(v) {
|
|
2518
|
+
this.value.set(v ?? null);
|
|
2519
|
+
}
|
|
2520
|
+
registerOnChange(fn) {
|
|
2521
|
+
this.onChange = fn;
|
|
2522
|
+
}
|
|
2523
|
+
registerOnTouched(fn) {
|
|
2524
|
+
this.onTouched = fn;
|
|
2525
|
+
}
|
|
2526
|
+
setDisabledState(d) {
|
|
2527
|
+
this.disabled.set(d);
|
|
2528
|
+
}
|
|
2529
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RadioGroupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2530
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.9", type: RadioGroupComponent, isStandalone: true, selector: "ui-radio-group", inputs: { name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange" }, providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => RadioGroupComponent), multi: true }], viewQueries: [{ propertyName: "ref", first: true, predicate: ["ref"], descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
2531
|
+
<mat-radio-group
|
|
2532
|
+
#ref
|
|
2533
|
+
[class]="classes()"
|
|
2534
|
+
[value]="value()"
|
|
2535
|
+
[disabled]="disabled()"
|
|
2536
|
+
[name]="name()"
|
|
2537
|
+
(change)="handleChange($event)">
|
|
2538
|
+
<ng-content />
|
|
2539
|
+
</mat-radio-group>
|
|
2540
|
+
`, isInline: true, styles: [":host{display:block}:host ::ng-deep .mat-mdc-radio-button{--mdc-radio-state-layer-size: 1rem;--mdc-radio-selected-icon-color: hsl(var(--primary));--mdc-radio-selected-focus-icon-color: hsl(var(--primary));--mdc-radio-selected-hover-icon-color: hsl(var(--primary));--mdc-radio-selected-pressed-icon-color: hsl(var(--primary));--mdc-radio-unselected-icon-color: hsl(var(--input));--mdc-radio-unselected-focus-icon-color: hsl(var(--input));--mdc-radio-unselected-hover-icon-color: hsl(var(--input));--mdc-radio-unselected-pressed-icon-color: hsl(var(--input));--mat-radio-ripple-color: transparent;--mat-radio-checked-ripple-color: transparent}:host ::ng-deep .mat-mdc-radio-button .mdc-radio__background:before,:host ::ng-deep .mat-mdc-radio-button .mat-mdc-radio-ripple,:host ::ng-deep .mat-mdc-radio-button .mat-mdc-focus-indicator,:host ::ng-deep .mat-mdc-radio-button .mat-ripple{display:none}:host ::ng-deep .mat-mdc-radio-button .mat-mdc-radio-touch-target{display:none}:host ::ng-deep .mat-mdc-radio-button .mdc-radio{padding:0;margin:0;flex:0 0 1rem;width:1rem;height:1rem}:host ::ng-deep .mat-mdc-radio-button .mdc-radio__native-control{width:1rem;height:1rem;top:0;left:0}:host ::ng-deep .mat-mdc-radio-button .mdc-radio__background{width:1rem;height:1rem}:host ::ng-deep .mat-mdc-radio-button .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-radio-button .mdc-label{padding:0;cursor:pointer}\n"], dependencies: [{ kind: "directive", type: MatRadioGroup, selector: "mat-radio-group", inputs: ["color", "name", "labelPosition", "value", "selected", "disabled", "required", "disabledInteractive"], outputs: ["change"], exportAs: ["matRadioGroup"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2541
|
+
}
|
|
2542
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RadioGroupComponent, decorators: [{
|
|
2543
|
+
type: Component,
|
|
2544
|
+
args: [{ selector: 'ui-radio-group', imports: [MatRadioGroup], changeDetection: ChangeDetectionStrategy.OnPush, providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => RadioGroupComponent), multi: true }], template: `
|
|
2545
|
+
<mat-radio-group
|
|
2546
|
+
#ref
|
|
2547
|
+
[class]="classes()"
|
|
2548
|
+
[value]="value()"
|
|
2549
|
+
[disabled]="disabled()"
|
|
2550
|
+
[name]="name()"
|
|
2551
|
+
(change)="handleChange($event)">
|
|
2552
|
+
<ng-content />
|
|
2553
|
+
</mat-radio-group>
|
|
2554
|
+
`, styles: [":host{display:block}:host ::ng-deep .mat-mdc-radio-button{--mdc-radio-state-layer-size: 1rem;--mdc-radio-selected-icon-color: hsl(var(--primary));--mdc-radio-selected-focus-icon-color: hsl(var(--primary));--mdc-radio-selected-hover-icon-color: hsl(var(--primary));--mdc-radio-selected-pressed-icon-color: hsl(var(--primary));--mdc-radio-unselected-icon-color: hsl(var(--input));--mdc-radio-unselected-focus-icon-color: hsl(var(--input));--mdc-radio-unselected-hover-icon-color: hsl(var(--input));--mdc-radio-unselected-pressed-icon-color: hsl(var(--input));--mat-radio-ripple-color: transparent;--mat-radio-checked-ripple-color: transparent}:host ::ng-deep .mat-mdc-radio-button .mdc-radio__background:before,:host ::ng-deep .mat-mdc-radio-button .mat-mdc-radio-ripple,:host ::ng-deep .mat-mdc-radio-button .mat-mdc-focus-indicator,:host ::ng-deep .mat-mdc-radio-button .mat-ripple{display:none}:host ::ng-deep .mat-mdc-radio-button .mat-mdc-radio-touch-target{display:none}:host ::ng-deep .mat-mdc-radio-button .mdc-radio{padding:0;margin:0;flex:0 0 1rem;width:1rem;height:1rem}:host ::ng-deep .mat-mdc-radio-button .mdc-radio__native-control{width:1rem;height:1rem;top:0;left:0}:host ::ng-deep .mat-mdc-radio-button .mdc-radio__background{width:1rem;height:1rem}:host ::ng-deep .mat-mdc-radio-button .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-radio-button .mdc-label{padding:0;cursor:pointer}\n"] }]
|
|
2555
|
+
}], propDecorators: { name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], orientation: [{ type: i0.Input, args: [{ isSignal: true, alias: "orientation", required: false }] }], class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], valueChange: [{ type: i0.Output, args: ["valueChange"] }], ref: [{ type: i0.ViewChild, args: ['ref', { isSignal: true }] }] } });
|
|
2556
|
+
class RadioComponent {
|
|
2557
|
+
value = input.required(...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
2558
|
+
disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
2559
|
+
class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
2560
|
+
classes = computed(() => cn('ui-radio', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
2561
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RadioComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2562
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.9", type: RadioComponent, isStandalone: true, selector: "ui-radio", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
|
|
2563
|
+
<mat-radio-button disableRipple [class]="classes()" [value]="value()" [disabled]="disabled()">
|
|
2564
|
+
<ng-content />
|
|
2565
|
+
</mat-radio-button>
|
|
2566
|
+
`, isInline: true, styles: [":host{display:block}:host ::ng-deep .mat-mdc-radio-button{--mdc-radio-state-layer-size: 1rem;--mdc-radio-selected-icon-color: hsl(var(--primary));--mdc-radio-selected-focus-icon-color: hsl(var(--primary));--mdc-radio-selected-hover-icon-color: hsl(var(--primary));--mdc-radio-selected-pressed-icon-color: hsl(var(--primary));--mdc-radio-unselected-icon-color: hsl(var(--input));--mdc-radio-unselected-focus-icon-color: hsl(var(--input));--mdc-radio-unselected-hover-icon-color: hsl(var(--input));--mdc-radio-unselected-pressed-icon-color: hsl(var(--input));--mat-radio-ripple-color: transparent;--mat-radio-checked-ripple-color: transparent}:host ::ng-deep .mat-mdc-radio-button .mdc-radio__background:before,:host ::ng-deep .mat-mdc-radio-button .mat-mdc-radio-ripple,:host ::ng-deep .mat-mdc-radio-button .mat-mdc-focus-indicator,:host ::ng-deep .mat-mdc-radio-button .mat-ripple{display:none}:host ::ng-deep .mat-mdc-radio-button .mat-mdc-radio-touch-target{display:none}:host ::ng-deep .mat-mdc-radio-button .mdc-radio{padding:0;margin:0;flex:0 0 1rem;width:1rem;height:1rem}:host ::ng-deep .mat-mdc-radio-button .mdc-radio__native-control{width:1rem;height:1rem;top:0;left:0}:host ::ng-deep .mat-mdc-radio-button .mdc-radio__background{width:1rem;height:1rem}:host ::ng-deep .mat-mdc-radio-button .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-radio-button .mdc-label{padding:0;cursor:pointer}\n"], dependencies: [{ kind: "component", type: MatRadioButton, selector: "mat-radio-button", inputs: ["id", "name", "aria-label", "aria-labelledby", "aria-describedby", "disableRipple", "tabIndex", "checked", "value", "labelPosition", "disabled", "required", "color", "disabledInteractive"], outputs: ["change"], exportAs: ["matRadioButton"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2567
|
+
}
|
|
2568
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RadioComponent, decorators: [{
|
|
2569
|
+
type: Component,
|
|
2570
|
+
args: [{ selector: 'ui-radio', imports: [MatRadioButton], changeDetection: ChangeDetectionStrategy.OnPush, template: `
|
|
2571
|
+
<mat-radio-button disableRipple [class]="classes()" [value]="value()" [disabled]="disabled()">
|
|
2572
|
+
<ng-content />
|
|
2573
|
+
</mat-radio-button>
|
|
2574
|
+
`, styles: [":host{display:block}:host ::ng-deep .mat-mdc-radio-button{--mdc-radio-state-layer-size: 1rem;--mdc-radio-selected-icon-color: hsl(var(--primary));--mdc-radio-selected-focus-icon-color: hsl(var(--primary));--mdc-radio-selected-hover-icon-color: hsl(var(--primary));--mdc-radio-selected-pressed-icon-color: hsl(var(--primary));--mdc-radio-unselected-icon-color: hsl(var(--input));--mdc-radio-unselected-focus-icon-color: hsl(var(--input));--mdc-radio-unselected-hover-icon-color: hsl(var(--input));--mdc-radio-unselected-pressed-icon-color: hsl(var(--input));--mat-radio-ripple-color: transparent;--mat-radio-checked-ripple-color: transparent}:host ::ng-deep .mat-mdc-radio-button .mdc-radio__background:before,:host ::ng-deep .mat-mdc-radio-button .mat-mdc-radio-ripple,:host ::ng-deep .mat-mdc-radio-button .mat-mdc-focus-indicator,:host ::ng-deep .mat-mdc-radio-button .mat-ripple{display:none}:host ::ng-deep .mat-mdc-radio-button .mat-mdc-radio-touch-target{display:none}:host ::ng-deep .mat-mdc-radio-button .mdc-radio{padding:0;margin:0;flex:0 0 1rem;width:1rem;height:1rem}:host ::ng-deep .mat-mdc-radio-button .mdc-radio__native-control{width:1rem;height:1rem;top:0;left:0}:host ::ng-deep .mat-mdc-radio-button .mdc-radio__background{width:1rem;height:1rem}:host ::ng-deep .mat-mdc-radio-button .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-radio-button .mdc-label{padding:0;cursor:pointer}\n"] }]
|
|
2575
|
+
}], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: true }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
2576
|
+
|
|
2577
|
+
/**
|
|
2578
|
+
* Lightweight scroll area using native scrollbars styled via CSS.
|
|
2579
|
+
* Fully accessible — real scrolling, keyboard, wheel, momentum.
|
|
2580
|
+
*/
|
|
2581
|
+
class ScrollAreaComponent {
|
|
2582
|
+
class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
2583
|
+
classes = computed(() => cn('relative overflow-hidden', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
2584
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: ScrollAreaComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2585
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.9", type: ScrollAreaComponent, isStandalone: true, selector: "ui-scroll-area", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()" } }, ngImport: i0, template: `<div class="ui-scroll-area-viewport h-full w-full"><ng-content /></div>`, isInline: true, styles: [":host{display:block;overflow:hidden;position:relative}.ui-scroll-area-viewport{overflow:auto;scrollbar-width:thin;scrollbar-color:hsl(var(--border)) transparent}.ui-scroll-area-viewport::-webkit-scrollbar{width:10px;height:10px}.ui-scroll-area-viewport::-webkit-scrollbar-track{background:transparent}.ui-scroll-area-viewport::-webkit-scrollbar-thumb{background:hsl(var(--border));border:var(--border-width) solid transparent;background-clip:padding-box;border-radius:var(--radius-lg)}.ui-scroll-area-viewport::-webkit-scrollbar-thumb:hover{background:hsl(var(--muted-foreground));background-clip:padding-box}@media(forced-colors:active){.ui-scroll-area-viewport{scrollbar-width:auto;scrollbar-color:auto}.ui-scroll-area-viewport::-webkit-scrollbar-thumb{background:CanvasText;border-color:transparent}}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2586
|
+
}
|
|
2587
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: ScrollAreaComponent, decorators: [{
|
|
2588
|
+
type: Component,
|
|
2589
|
+
args: [{ selector: 'ui-scroll-area', changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
2590
|
+
'[class]': 'classes()',
|
|
2591
|
+
}, template: `<div class="ui-scroll-area-viewport h-full w-full"><ng-content /></div>`, styles: [":host{display:block;overflow:hidden;position:relative}.ui-scroll-area-viewport{overflow:auto;scrollbar-width:thin;scrollbar-color:hsl(var(--border)) transparent}.ui-scroll-area-viewport::-webkit-scrollbar{width:10px;height:10px}.ui-scroll-area-viewport::-webkit-scrollbar-track{background:transparent}.ui-scroll-area-viewport::-webkit-scrollbar-thumb{background:hsl(var(--border));border:var(--border-width) solid transparent;background-clip:padding-box;border-radius:var(--radius-lg)}.ui-scroll-area-viewport::-webkit-scrollbar-thumb:hover{background:hsl(var(--muted-foreground));background-clip:padding-box}@media(forced-colors:active){.ui-scroll-area-viewport{scrollbar-width:auto;scrollbar-color:auto}.ui-scroll-area-viewport::-webkit-scrollbar-thumb{background:CanvasText;border-color:transparent}}\n"] }]
|
|
2592
|
+
}], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
2593
|
+
|
|
2594
|
+
class SelectComponent {
|
|
2595
|
+
placeholder = input('', ...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
|
|
2596
|
+
multiple = input(false, ...(ngDevMode ? [{ debugName: "multiple" }] : /* istanbul ignore next */ []));
|
|
2597
|
+
required = input(false, ...(ngDevMode ? [{ debugName: "required" }] : /* istanbul ignore next */ []));
|
|
2598
|
+
ariaLabel = input(null, { ...(ngDevMode ? { debugName: "ariaLabel" } : /* istanbul ignore next */ {}), alias: 'aria-label' });
|
|
2599
|
+
ariaLabelledby = input(null, { ...(ngDevMode ? { debugName: "ariaLabelledby" } : /* istanbul ignore next */ {}), alias: 'aria-labelledby' });
|
|
2600
|
+
class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
2601
|
+
valueChange = output();
|
|
2602
|
+
openedChange = output();
|
|
2603
|
+
ref = viewChild.required('ref');
|
|
2604
|
+
value = signal(null, ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
2605
|
+
disabled = signal(false, ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
2606
|
+
classes = computed(() => cn('ui-select-field w-full', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
2607
|
+
onChange = () => { };
|
|
2608
|
+
onTouched = () => { };
|
|
2609
|
+
handleChange(e) {
|
|
2610
|
+
this.value.set(e.value);
|
|
2611
|
+
this.onChange(e.value);
|
|
2612
|
+
this.onTouched();
|
|
2613
|
+
this.valueChange.emit(e.value);
|
|
2614
|
+
}
|
|
2615
|
+
open() {
|
|
2616
|
+
this.ref().open();
|
|
2617
|
+
}
|
|
2618
|
+
close() {
|
|
2619
|
+
this.ref().close();
|
|
2620
|
+
}
|
|
2621
|
+
focus() {
|
|
2622
|
+
this.ref().focus();
|
|
2623
|
+
}
|
|
2624
|
+
writeValue(v) {
|
|
2625
|
+
this.value.set(v);
|
|
2626
|
+
}
|
|
2627
|
+
registerOnChange(fn) {
|
|
2628
|
+
this.onChange = fn;
|
|
2629
|
+
}
|
|
2630
|
+
registerOnTouched(fn) {
|
|
2631
|
+
this.onTouched = fn;
|
|
2632
|
+
}
|
|
2633
|
+
setDisabledState(d) {
|
|
2634
|
+
this.disabled.set(d);
|
|
2635
|
+
}
|
|
2636
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: SelectComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2637
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.9", type: SelectComponent, isStandalone: true, selector: "ui-select", inputs: { placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "multiple", 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 }, ariaLabelledby: { classPropertyName: "ariaLabelledby", publicName: "aria-labelledby", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange", openedChange: "openedChange" }, providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => SelectComponent), multi: true }], viewQueries: [{ propertyName: "ref", first: true, predicate: ["ref"], descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
2638
|
+
<mat-form-field [class]="classes()" subscriptSizing="dynamic">
|
|
2639
|
+
<mat-select
|
|
2640
|
+
#ref
|
|
2641
|
+
disableRipple
|
|
2642
|
+
panelClass="ui-select-panel"
|
|
2643
|
+
[value]="value()"
|
|
2644
|
+
[disabled]="disabled()"
|
|
2645
|
+
[multiple]="multiple()"
|
|
2646
|
+
[placeholder]="placeholder()"
|
|
2647
|
+
[required]="required()"
|
|
2648
|
+
[attr.aria-label]="ariaLabel()"
|
|
2649
|
+
[attr.aria-labelledby]="ariaLabelledby()"
|
|
2650
|
+
(selectionChange)="handleChange($event)"
|
|
2651
|
+
(openedChange)="openedChange.emit($event)">
|
|
2652
|
+
<ng-content />
|
|
2653
|
+
</mat-select>
|
|
2654
|
+
</mat-form-field>
|
|
2655
|
+
`, isInline: true, styles: [":host{display:block;width:100%}:host ::ng-deep .mat-mdc-form-field{--mat-form-field-container-height: 2.25rem;--mat-form-field-container-vertical-padding: 0;--mat-form-field-filled-with-label-container-padding-top: 0;--mat-form-field-filled-with-label-container-padding-bottom: 0;--mdc-outlined-text-field-container-shape: calc(var(--radius) - .125rem);--mdc-outlined-text-field-outline-color: hsl(var(--input));--mdc-outlined-text-field-hover-outline-color: hsl(var(--input));--mdc-outlined-text-field-focus-outline-color: hsl(var(--ring));--mdc-outlined-text-field-input-text-color: hsl(var(--foreground));--mdc-outlined-text-field-label-text-color: hsl(var(--muted-foreground));--mdc-outlined-text-field-hover-label-text-color: hsl(var(--muted-foreground));--mdc-outlined-text-field-focus-label-text-color: hsl(var(--muted-foreground));--mdc-outlined-text-field-disabled-outline-color: hsl(var(--input) / .5);--mdc-outlined-text-field-disabled-input-text-color: hsl(var(--muted-foreground));font-family:var(--font-sans);font-size:var(--text-sm);line-height:var(--text-sm--line-height);width:100%}:host ::ng-deep .mat-mdc-text-field-wrapper{background:transparent;padding:0 .75rem}:host ::ng-deep .mat-mdc-form-field-infix{min-height:2.25rem;padding:.5rem 0;width:auto}:host ::ng-deep .mat-mdc-form-field-subscript-wrapper{display:none}:host ::ng-deep .mdc-floating-label,:host ::ng-deep .mat-mdc-floating-label,:host ::ng-deep .mdc-notched-outline__notch .mdc-floating-label{display:none}:host ::ng-deep .mdc-notched-outline__notch{padding:0;border-left:none;border-right:none}:host ::ng-deep .mat-mdc-select-value{color:hsl(var(--foreground))}:host ::ng-deep .mat-mdc-select-placeholder{color:hsl(var(--muted-foreground))}:host ::ng-deep .mat-mdc-select-arrow{color:hsl(var(--muted-foreground))}\n"], dependencies: [{ kind: "component", type: MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "component", type: MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth", "canSelectNullableOptions"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2656
|
+
}
|
|
2657
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: SelectComponent, decorators: [{
|
|
2658
|
+
type: Component,
|
|
2659
|
+
args: [{ selector: 'ui-select', imports: [MatFormField, MatSelect], changeDetection: ChangeDetectionStrategy.OnPush, providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => SelectComponent), multi: true }], template: `
|
|
2660
|
+
<mat-form-field [class]="classes()" subscriptSizing="dynamic">
|
|
2661
|
+
<mat-select
|
|
2662
|
+
#ref
|
|
2663
|
+
disableRipple
|
|
2664
|
+
panelClass="ui-select-panel"
|
|
2665
|
+
[value]="value()"
|
|
2666
|
+
[disabled]="disabled()"
|
|
2667
|
+
[multiple]="multiple()"
|
|
2668
|
+
[placeholder]="placeholder()"
|
|
2669
|
+
[required]="required()"
|
|
2670
|
+
[attr.aria-label]="ariaLabel()"
|
|
2671
|
+
[attr.aria-labelledby]="ariaLabelledby()"
|
|
2672
|
+
(selectionChange)="handleChange($event)"
|
|
2673
|
+
(openedChange)="openedChange.emit($event)">
|
|
2674
|
+
<ng-content />
|
|
2675
|
+
</mat-select>
|
|
2676
|
+
</mat-form-field>
|
|
2677
|
+
`, styles: [":host{display:block;width:100%}:host ::ng-deep .mat-mdc-form-field{--mat-form-field-container-height: 2.25rem;--mat-form-field-container-vertical-padding: 0;--mat-form-field-filled-with-label-container-padding-top: 0;--mat-form-field-filled-with-label-container-padding-bottom: 0;--mdc-outlined-text-field-container-shape: calc(var(--radius) - .125rem);--mdc-outlined-text-field-outline-color: hsl(var(--input));--mdc-outlined-text-field-hover-outline-color: hsl(var(--input));--mdc-outlined-text-field-focus-outline-color: hsl(var(--ring));--mdc-outlined-text-field-input-text-color: hsl(var(--foreground));--mdc-outlined-text-field-label-text-color: hsl(var(--muted-foreground));--mdc-outlined-text-field-hover-label-text-color: hsl(var(--muted-foreground));--mdc-outlined-text-field-focus-label-text-color: hsl(var(--muted-foreground));--mdc-outlined-text-field-disabled-outline-color: hsl(var(--input) / .5);--mdc-outlined-text-field-disabled-input-text-color: hsl(var(--muted-foreground));font-family:var(--font-sans);font-size:var(--text-sm);line-height:var(--text-sm--line-height);width:100%}:host ::ng-deep .mat-mdc-text-field-wrapper{background:transparent;padding:0 .75rem}:host ::ng-deep .mat-mdc-form-field-infix{min-height:2.25rem;padding:.5rem 0;width:auto}:host ::ng-deep .mat-mdc-form-field-subscript-wrapper{display:none}:host ::ng-deep .mdc-floating-label,:host ::ng-deep .mat-mdc-floating-label,:host ::ng-deep .mdc-notched-outline__notch .mdc-floating-label{display:none}:host ::ng-deep .mdc-notched-outline__notch{padding:0;border-left:none;border-right:none}:host ::ng-deep .mat-mdc-select-value{color:hsl(var(--foreground))}:host ::ng-deep .mat-mdc-select-placeholder{color:hsl(var(--muted-foreground))}:host ::ng-deep .mat-mdc-select-arrow{color:hsl(var(--muted-foreground))}\n"] }]
|
|
2678
|
+
}], propDecorators: { placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], multiple: [{ type: i0.Input, args: [{ isSignal: true, alias: "multiple", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-label", required: false }] }], ariaLabelledby: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-labelledby", required: false }] }], class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], valueChange: [{ type: i0.Output, args: ["valueChange"] }], openedChange: [{ type: i0.Output, args: ["openedChange"] }], ref: [{ type: i0.ViewChild, args: ['ref', { isSignal: true }] }] } });
|
|
2679
|
+
|
|
2680
|
+
/**
|
|
2681
|
+
* Option for `<ui-select>`. Wraps `mat-option` so the underlying `mat-select`
|
|
2682
|
+
* can still discover it via `@ContentChildren(MatOption, { descendants: true })`.
|
|
2683
|
+
*/
|
|
2684
|
+
class OptionComponent {
|
|
2685
|
+
value = input.required(...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
2686
|
+
disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
2687
|
+
class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
2688
|
+
classes = computed(() => cn('contents', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
2689
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: OptionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2690
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.9", type: OptionComponent, isStandalone: true, selector: "ui-option", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()" } }, ngImport: i0, template: `
|
|
2691
|
+
<mat-option [value]="value()" [disabled]="disabled()">
|
|
2692
|
+
<ng-content />
|
|
2693
|
+
</mat-option>
|
|
2694
|
+
`, isInline: true, dependencies: [{ kind: "component", type: MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2695
|
+
}
|
|
2696
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: OptionComponent, decorators: [{
|
|
2697
|
+
type: Component,
|
|
2698
|
+
args: [{
|
|
2699
|
+
selector: 'ui-option',
|
|
2700
|
+
imports: [MatOption],
|
|
2701
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
2702
|
+
host: { '[class]': 'classes()' },
|
|
2703
|
+
template: `
|
|
2704
|
+
<mat-option [value]="value()" [disabled]="disabled()">
|
|
2705
|
+
<ng-content />
|
|
2706
|
+
</mat-option>
|
|
2707
|
+
`,
|
|
2708
|
+
}]
|
|
2709
|
+
}], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: true }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
2710
|
+
|
|
2711
|
+
class SeparatorComponent {
|
|
2712
|
+
orientation = input('horizontal', ...(ngDevMode ? [{ debugName: "orientation" }] : /* istanbul ignore next */ []));
|
|
2713
|
+
decorative = input(true, ...(ngDevMode ? [{ debugName: "decorative" }] : /* istanbul ignore next */ []));
|
|
2714
|
+
class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
2715
|
+
classes = computed(() => cn('shrink-0 bg-border', this.orientation() === 'horizontal' ? 'h-px w-full' : 'h-full w-px', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
2716
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: SeparatorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2717
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.9", type: SeparatorComponent, isStandalone: true, selector: "ui-separator", inputs: { orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, decorative: { classPropertyName: "decorative", publicName: "decorative", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()", "attr.role": "decorative() ? \"none\" : \"separator\"", "attr.aria-orientation": "decorative() ? null : orientation()", "attr.data-orientation": "orientation()" } }, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2718
|
+
}
|
|
2719
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: SeparatorComponent, decorators: [{
|
|
2720
|
+
type: Component,
|
|
2721
|
+
args: [{
|
|
2722
|
+
selector: 'ui-separator',
|
|
2723
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
2724
|
+
host: {
|
|
2725
|
+
'[class]': 'classes()',
|
|
2726
|
+
'[attr.role]': 'decorative() ? "none" : "separator"',
|
|
2727
|
+
'[attr.aria-orientation]': 'decorative() ? null : orientation()',
|
|
2728
|
+
'[attr.data-orientation]': 'orientation()',
|
|
2729
|
+
},
|
|
2730
|
+
template: '',
|
|
2731
|
+
}]
|
|
2732
|
+
}], propDecorators: { orientation: [{ type: i0.Input, args: [{ isSignal: true, alias: "orientation", required: false }] }], decorative: [{ type: i0.Input, args: [{ isSignal: true, alias: "decorative", required: false }] }], class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
2733
|
+
|
|
2734
|
+
const SIDE_BASE = {
|
|
2735
|
+
top: 'inset-x-0 top-0 border-b',
|
|
2736
|
+
bottom: 'inset-x-0 bottom-0 border-t',
|
|
2737
|
+
left: 'inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm',
|
|
2738
|
+
right: 'inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm',
|
|
2739
|
+
};
|
|
2740
|
+
const SIDE_ENTER_FROM = {
|
|
2741
|
+
top: 'translateY(-100%)',
|
|
2742
|
+
bottom: 'translateY(100%)',
|
|
2743
|
+
left: 'translateX(-100%)',
|
|
2744
|
+
right: 'translateX(100%)',
|
|
2745
|
+
};
|
|
2746
|
+
class SheetComponent {
|
|
2747
|
+
overlay = inject(Overlay);
|
|
2748
|
+
vcr = inject(ViewContainerRef);
|
|
2749
|
+
trapFactory = inject(FocusTrapFactory);
|
|
2750
|
+
doc = inject(DOCUMENT);
|
|
2751
|
+
destroyRef = inject(DestroyRef);
|
|
2752
|
+
open = model(false, ...(ngDevMode ? [{ debugName: "open" }] : /* istanbul ignore next */ []));
|
|
2753
|
+
side = input('right', ...(ngDevMode ? [{ debugName: "side" }] : /* istanbul ignore next */ []));
|
|
2754
|
+
closeOnEscape = input(true, ...(ngDevMode ? [{ debugName: "closeOnEscape" }] : /* istanbul ignore next */ []));
|
|
2755
|
+
closeOnBackdropClick = input(true, ...(ngDevMode ? [{ debugName: "closeOnBackdropClick" }] : /* istanbul ignore next */ []));
|
|
2756
|
+
labelledBy = input(null, { ...(ngDevMode ? { debugName: "labelledBy" } : /* istanbul ignore next */ {}), alias: 'aria-labelledby' });
|
|
2757
|
+
describedBy = input(null, { ...(ngDevMode ? { debugName: "describedBy" } : /* istanbul ignore next */ {}), alias: 'aria-describedby' });
|
|
2758
|
+
class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
2759
|
+
openedChange = output();
|
|
2760
|
+
tpl = viewChild.required('tpl');
|
|
2761
|
+
overlayRef = null;
|
|
2762
|
+
focusTrap = null;
|
|
2763
|
+
previousFocus = null;
|
|
2764
|
+
surfaceClasses = computed(() => cn('gap-4 p-6 flex flex-col', SIDE_BASE[this.side()], this.class()), ...(ngDevMode ? [{ debugName: "surfaceClasses" }] : /* istanbul ignore next */ []));
|
|
2765
|
+
enterFrom = computed(() => SIDE_ENTER_FROM[this.side()], ...(ngDevMode ? [{ debugName: "enterFrom" }] : /* istanbul ignore next */ []));
|
|
2766
|
+
constructor() {
|
|
2767
|
+
effect(() => {
|
|
2768
|
+
this.open() ? this.attach() : this.detach();
|
|
2769
|
+
});
|
|
2770
|
+
}
|
|
2771
|
+
attach() {
|
|
2772
|
+
if (this.overlayRef)
|
|
2773
|
+
return;
|
|
2774
|
+
this.previousFocus = this.doc.activeElement;
|
|
2775
|
+
this.overlayRef = this.overlay.create({
|
|
2776
|
+
hasBackdrop: true,
|
|
2777
|
+
backdropClass: 'ui-dialog-backdrop',
|
|
2778
|
+
panelClass: 'ui-sheet-panel',
|
|
2779
|
+
scrollStrategy: this.overlay.scrollStrategies.block(),
|
|
2780
|
+
positionStrategy: this.overlay.position().global(),
|
|
2781
|
+
});
|
|
2782
|
+
const portal = new TemplatePortal(this.tpl(), this.vcr);
|
|
2783
|
+
this.overlayRef.attach(portal);
|
|
2784
|
+
this.focusTrap = this.trapFactory.create(this.overlayRef.hostElement);
|
|
2785
|
+
this.focusTrap.focusInitialElementWhenReady();
|
|
2786
|
+
if (this.closeOnBackdropClick()) {
|
|
2787
|
+
this.overlayRef
|
|
2788
|
+
.backdropClick()
|
|
2789
|
+
.pipe(takeUntilDestroyed(this.destroyRef))
|
|
2790
|
+
.subscribe(() => this.open.set(false));
|
|
2791
|
+
}
|
|
2792
|
+
this.overlayRef
|
|
2793
|
+
.keydownEvents()
|
|
2794
|
+
.pipe(takeUntilDestroyed(this.destroyRef), filter((e) => e.key === 'Escape' && this.closeOnEscape()))
|
|
2795
|
+
.subscribe((e) => {
|
|
2796
|
+
e.preventDefault();
|
|
2797
|
+
this.open.set(false);
|
|
2798
|
+
});
|
|
2799
|
+
this.openedChange.emit(true);
|
|
2800
|
+
}
|
|
2801
|
+
detach() {
|
|
2802
|
+
if (!this.overlayRef)
|
|
2803
|
+
return;
|
|
2804
|
+
this.focusTrap?.destroy();
|
|
2805
|
+
this.focusTrap = null;
|
|
2806
|
+
this.overlayRef.dispose();
|
|
2807
|
+
this.overlayRef = null;
|
|
2808
|
+
this.previousFocus?.focus?.();
|
|
2809
|
+
this.openedChange.emit(false);
|
|
2810
|
+
}
|
|
2811
|
+
close() {
|
|
2812
|
+
this.open.set(false);
|
|
2813
|
+
}
|
|
2814
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: SheetComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2815
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.9", type: SheetComponent, isStandalone: true, selector: "ui-sheet", inputs: { open: { classPropertyName: "open", publicName: "open", isSignal: true, isRequired: false, transformFunction: null }, side: { classPropertyName: "side", publicName: "side", isSignal: true, isRequired: false, transformFunction: null }, closeOnEscape: { classPropertyName: "closeOnEscape", publicName: "closeOnEscape", isSignal: true, isRequired: false, transformFunction: null }, closeOnBackdropClick: { classPropertyName: "closeOnBackdropClick", publicName: "closeOnBackdropClick", isSignal: true, isRequired: false, transformFunction: null }, labelledBy: { classPropertyName: "labelledBy", publicName: "aria-labelledby", isSignal: true, isRequired: false, transformFunction: null }, describedBy: { classPropertyName: "describedBy", publicName: "aria-describedby", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { open: "openChange", openedChange: "openedChange" }, viewQueries: [{ propertyName: "tpl", first: true, predicate: ["tpl"], descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
2816
|
+
<ng-template #tpl>
|
|
2817
|
+
<div
|
|
2818
|
+
class="ui-sheet-surface fixed z-50 bg-background shadow-lg transition ease-in-out"
|
|
2819
|
+
role="dialog"
|
|
2820
|
+
aria-modal="true"
|
|
2821
|
+
[attr.aria-labelledby]="labelledBy()"
|
|
2822
|
+
[attr.aria-describedby]="describedBy()"
|
|
2823
|
+
[class]="surfaceClasses()"
|
|
2824
|
+
[style.--ui-sheet-from]="enterFrom()">
|
|
2825
|
+
<ng-content />
|
|
2826
|
+
</div>
|
|
2827
|
+
</ng-template>
|
|
2828
|
+
`, isInline: true, styles: [".ui-sheet-surface{animation:ui-sheet-in .3s cubic-bezier(.2,0,0,1)}@keyframes ui-sheet-in{0%{transform:var(--ui-sheet-from)}to{transform:translate(0)}}@media(prefers-reduced-motion:reduce){.ui-sheet-surface{animation-duration:0ms}}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2829
|
+
}
|
|
2830
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: SheetComponent, decorators: [{
|
|
2831
|
+
type: Component,
|
|
2832
|
+
args: [{ selector: 'ui-sheet', changeDetection: ChangeDetectionStrategy.OnPush, template: `
|
|
2833
|
+
<ng-template #tpl>
|
|
2834
|
+
<div
|
|
2835
|
+
class="ui-sheet-surface fixed z-50 bg-background shadow-lg transition ease-in-out"
|
|
2836
|
+
role="dialog"
|
|
2837
|
+
aria-modal="true"
|
|
2838
|
+
[attr.aria-labelledby]="labelledBy()"
|
|
2839
|
+
[attr.aria-describedby]="describedBy()"
|
|
2840
|
+
[class]="surfaceClasses()"
|
|
2841
|
+
[style.--ui-sheet-from]="enterFrom()">
|
|
2842
|
+
<ng-content />
|
|
2843
|
+
</div>
|
|
2844
|
+
</ng-template>
|
|
2845
|
+
`, styles: [".ui-sheet-surface{animation:ui-sheet-in .3s cubic-bezier(.2,0,0,1)}@keyframes ui-sheet-in{0%{transform:var(--ui-sheet-from)}to{transform:translate(0)}}@media(prefers-reduced-motion:reduce){.ui-sheet-surface{animation-duration:0ms}}\n"] }]
|
|
2846
|
+
}], ctorParameters: () => [], propDecorators: { open: [{ type: i0.Input, args: [{ isSignal: true, alias: "open", required: false }] }, { type: i0.Output, args: ["openChange"] }], side: [{ type: i0.Input, args: [{ isSignal: true, alias: "side", required: false }] }], closeOnEscape: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeOnEscape", required: false }] }], closeOnBackdropClick: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeOnBackdropClick", required: false }] }], labelledBy: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-labelledby", required: false }] }], describedBy: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-describedby", required: false }] }], class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], openedChange: [{ type: i0.Output, args: ["openedChange"] }], tpl: [{ type: i0.ViewChild, args: ['tpl', { isSignal: true }] }] } });
|
|
2847
|
+
|
|
2848
|
+
class SheetHeaderComponent {
|
|
2849
|
+
class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
2850
|
+
classes = computed(() => cn('flex flex-col gap-2 text-center sm:text-left', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
2851
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: SheetHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2852
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.9", type: SheetHeaderComponent, isStandalone: true, selector: "ui-sheet-header", 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 });
|
|
2853
|
+
}
|
|
2854
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: SheetHeaderComponent, decorators: [{
|
|
2855
|
+
type: Component,
|
|
2856
|
+
args: [{
|
|
2857
|
+
selector: 'ui-sheet-header',
|
|
2858
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
2859
|
+
host: { '[class]': 'classes()' },
|
|
2860
|
+
template: `<ng-content />`,
|
|
2861
|
+
}]
|
|
2862
|
+
}], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
2863
|
+
class SheetTitleComponent {
|
|
2864
|
+
class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
2865
|
+
classes = computed(() => cn('text-lg font-semibold text-foreground', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
2866
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: SheetTitleComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2867
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.9", type: SheetTitleComponent, isStandalone: true, selector: "ui-sheet-title, h2[ui-sheet-title]", 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 });
|
|
2868
|
+
}
|
|
2869
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: SheetTitleComponent, decorators: [{
|
|
2870
|
+
type: Component,
|
|
2871
|
+
args: [{
|
|
2872
|
+
selector: 'ui-sheet-title, h2[ui-sheet-title]',
|
|
2873
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
2874
|
+
host: { '[class]': 'classes()' },
|
|
2875
|
+
template: `<ng-content />`,
|
|
2876
|
+
}]
|
|
2877
|
+
}], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
2878
|
+
class SheetDescriptionComponent {
|
|
2879
|
+
class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
2880
|
+
classes = computed(() => cn('text-sm text-muted-foreground', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
2881
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: SheetDescriptionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2882
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.9", type: SheetDescriptionComponent, isStandalone: true, selector: "ui-sheet-description, p[ui-sheet-description]", 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 });
|
|
2883
|
+
}
|
|
2884
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: SheetDescriptionComponent, decorators: [{
|
|
2885
|
+
type: Component,
|
|
2886
|
+
args: [{
|
|
2887
|
+
selector: 'ui-sheet-description, p[ui-sheet-description]',
|
|
2888
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
2889
|
+
host: { '[class]': 'classes()' },
|
|
2890
|
+
template: `<ng-content />`,
|
|
2891
|
+
}]
|
|
2892
|
+
}], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
2893
|
+
class SheetContentComponent {
|
|
2894
|
+
class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
2895
|
+
classes = computed(() => cn('flex-1 overflow-auto', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
2896
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: SheetContentComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2897
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.9", type: SheetContentComponent, isStandalone: true, selector: "ui-sheet-content", 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 });
|
|
2898
|
+
}
|
|
2899
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: SheetContentComponent, decorators: [{
|
|
2900
|
+
type: Component,
|
|
2901
|
+
args: [{
|
|
2902
|
+
selector: 'ui-sheet-content',
|
|
2903
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
2904
|
+
host: { '[class]': 'classes()' },
|
|
2905
|
+
template: `<ng-content />`,
|
|
2906
|
+
}]
|
|
2907
|
+
}], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
2908
|
+
class SheetFooterComponent {
|
|
2909
|
+
class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
2910
|
+
classes = computed(() => cn('flex flex-col-reverse gap-2 sm:flex-row sm:justify-end', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
2911
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: SheetFooterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2912
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.9", type: SheetFooterComponent, isStandalone: true, selector: "ui-sheet-footer", 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 });
|
|
2913
|
+
}
|
|
2914
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: SheetFooterComponent, decorators: [{
|
|
2915
|
+
type: Component,
|
|
2916
|
+
args: [{
|
|
2917
|
+
selector: 'ui-sheet-footer',
|
|
2918
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
2919
|
+
host: { '[class]': 'classes()' },
|
|
2920
|
+
template: `<ng-content />`,
|
|
2921
|
+
}]
|
|
2922
|
+
}], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
2923
|
+
|
|
2924
|
+
class SkeletonComponent {
|
|
2925
|
+
class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
2926
|
+
classes = computed(() => cn('animate-pulse rounded-md bg-muted', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
2927
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: SkeletonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2928
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.9", type: SkeletonComponent, isStandalone: true, selector: "ui-skeleton", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()", "attr.aria-hidden": "\"true\"" } }, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2929
|
+
}
|
|
2930
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: SkeletonComponent, decorators: [{
|
|
2931
|
+
type: Component,
|
|
2932
|
+
args: [{
|
|
2933
|
+
selector: 'ui-skeleton',
|
|
2934
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
2935
|
+
host: {
|
|
2936
|
+
'[class]': 'classes()',
|
|
2937
|
+
'[attr.aria-hidden]': '"true"',
|
|
2938
|
+
},
|
|
2939
|
+
template: '',
|
|
2940
|
+
}]
|
|
2941
|
+
}], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
2942
|
+
|
|
2943
|
+
/**
|
|
2944
|
+
* Styled native range input. Works with `ngModel` / `FormControl` via
|
|
2945
|
+
* Angular's built-in `RangeValueAccessor`. Keyboard + ARIA handled by the browser.
|
|
2946
|
+
*/
|
|
2947
|
+
class SliderComponent {
|
|
2948
|
+
el = inject(ElementRef);
|
|
2949
|
+
class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
2950
|
+
classes = computed(() => cn('ui-slider relative w-full appearance-none bg-transparent', 'focus-visible:outline-none', 'disabled:pointer-events-none disabled:opacity-50', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
2951
|
+
focus() {
|
|
2952
|
+
this.el.nativeElement.focus();
|
|
2953
|
+
}
|
|
2954
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: SliderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2955
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.9", type: SliderComponent, isStandalone: true, selector: "input[type=range][ui-slider]", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()" } }, ngImport: i0, template: '', isInline: true, styles: [":host.ui-slider{height:1.25rem;cursor:pointer}:host.ui-slider::-webkit-slider-runnable-track{height:.5rem;border-radius:var(--radius-lg);background:hsl(var(--secondary))}:host.ui-slider::-moz-range-track{height:.5rem;border-radius:var(--radius-lg);background:hsl(var(--secondary))}:host.ui-slider::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;margin-top:-.25rem;width:1rem;height:1rem;border-radius:var(--radius-lg);background:hsl(var(--background));border:var(--border-width) solid hsl(var(--primary));transition:box-shadow .15s cubic-bezier(.4,0,.2,1)}:host.ui-slider::-moz-range-thumb{width:1rem;height:1rem;border-radius:var(--radius-lg);background:hsl(var(--background));border:var(--border-width) solid hsl(var(--primary));transition:box-shadow .15s cubic-bezier(.4,0,.2,1)}:host.ui-slider:focus-visible::-webkit-slider-thumb{box-shadow:0 0 0 calc(var(--border-width) + 3px) hsl(var(--ring) / .3)}:host.ui-slider:focus-visible::-moz-range-thumb{box-shadow:0 0 0 calc(var(--border-width) + 3px) hsl(var(--ring) / .3)}:host.ui-slider:disabled::-webkit-slider-thumb{cursor:not-allowed}:host.ui-slider:disabled::-moz-range-thumb{cursor:not-allowed}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2956
|
+
}
|
|
2957
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: SliderComponent, decorators: [{
|
|
2958
|
+
type: Component,
|
|
2959
|
+
args: [{ selector: 'input[type=range][ui-slider]', changeDetection: ChangeDetectionStrategy.OnPush, host: { '[class]': 'classes()' }, template: '', styles: [":host.ui-slider{height:1.25rem;cursor:pointer}:host.ui-slider::-webkit-slider-runnable-track{height:.5rem;border-radius:var(--radius-lg);background:hsl(var(--secondary))}:host.ui-slider::-moz-range-track{height:.5rem;border-radius:var(--radius-lg);background:hsl(var(--secondary))}:host.ui-slider::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;margin-top:-.25rem;width:1rem;height:1rem;border-radius:var(--radius-lg);background:hsl(var(--background));border:var(--border-width) solid hsl(var(--primary));transition:box-shadow .15s cubic-bezier(.4,0,.2,1)}:host.ui-slider::-moz-range-thumb{width:1rem;height:1rem;border-radius:var(--radius-lg);background:hsl(var(--background));border:var(--border-width) solid hsl(var(--primary));transition:box-shadow .15s cubic-bezier(.4,0,.2,1)}:host.ui-slider:focus-visible::-webkit-slider-thumb{box-shadow:0 0 0 calc(var(--border-width) + 3px) hsl(var(--ring) / .3)}:host.ui-slider:focus-visible::-moz-range-thumb{box-shadow:0 0 0 calc(var(--border-width) + 3px) hsl(var(--ring) / .3)}:host.ui-slider:disabled::-webkit-slider-thumb{cursor:not-allowed}:host.ui-slider:disabled::-moz-range-thumb{cursor:not-allowed}\n"] }]
|
|
2960
|
+
}], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
2961
|
+
|
|
2962
|
+
/**
|
|
2963
|
+
* Switch — shadcn-styled wrapper around `mat-slide-toggle`.
|
|
2964
|
+
*/
|
|
2965
|
+
class SwitchComponent {
|
|
2966
|
+
required = input(false, ...(ngDevMode ? [{ debugName: "required" }] : /* istanbul ignore next */ []));
|
|
2967
|
+
ariaLabel = input(null, { ...(ngDevMode ? { debugName: "ariaLabel" } : /* istanbul ignore next */ {}), alias: 'aria-label' });
|
|
2968
|
+
ariaLabelledby = input(null, { ...(ngDevMode ? { debugName: "ariaLabelledby" } : /* istanbul ignore next */ {}), alias: 'aria-labelledby' });
|
|
2969
|
+
class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
2970
|
+
checkedChange = output();
|
|
2971
|
+
ref = viewChild.required('ref');
|
|
2972
|
+
checked = signal(false, ...(ngDevMode ? [{ debugName: "checked" }] : /* istanbul ignore next */ []));
|
|
2973
|
+
disabled = signal(false, ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
2974
|
+
classes = computed(() => cn('ui-switch', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
2975
|
+
onChange = () => { };
|
|
2976
|
+
onTouched = () => { };
|
|
2977
|
+
handleChange(e) {
|
|
2978
|
+
this.checked.set(e.checked);
|
|
2979
|
+
this.onChange(e.checked);
|
|
2980
|
+
this.onTouched();
|
|
2981
|
+
this.checkedChange.emit(e.checked);
|
|
2982
|
+
}
|
|
2983
|
+
focus() {
|
|
2984
|
+
this.ref().focus();
|
|
2985
|
+
}
|
|
2986
|
+
writeValue(v) {
|
|
2987
|
+
this.checked.set(!!v);
|
|
2988
|
+
}
|
|
2989
|
+
registerOnChange(fn) {
|
|
2990
|
+
this.onChange = fn;
|
|
2991
|
+
}
|
|
2992
|
+
registerOnTouched(fn) {
|
|
2993
|
+
this.onTouched = fn;
|
|
2994
|
+
}
|
|
2995
|
+
setDisabledState(d) {
|
|
2996
|
+
this.disabled.set(d);
|
|
2997
|
+
}
|
|
2998
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: SwitchComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2999
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.9", type: SwitchComponent, isStandalone: true, selector: "ui-switch", inputs: { required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "aria-label", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledby: { classPropertyName: "ariaLabelledby", publicName: "aria-labelledby", 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(() => SwitchComponent), multi: true }], viewQueries: [{ propertyName: "ref", first: true, predicate: ["ref"], descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
3000
|
+
<mat-slide-toggle
|
|
3001
|
+
#ref
|
|
3002
|
+
hideIcon
|
|
3003
|
+
disableRipple
|
|
3004
|
+
[class]="classes()"
|
|
3005
|
+
[checked]="checked()"
|
|
3006
|
+
[disabled]="disabled()"
|
|
3007
|
+
[required]="required()"
|
|
3008
|
+
[attr.aria-label]="ariaLabel()"
|
|
3009
|
+
[attr.aria-labelledby]="ariaLabelledby()"
|
|
3010
|
+
(change)="handleChange($event)">
|
|
3011
|
+
<ng-content />
|
|
3012
|
+
</mat-slide-toggle>
|
|
3013
|
+
`, isInline: true, styles: [":host{display:inline-flex}:host ::ng-deep .mat-mdc-slide-toggle{--mdc-switch-track-width: 2rem;--mdc-switch-track-height: 1.15rem;--mdc-switch-track-shape: 9999px;--mdc-switch-handle-shape: 9999px;--mdc-switch-handle-width: .875rem;--mdc-switch-handle-height: .875rem;--mdc-switch-state-layer-size: 0;--mdc-switch-selected-track-color: hsl(var(--primary));--mdc-switch-selected-focus-track-color: hsl(var(--primary));--mdc-switch-selected-hover-track-color: hsl(var(--primary));--mdc-switch-selected-pressed-track-color: hsl(var(--primary));--mdc-switch-unselected-track-color: hsl(var(--input));--mdc-switch-unselected-focus-track-color: hsl(var(--input));--mdc-switch-unselected-hover-track-color: hsl(var(--input));--mdc-switch-unselected-pressed-track-color: hsl(var(--input));--mdc-switch-selected-handle-color: hsl(var(--primary-foreground));--mdc-switch-selected-focus-handle-color: hsl(var(--primary-foreground));--mdc-switch-selected-hover-handle-color: hsl(var(--primary-foreground));--mdc-switch-selected-pressed-handle-color: hsl(var(--primary-foreground));--mdc-switch-unselected-handle-color: hsl(var(--background));--mdc-switch-unselected-focus-handle-color: hsl(var(--background));--mdc-switch-unselected-hover-handle-color: hsl(var(--background));--mdc-switch-unselected-pressed-handle-color: hsl(var(--background));--mdc-switch-selected-icon-color: transparent;--mdc-switch-unselected-icon-color: transparent}:host ::ng-deep .mat-mdc-slide-toggle .mdc-switch__ripple,:host ::ng-deep .mat-mdc-slide-toggle .mat-mdc-slide-toggle-ripple,:host ::ng-deep .mat-mdc-slide-toggle .mat-mdc-focus-indicator{display:none}:host ::ng-deep .mat-mdc-slide-toggle .mdc-switch__icons{display:none}:host ::ng-deep .mat-mdc-slide-toggle .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-slide-toggle .mdc-label{padding:0;cursor:pointer}\n"], dependencies: [{ kind: "component", type: MatSlideToggle, selector: "mat-slide-toggle", inputs: ["name", "id", "labelPosition", "aria-label", "aria-labelledby", "aria-describedby", "required", "color", "disabled", "disableRipple", "tabIndex", "checked", "hideIcon", "disabledInteractive"], outputs: ["change", "toggleChange"], exportAs: ["matSlideToggle"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3014
|
+
}
|
|
3015
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: SwitchComponent, decorators: [{
|
|
3016
|
+
type: Component,
|
|
3017
|
+
args: [{ selector: 'ui-switch', imports: [MatSlideToggle], changeDetection: ChangeDetectionStrategy.OnPush, providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => SwitchComponent), multi: true }], template: `
|
|
3018
|
+
<mat-slide-toggle
|
|
3019
|
+
#ref
|
|
3020
|
+
hideIcon
|
|
3021
|
+
disableRipple
|
|
3022
|
+
[class]="classes()"
|
|
3023
|
+
[checked]="checked()"
|
|
3024
|
+
[disabled]="disabled()"
|
|
3025
|
+
[required]="required()"
|
|
3026
|
+
[attr.aria-label]="ariaLabel()"
|
|
3027
|
+
[attr.aria-labelledby]="ariaLabelledby()"
|
|
3028
|
+
(change)="handleChange($event)">
|
|
3029
|
+
<ng-content />
|
|
3030
|
+
</mat-slide-toggle>
|
|
3031
|
+
`, styles: [":host{display:inline-flex}:host ::ng-deep .mat-mdc-slide-toggle{--mdc-switch-track-width: 2rem;--mdc-switch-track-height: 1.15rem;--mdc-switch-track-shape: 9999px;--mdc-switch-handle-shape: 9999px;--mdc-switch-handle-width: .875rem;--mdc-switch-handle-height: .875rem;--mdc-switch-state-layer-size: 0;--mdc-switch-selected-track-color: hsl(var(--primary));--mdc-switch-selected-focus-track-color: hsl(var(--primary));--mdc-switch-selected-hover-track-color: hsl(var(--primary));--mdc-switch-selected-pressed-track-color: hsl(var(--primary));--mdc-switch-unselected-track-color: hsl(var(--input));--mdc-switch-unselected-focus-track-color: hsl(var(--input));--mdc-switch-unselected-hover-track-color: hsl(var(--input));--mdc-switch-unselected-pressed-track-color: hsl(var(--input));--mdc-switch-selected-handle-color: hsl(var(--primary-foreground));--mdc-switch-selected-focus-handle-color: hsl(var(--primary-foreground));--mdc-switch-selected-hover-handle-color: hsl(var(--primary-foreground));--mdc-switch-selected-pressed-handle-color: hsl(var(--primary-foreground));--mdc-switch-unselected-handle-color: hsl(var(--background));--mdc-switch-unselected-focus-handle-color: hsl(var(--background));--mdc-switch-unselected-hover-handle-color: hsl(var(--background));--mdc-switch-unselected-pressed-handle-color: hsl(var(--background));--mdc-switch-selected-icon-color: transparent;--mdc-switch-unselected-icon-color: transparent}:host ::ng-deep .mat-mdc-slide-toggle .mdc-switch__ripple,:host ::ng-deep .mat-mdc-slide-toggle .mat-mdc-slide-toggle-ripple,:host ::ng-deep .mat-mdc-slide-toggle .mat-mdc-focus-indicator{display:none}:host ::ng-deep .mat-mdc-slide-toggle .mdc-switch__icons{display:none}:host ::ng-deep .mat-mdc-slide-toggle .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-slide-toggle .mdc-label{padding:0;cursor:pointer}\n"] }]
|
|
3032
|
+
}], propDecorators: { required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-label", required: false }] }], ariaLabelledby: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-labelledby", required: false }] }], class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], checkedChange: [{ type: i0.Output, args: ["checkedChange"] }], ref: [{ type: i0.ViewChild, args: ['ref', { isSignal: true }] }] } });
|
|
3033
|
+
|
|
3034
|
+
class TableComponent {
|
|
3035
|
+
class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
3036
|
+
classes = computed(() => cn('w-full caption-bottom text-sm', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
3037
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: TableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3038
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.9", type: TableComponent, isStandalone: true, selector: "ui-table", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "relative w-full overflow-auto block" }, ngImport: i0, template: `
|
|
3039
|
+
<table [class]="classes()">
|
|
3040
|
+
<ng-content />
|
|
3041
|
+
</table>
|
|
3042
|
+
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3043
|
+
}
|
|
3044
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: TableComponent, decorators: [{
|
|
3045
|
+
type: Component,
|
|
3046
|
+
args: [{
|
|
3047
|
+
selector: 'ui-table',
|
|
3048
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
3049
|
+
host: { class: 'relative w-full overflow-auto block' },
|
|
3050
|
+
template: `
|
|
3051
|
+
<table [class]="classes()">
|
|
3052
|
+
<ng-content />
|
|
3053
|
+
</table>
|
|
3054
|
+
`,
|
|
3055
|
+
}]
|
|
3056
|
+
}], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
3057
|
+
class TableHeaderComponent {
|
|
3058
|
+
class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
3059
|
+
classes = computed(() => cn('[&_tr]:border-b', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
3060
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: TableHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3061
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.9", type: TableHeaderComponent, isStandalone: true, selector: "thead[ui-table-header]", 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 });
|
|
3062
|
+
}
|
|
3063
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: TableHeaderComponent, decorators: [{
|
|
3064
|
+
type: Component,
|
|
3065
|
+
args: [{
|
|
3066
|
+
selector: 'thead[ui-table-header]',
|
|
3067
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
3068
|
+
host: { '[class]': 'classes()' },
|
|
3069
|
+
template: `<ng-content />`,
|
|
3070
|
+
}]
|
|
3071
|
+
}], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
3072
|
+
class TableBodyComponent {
|
|
3073
|
+
class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
3074
|
+
classes = computed(() => cn('[&_tr:last-child]:border-0', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
3075
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: TableBodyComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3076
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.9", type: TableBodyComponent, isStandalone: true, selector: "tbody[ui-table-body]", 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 });
|
|
3077
|
+
}
|
|
3078
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: TableBodyComponent, decorators: [{
|
|
3079
|
+
type: Component,
|
|
3080
|
+
args: [{
|
|
3081
|
+
selector: 'tbody[ui-table-body]',
|
|
3082
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
3083
|
+
host: { '[class]': 'classes()' },
|
|
3084
|
+
template: `<ng-content />`,
|
|
3085
|
+
}]
|
|
3086
|
+
}], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
3087
|
+
class TableFooterComponent {
|
|
3088
|
+
class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
3089
|
+
classes = computed(() => cn('border-t bg-muted/50 font-medium [&>tr]:last:border-b-0', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
3090
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: TableFooterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3091
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.9", type: TableFooterComponent, isStandalone: true, selector: "tfoot[ui-table-footer]", 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 });
|
|
3092
|
+
}
|
|
3093
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: TableFooterComponent, decorators: [{
|
|
3094
|
+
type: Component,
|
|
3095
|
+
args: [{
|
|
3096
|
+
selector: 'tfoot[ui-table-footer]',
|
|
3097
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
3098
|
+
host: { '[class]': 'classes()' },
|
|
3099
|
+
template: `<ng-content />`,
|
|
3100
|
+
}]
|
|
3101
|
+
}], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
3102
|
+
class TableRowComponent {
|
|
3103
|
+
class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
3104
|
+
classes = computed(() => cn('border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
3105
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: TableRowComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3106
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.9", type: TableRowComponent, isStandalone: true, selector: "tr[ui-table-row]", 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 });
|
|
3107
|
+
}
|
|
3108
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: TableRowComponent, decorators: [{
|
|
3109
|
+
type: Component,
|
|
3110
|
+
args: [{
|
|
3111
|
+
selector: 'tr[ui-table-row]',
|
|
3112
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
3113
|
+
host: { '[class]': 'classes()' },
|
|
3114
|
+
template: `<ng-content />`,
|
|
3115
|
+
}]
|
|
3116
|
+
}], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
3117
|
+
class TableHeadComponent {
|
|
3118
|
+
class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
3119
|
+
classes = computed(() => cn('h-10 px-2 text-left align-middle font-medium text-muted-foreground', '[&:has([role=checkbox])]:pr-0', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
3120
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: TableHeadComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3121
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.9", type: TableHeadComponent, isStandalone: true, selector: "th[ui-table-head]", 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 });
|
|
3122
|
+
}
|
|
3123
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: TableHeadComponent, decorators: [{
|
|
3124
|
+
type: Component,
|
|
3125
|
+
args: [{
|
|
3126
|
+
selector: 'th[ui-table-head]',
|
|
3127
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
3128
|
+
host: { '[class]': 'classes()' },
|
|
3129
|
+
template: `<ng-content />`,
|
|
3130
|
+
}]
|
|
3131
|
+
}], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
3132
|
+
class TableCellComponent {
|
|
3133
|
+
class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
3134
|
+
classes = computed(() => cn('p-2 align-middle [&:has([role=checkbox])]:pr-0', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
3135
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: TableCellComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3136
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.9", type: TableCellComponent, isStandalone: true, selector: "td[ui-table-cell]", 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 });
|
|
3137
|
+
}
|
|
3138
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: TableCellComponent, decorators: [{
|
|
3139
|
+
type: Component,
|
|
3140
|
+
args: [{
|
|
3141
|
+
selector: 'td[ui-table-cell]',
|
|
3142
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
3143
|
+
host: { '[class]': 'classes()' },
|
|
3144
|
+
template: `<ng-content />`,
|
|
3145
|
+
}]
|
|
3146
|
+
}], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
3147
|
+
class TableCaptionComponent {
|
|
3148
|
+
class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
3149
|
+
classes = computed(() => cn('mt-4 text-sm text-muted-foreground', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
3150
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: TableCaptionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3151
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.9", type: TableCaptionComponent, isStandalone: true, selector: "caption[ui-table-caption]", 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 });
|
|
3152
|
+
}
|
|
3153
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: TableCaptionComponent, decorators: [{
|
|
3154
|
+
type: Component,
|
|
3155
|
+
args: [{
|
|
3156
|
+
selector: 'caption[ui-table-caption]',
|
|
3157
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
3158
|
+
host: { '[class]': 'classes()' },
|
|
3159
|
+
template: `<ng-content />`,
|
|
3160
|
+
}]
|
|
3161
|
+
}], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
3162
|
+
|
|
3163
|
+
/**
|
|
3164
|
+
* Shared state for a tabs group. Children read the active value and register
|
|
3165
|
+
* themselves so the group can drive roving-tabindex keyboard navigation.
|
|
3166
|
+
*/
|
|
3167
|
+
class TabsContextBase {
|
|
3168
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: TabsContextBase, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
3169
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.9", type: TabsContextBase, isStandalone: true, ngImport: i0 });
|
|
3170
|
+
}
|
|
3171
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: TabsContextBase, decorators: [{
|
|
3172
|
+
type: Directive
|
|
3173
|
+
}] });
|
|
3174
|
+
class TabsComponent extends TabsContextBase {
|
|
3175
|
+
value = model(null, ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
3176
|
+
orientation = input('horizontal', ...(ngDevMode ? [{ debugName: "orientation" }] : /* istanbul ignore next */ []));
|
|
3177
|
+
class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
3178
|
+
triggers = new Map();
|
|
3179
|
+
classes = computed(() => cn(this.orientation() === 'vertical' ? 'flex gap-4' : 'block', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
3180
|
+
register(el, value) {
|
|
3181
|
+
this.triggers.set(el, value);
|
|
3182
|
+
if (this.value() == null)
|
|
3183
|
+
this.value.set(value);
|
|
3184
|
+
}
|
|
3185
|
+
unregister(el) {
|
|
3186
|
+
this.triggers.delete(el);
|
|
3187
|
+
}
|
|
3188
|
+
activate(value, focus = false) {
|
|
3189
|
+
this.value.set(value);
|
|
3190
|
+
if (focus) {
|
|
3191
|
+
for (const [el, v] of this.triggers)
|
|
3192
|
+
if (v === value)
|
|
3193
|
+
el.focus();
|
|
3194
|
+
}
|
|
3195
|
+
}
|
|
3196
|
+
focusNext(from, delta) {
|
|
3197
|
+
const list = [...this.triggers.keys()];
|
|
3198
|
+
const idx = list.indexOf(from);
|
|
3199
|
+
if (idx < 0 || list.length === 0)
|
|
3200
|
+
return;
|
|
3201
|
+
const next = list[(idx + delta + list.length) % list.length];
|
|
3202
|
+
const val = this.triggers.get(next);
|
|
3203
|
+
if (val)
|
|
3204
|
+
this.activate(val, true);
|
|
3205
|
+
}
|
|
3206
|
+
focusFirst() {
|
|
3207
|
+
const first = this.triggers.keys().next().value;
|
|
3208
|
+
const val = first ? this.triggers.get(first) : null;
|
|
3209
|
+
if (val)
|
|
3210
|
+
this.activate(val, true);
|
|
3211
|
+
}
|
|
3212
|
+
focusLast() {
|
|
3213
|
+
const list = [...this.triggers.keys()];
|
|
3214
|
+
const last = list[list.length - 1];
|
|
3215
|
+
const val = last ? this.triggers.get(last) : null;
|
|
3216
|
+
if (val)
|
|
3217
|
+
this.activate(val, true);
|
|
3218
|
+
}
|
|
3219
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: TabsComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
3220
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.9", type: TabsComponent, isStandalone: true, selector: "ui-tabs", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange" }, host: { properties: { "class": "classes()", "attr.data-orientation": "orientation()" } }, providers: [{ provide: TabsContextBase, useExisting: forwardRef(() => TabsComponent) }], usesInheritance: true, ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3221
|
+
}
|
|
3222
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: TabsComponent, decorators: [{
|
|
3223
|
+
type: Component,
|
|
3224
|
+
args: [{
|
|
3225
|
+
selector: 'ui-tabs',
|
|
3226
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
3227
|
+
providers: [{ provide: TabsContextBase, useExisting: forwardRef(() => TabsComponent) }],
|
|
3228
|
+
host: {
|
|
3229
|
+
'[class]': 'classes()',
|
|
3230
|
+
'[attr.data-orientation]': 'orientation()',
|
|
3231
|
+
},
|
|
3232
|
+
template: `<ng-content />`,
|
|
3233
|
+
}]
|
|
3234
|
+
}], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], orientation: [{ type: i0.Input, args: [{ isSignal: true, alias: "orientation", required: false }] }], class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
3235
|
+
class TabsListComponent {
|
|
3236
|
+
ctx = inject(TabsComponent);
|
|
3237
|
+
class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
3238
|
+
classes = computed(() => cn('inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
3239
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: TabsListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3240
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.9", type: TabsListComponent, isStandalone: true, selector: "ui-tabs-list", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()", "attr.role": "\"tablist\"", "attr.aria-orientation": "ctx.orientation()" } }, ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3241
|
+
}
|
|
3242
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: TabsListComponent, decorators: [{
|
|
3243
|
+
type: Component,
|
|
3244
|
+
args: [{
|
|
3245
|
+
selector: 'ui-tabs-list',
|
|
3246
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
3247
|
+
host: {
|
|
3248
|
+
'[class]': 'classes()',
|
|
3249
|
+
'[attr.role]': '"tablist"',
|
|
3250
|
+
'[attr.aria-orientation]': 'ctx.orientation()',
|
|
3251
|
+
},
|
|
3252
|
+
template: `<ng-content />`,
|
|
3253
|
+
}]
|
|
3254
|
+
}], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
3255
|
+
class TabsTriggerComponent {
|
|
3256
|
+
ctx = inject(TabsComponent);
|
|
3257
|
+
el = inject(ElementRef);
|
|
3258
|
+
value = input.required(...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
3259
|
+
disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
3260
|
+
class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
3261
|
+
selected = computed(() => this.ctx.value() === this.value(), ...(ngDevMode ? [{ debugName: "selected" }] : /* istanbul ignore next */ []));
|
|
3262
|
+
classes = computed(() => cn('inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium', 'ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2', 'disabled:pointer-events-none disabled:opacity-50', 'data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
3263
|
+
ngOnInit() {
|
|
3264
|
+
this.ctx.register(this.el.nativeElement, this.value());
|
|
3265
|
+
}
|
|
3266
|
+
ngOnDestroy() {
|
|
3267
|
+
this.ctx.unregister(this.el.nativeElement);
|
|
3268
|
+
}
|
|
3269
|
+
onClick() {
|
|
3270
|
+
if (this.disabled())
|
|
3271
|
+
return;
|
|
3272
|
+
this.ctx.activate(this.value());
|
|
3273
|
+
}
|
|
3274
|
+
onArrow(e, delta, axis) {
|
|
3275
|
+
if (this.ctx.orientation() !== axis)
|
|
3276
|
+
return;
|
|
3277
|
+
e.preventDefault();
|
|
3278
|
+
this.ctx.focusNext(this.el.nativeElement, delta);
|
|
3279
|
+
}
|
|
3280
|
+
onHome(e) {
|
|
3281
|
+
e.preventDefault();
|
|
3282
|
+
this.ctx.focusFirst();
|
|
3283
|
+
}
|
|
3284
|
+
onEnd(e) {
|
|
3285
|
+
e.preventDefault();
|
|
3286
|
+
this.ctx.focusLast();
|
|
3287
|
+
}
|
|
3288
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: TabsTriggerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3289
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.9", type: TabsTriggerComponent, isStandalone: true, selector: "button[ui-tabs-trigger]", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "type": "button" }, listeners: { "click": "onClick()", "keydown.arrowRight": "onArrow($any($event), 1, \"horizontal\")", "keydown.arrowLeft": "onArrow($any($event), -1, \"horizontal\")", "keydown.arrowDown": "onArrow($any($event), 1, \"vertical\")", "keydown.arrowUp": "onArrow($any($event), -1, \"vertical\")", "keydown.home": "onHome($any($event))", "keydown.end": "onEnd($any($event))" }, properties: { "class": "classes()", "attr.role": "\"tab\"", "attr.aria-selected": "selected()", "attr.tabindex": "selected() ? 0 : -1", "attr.data-state": "selected() ? \"active\" : \"inactive\"", "disabled": "disabled() || null" } }, ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3290
|
+
}
|
|
3291
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: TabsTriggerComponent, decorators: [{
|
|
3292
|
+
type: Component,
|
|
3293
|
+
args: [{
|
|
3294
|
+
selector: 'button[ui-tabs-trigger]',
|
|
3295
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
3296
|
+
host: {
|
|
3297
|
+
'[class]': 'classes()',
|
|
3298
|
+
type: 'button',
|
|
3299
|
+
'[attr.role]': '"tab"',
|
|
3300
|
+
'[attr.aria-selected]': 'selected()',
|
|
3301
|
+
'[attr.tabindex]': 'selected() ? 0 : -1',
|
|
3302
|
+
'[attr.data-state]': 'selected() ? "active" : "inactive"',
|
|
3303
|
+
'[disabled]': 'disabled() || null',
|
|
3304
|
+
'(click)': 'onClick()',
|
|
3305
|
+
'(keydown.arrowRight)': 'onArrow($any($event), 1, "horizontal")',
|
|
3306
|
+
'(keydown.arrowLeft)': 'onArrow($any($event), -1, "horizontal")',
|
|
3307
|
+
'(keydown.arrowDown)': 'onArrow($any($event), 1, "vertical")',
|
|
3308
|
+
'(keydown.arrowUp)': 'onArrow($any($event), -1, "vertical")',
|
|
3309
|
+
'(keydown.home)': 'onHome($any($event))',
|
|
3310
|
+
'(keydown.end)': 'onEnd($any($event))',
|
|
3311
|
+
},
|
|
3312
|
+
template: `<ng-content />`,
|
|
3313
|
+
}]
|
|
3314
|
+
}], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: true }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
3315
|
+
class TabsContentComponent {
|
|
3316
|
+
ctx = inject(TabsComponent);
|
|
3317
|
+
value = input.required(...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
3318
|
+
class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
3319
|
+
active = computed(() => this.ctx.value() === this.value(), ...(ngDevMode ? [{ debugName: "active" }] : /* istanbul ignore next */ []));
|
|
3320
|
+
classes = computed(() => cn('mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
3321
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: TabsContentComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3322
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: TabsContentComponent, isStandalone: true, selector: "ui-tabs-content", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "tabindex": "0" }, properties: { "class": "classes()", "attr.role": "\"tabpanel\"", "attr.data-state": "active() ? \"active\" : \"inactive\"", "hidden": "!active()" } }, ngImport: i0, template: `@if (active()) {
|
|
3323
|
+
<ng-content />
|
|
3324
|
+
}`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3325
|
+
}
|
|
3326
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: TabsContentComponent, decorators: [{
|
|
3327
|
+
type: Component,
|
|
3328
|
+
args: [{
|
|
3329
|
+
selector: 'ui-tabs-content',
|
|
3330
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
3331
|
+
host: {
|
|
3332
|
+
'[class]': 'classes()',
|
|
3333
|
+
'[attr.role]': '"tabpanel"',
|
|
3334
|
+
'[attr.data-state]': 'active() ? "active" : "inactive"',
|
|
3335
|
+
'[hidden]': '!active()',
|
|
3336
|
+
tabindex: '0',
|
|
3337
|
+
},
|
|
3338
|
+
template: `@if (active()) {
|
|
3339
|
+
<ng-content />
|
|
3340
|
+
}`,
|
|
3341
|
+
}]
|
|
3342
|
+
}], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: true }] }], class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
3343
|
+
|
|
3344
|
+
class TextareaComponent {
|
|
3345
|
+
el = inject(ElementRef);
|
|
3346
|
+
class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
3347
|
+
classes = computed(() => cn([
|
|
3348
|
+
'flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2',
|
|
3349
|
+
'text-sm shadow-sm transition-colors',
|
|
3350
|
+
'placeholder:text-muted-foreground',
|
|
3351
|
+
'focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring',
|
|
3352
|
+
'disabled:cursor-not-allowed disabled:opacity-50',
|
|
3353
|
+
'aria-[invalid=true]:border-destructive aria-[invalid=true]:focus-visible:ring-destructive',
|
|
3354
|
+
].join(' '), this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
3355
|
+
focus() {
|
|
3356
|
+
this.el.nativeElement.focus();
|
|
3357
|
+
}
|
|
3358
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: TextareaComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3359
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.9", type: TextareaComponent, isStandalone: true, selector: "textarea[ui-textarea]", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()" } }, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3360
|
+
}
|
|
3361
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: TextareaComponent, decorators: [{
|
|
3362
|
+
type: Component,
|
|
3363
|
+
args: [{
|
|
3364
|
+
selector: 'textarea[ui-textarea]',
|
|
3365
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
3366
|
+
host: { '[class]': 'classes()' },
|
|
3367
|
+
template: '',
|
|
3368
|
+
}]
|
|
3369
|
+
}], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
3370
|
+
|
|
3371
|
+
/**
|
|
3372
|
+
* Thin, opinionated wrapper over MatSnackBar that applies shadcn styling
|
|
3373
|
+
* via `panelClass: ui-toast-panel` and variant data attributes.
|
|
3374
|
+
*/
|
|
3375
|
+
class ToastService {
|
|
3376
|
+
snack = inject(MatSnackBar);
|
|
3377
|
+
show(options) {
|
|
3378
|
+
const message = options.title
|
|
3379
|
+
? options.description
|
|
3380
|
+
? `${options.title}\n${options.description}`
|
|
3381
|
+
: options.title
|
|
3382
|
+
: (options.description ?? '');
|
|
3383
|
+
const variant = options.variant ?? 'default';
|
|
3384
|
+
return this.snack.open(message, options.action ?? '', {
|
|
3385
|
+
duration: options.durationMs ?? 5000,
|
|
3386
|
+
horizontalPosition: options.horizontalPosition ?? 'end',
|
|
3387
|
+
verticalPosition: options.verticalPosition ?? 'bottom',
|
|
3388
|
+
panelClass: ['ui-toast-panel', `ui-toast-${variant}`],
|
|
3389
|
+
});
|
|
3390
|
+
}
|
|
3391
|
+
success(opts) {
|
|
3392
|
+
return this.show({ ...opts, variant: 'success' });
|
|
3393
|
+
}
|
|
3394
|
+
error(opts) {
|
|
3395
|
+
return this.show({ ...opts, variant: 'destructive' });
|
|
3396
|
+
}
|
|
3397
|
+
dismiss() {
|
|
3398
|
+
this.snack.dismiss();
|
|
3399
|
+
}
|
|
3400
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: ToastService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
3401
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: ToastService, providedIn: 'root' });
|
|
3402
|
+
}
|
|
3403
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: ToastService, decorators: [{
|
|
3404
|
+
type: Injectable,
|
|
3405
|
+
args: [{ providedIn: 'root' }]
|
|
3406
|
+
}] });
|
|
3407
|
+
|
|
3408
|
+
/**
|
|
3409
|
+
* Shadcn-styled tooltip directive. Thin wrapper around `matTooltip` that
|
|
3410
|
+
* forces the shadcn panel class and sensible defaults.
|
|
3411
|
+
*
|
|
3412
|
+
* @example
|
|
3413
|
+
* <button ui-button [uiTooltip]="'Save changes'" uiTooltipPosition="above">Save</button>
|
|
3414
|
+
*/
|
|
3415
|
+
class TooltipDirective {
|
|
3416
|
+
tooltip = inject(MatTooltip, { host: true });
|
|
3417
|
+
uiTooltip = input('', ...(ngDevMode ? [{ debugName: "uiTooltip" }] : /* istanbul ignore next */ []));
|
|
3418
|
+
constructor() {
|
|
3419
|
+
this.tooltip.tooltipClass = 'ui-tooltip-panel';
|
|
3420
|
+
effect(() => {
|
|
3421
|
+
this.tooltip.message = this.uiTooltip();
|
|
3422
|
+
});
|
|
3423
|
+
}
|
|
3424
|
+
show() {
|
|
3425
|
+
this.tooltip.show();
|
|
3426
|
+
}
|
|
3427
|
+
hide() {
|
|
3428
|
+
this.tooltip.hide();
|
|
3429
|
+
}
|
|
3430
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: TooltipDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
3431
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.9", type: TooltipDirective, isStandalone: true, selector: "[uiTooltip]", inputs: { uiTooltip: { classPropertyName: "uiTooltip", publicName: "uiTooltip", isSignal: true, isRequired: false, transformFunction: null } }, exportAs: ["uiTooltip"], hostDirectives: [{ directive: i1$1.MatTooltip, inputs: ["matTooltipPosition", "uiTooltipPosition", "matTooltipDisabled", "uiTooltipDisabled", "matTooltipShowDelay", "uiTooltipShowDelay", "matTooltipHideDelay", "uiTooltipHideDelay", "matTooltipTouchGestures", "uiTooltipTouchGestures"] }], ngImport: i0 });
|
|
3432
|
+
}
|
|
3433
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: TooltipDirective, decorators: [{
|
|
3434
|
+
type: Directive,
|
|
3435
|
+
args: [{
|
|
3436
|
+
selector: '[uiTooltip]',
|
|
3437
|
+
hostDirectives: [
|
|
3438
|
+
{
|
|
3439
|
+
directive: MatTooltip,
|
|
3440
|
+
inputs: [
|
|
3441
|
+
'matTooltipPosition: uiTooltipPosition',
|
|
3442
|
+
'matTooltipDisabled: uiTooltipDisabled',
|
|
3443
|
+
'matTooltipShowDelay: uiTooltipShowDelay',
|
|
3444
|
+
'matTooltipHideDelay: uiTooltipHideDelay',
|
|
3445
|
+
'matTooltipTouchGestures: uiTooltipTouchGestures',
|
|
3446
|
+
],
|
|
3447
|
+
},
|
|
3448
|
+
],
|
|
3449
|
+
exportAs: 'uiTooltip',
|
|
3450
|
+
}]
|
|
3451
|
+
}], ctorParameters: () => [], propDecorators: { uiTooltip: [{ type: i0.Input, args: [{ isSignal: true, alias: "uiTooltip", required: false }] }] } });
|
|
3452
|
+
|
|
3453
|
+
/*
|
|
3454
|
+
* Public API Surface of @ojiepermana/angular/component
|
|
3455
|
+
*/
|
|
3456
|
+
// Core
|
|
3457
|
+
|
|
3458
|
+
/**
|
|
3459
|
+
* Generated bundle index. Do not edit.
|
|
3460
|
+
*/
|
|
3461
|
+
|
|
3462
|
+
export { AccordionComponent, AccordionContentComponent, AccordionContextBase, AccordionItemComponent, AccordionTriggerComponent, AlertComponent, AlertDescriptionComponent, AlertTitleComponent, AvatarComponent, AvatarFallbackComponent, AvatarImageComponent, BadgeComponent, BreadcrumbComponent, BreadcrumbEllipsisComponent, BreadcrumbItemComponent, BreadcrumbLinkComponent, BreadcrumbListComponent, BreadcrumbPageComponent, BreadcrumbSeparatorComponent, ButtonComponent, CalendarComponent, CardComponent, CardContentComponent, CardDescriptionComponent, CardFooterComponent, CardHeaderComponent, CardTitleComponent, CheckboxComponent, ComboboxComponent, CommandComponent, CommandContextBase, CommandEmptyComponent, CommandGroupComponent, CommandInputComponent, CommandItemComponent, CommandListComponent, CommandSeparatorComponent, CommandShortcutComponent, ContextMenuTriggerDirective, DatePickerComponent, DialogComponent, DialogContentComponent, DialogDescriptionComponent, DialogFooterComponent, DialogHeaderComponent, DialogTitleComponent, FormControlDirective, FormDescriptionComponent, FormFieldComponent, FormFieldContext, FormLabelComponent, FormMessageComponent, InputComponent, LabelComponent, MenuContentDirective, MenuItemComponent, MenuLabelComponent, MenuSeparatorComponent, MenuShortcutComponent, MenuSurfaceComponent, MenuTriggerDirective, OptionComponent, PaginationComponent, PopoverContentDirective, PopoverTriggerDirective, ProgressComponent, RadioComponent, RadioGroupComponent, ScrollAreaComponent, SelectComponent, SeparatorComponent, SheetComponent, SheetContentComponent, SheetDescriptionComponent, SheetFooterComponent, SheetHeaderComponent, SheetTitleComponent, SkeletonComponent, SliderComponent, SwitchComponent, TableBodyComponent, TableCaptionComponent, TableCellComponent, TableComponent, TableFooterComponent, TableHeadComponent, TableHeaderComponent, TableRowComponent, TabsComponent, TabsContentComponent, TabsContextBase, TabsListComponent, TabsTriggerComponent, TextareaComponent, ToastService, TooltipDirective, alertVariants, badgeVariants, buttonVariants, cn };
|
|
3463
|
+
//# sourceMappingURL=ojiepermana-angular-component.mjs.map
|