@ojiepermana/angular-component 22.0.36 → 22.0.41
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 +3 -3
- package/alert-dialog/README.md +14 -14
- package/checkbox/README.md +16 -15
- package/command/README.md +4 -4
- package/dialog/README.md +12 -12
- package/drawer/README.md +1 -1
- package/fesm2022/ojiepermana-angular-component-accordion.mjs +16 -4
- package/fesm2022/ojiepermana-angular-component-alert-dialog.mjs +11 -3
- package/fesm2022/ojiepermana-angular-component-alert.mjs +13 -3
- package/fesm2022/ojiepermana-angular-component-avatar.mjs +13 -3
- package/fesm2022/ojiepermana-angular-component-badge.mjs +16 -4
- package/fesm2022/ojiepermana-angular-component-button.mjs +13 -3
- package/fesm2022/ojiepermana-angular-component-calendar.mjs +2 -2
- package/fesm2022/ojiepermana-angular-component-card.mjs +13 -3
- package/fesm2022/ojiepermana-angular-component-dialog.mjs +18 -6
- package/fesm2022/ojiepermana-angular-component-dropdown-menu.mjs +13 -3
- package/fesm2022/ojiepermana-angular-component-input.mjs +16 -4
- package/fesm2022/ojiepermana-angular-component-item.mjs +14 -4
- package/fesm2022/ojiepermana-angular-component-kanban.mjs +1 -1
- package/fesm2022/ojiepermana-angular-component-popover.mjs +16 -4
- package/fesm2022/ojiepermana-angular-component-select.mjs +22 -5
- package/fesm2022/ojiepermana-angular-component-sheet.mjs +18 -6
- package/fesm2022/ojiepermana-angular-component-table.mjs +16 -4
- package/fesm2022/ojiepermana-angular-component-tabs.mjs +13 -3
- package/fesm2022/ojiepermana-angular-component-textarea.mjs +16 -4
- package/fesm2022/ojiepermana-angular-component-timeline.mjs +2 -2
- package/fesm2022/ojiepermana-angular-component-tooltip.mjs +44 -4
- package/fesm2022/ojiepermana-angular-component-utils.mjs +51 -1
- package/form/README.md +13 -13
- package/hover-card/README.md +1 -1
- package/package.json +1 -1
- package/radio/README.md +11 -11
- package/scroll-area/README.md +4 -2
- package/sheet/README.md +11 -11
- package/slider/README.md +2 -2
- package/switch/README.md +10 -10
- package/toast/README.md +59 -210
- package/tooltip/README.md +13 -8
- package/types/ojiepermana-angular-component-accordion.d.ts +5 -1
- package/types/ojiepermana-angular-component-alert-dialog.d.ts +3 -1
- package/types/ojiepermana-angular-component-alert.d.ts +5 -1
- package/types/ojiepermana-angular-component-avatar.d.ts +5 -1
- package/types/ojiepermana-angular-component-badge.d.ts +5 -1
- package/types/ojiepermana-angular-component-button.d.ts +5 -1
- package/types/ojiepermana-angular-component-card.d.ts +5 -1
- package/types/ojiepermana-angular-component-dialog.d.ts +5 -1
- package/types/ojiepermana-angular-component-dropdown-menu.d.ts +5 -1
- package/types/ojiepermana-angular-component-input.d.ts +5 -1
- package/types/ojiepermana-angular-component-item.d.ts +5 -1
- package/types/ojiepermana-angular-component-popover.d.ts +5 -1
- package/types/ojiepermana-angular-component-select.d.ts +11 -5
- package/types/ojiepermana-angular-component-sheet.d.ts +5 -1
- package/types/ojiepermana-angular-component-table.d.ts +5 -1
- package/types/ojiepermana-angular-component-tabs.d.ts +5 -1
- package/types/ojiepermana-angular-component-textarea.d.ts +5 -1
- package/types/ojiepermana-angular-component-tooltip.d.ts +13 -1
- package/types/ojiepermana-angular-component-utils.d.ts +34 -2
|
@@ -1,16 +1,24 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { input, computed, ChangeDetectionStrategy, Component, inject } from '@angular/core';
|
|
3
|
-
import { cn } from '@ojiepermana/angular-component/utils';
|
|
3
|
+
import { cn, radiusBaseValue, densityBaseValue } from '@ojiepermana/angular-component/utils';
|
|
4
4
|
|
|
5
5
|
class CardComponent {
|
|
6
6
|
size = input('default', /* @ts-ignore */
|
|
7
7
|
...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
8
8
|
class = input('', /* @ts-ignore */
|
|
9
9
|
...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
10
|
+
radius = input('inherit', /* @ts-ignore */
|
|
11
|
+
...(ngDevMode ? [{ debugName: "radius" }] : /* istanbul ignore next */ []));
|
|
12
|
+
density = input('inherit', /* @ts-ignore */
|
|
13
|
+
...(ngDevMode ? [{ debugName: "density" }] : /* istanbul ignore next */ []));
|
|
10
14
|
classes = computed(() => cn('block rounded-lg border border-border bg-card text-card-foreground shadow-sm', this.class()), /* @ts-ignore */
|
|
11
15
|
...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
16
|
+
radiusBase = computed(() => radiusBaseValue(this.radius()), /* @ts-ignore */
|
|
17
|
+
...(ngDevMode ? [{ debugName: "radiusBase" }] : /* istanbul ignore next */ []));
|
|
18
|
+
densityBase = computed(() => densityBaseValue(this.density()), /* @ts-ignore */
|
|
19
|
+
...(ngDevMode ? [{ debugName: "densityBase" }] : /* istanbul ignore next */ []));
|
|
12
20
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.3", ngImport: i0, type: CardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
13
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.3", type: CardComponent, isStandalone: true, selector: "Card", inputs: { 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-size": "size()" } }, ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
21
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.3", type: CardComponent, isStandalone: true, selector: "Card", inputs: { size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, radius: { classPropertyName: "radius", publicName: "radius", isSignal: true, isRequired: false, transformFunction: null }, density: { classPropertyName: "density", publicName: "density", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()", "attr.data-size": "size()", "style.--radius-base": "radiusBase()", "style.--spacing-base": "densityBase()" } }, ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
14
22
|
}
|
|
15
23
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.3", ngImport: i0, type: CardComponent, decorators: [{
|
|
16
24
|
type: Component,
|
|
@@ -20,10 +28,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.3", ngImpor
|
|
|
20
28
|
host: {
|
|
21
29
|
'[class]': 'classes()',
|
|
22
30
|
'[attr.data-size]': 'size()',
|
|
31
|
+
'[style.--radius-base]': 'radiusBase()',
|
|
32
|
+
'[style.--spacing-base]': 'densityBase()',
|
|
23
33
|
},
|
|
24
34
|
template: `<ng-content />`,
|
|
25
35
|
}]
|
|
26
|
-
}], propDecorators: { size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
36
|
+
}], propDecorators: { size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], radius: [{ type: i0.Input, args: [{ isSignal: true, alias: "radius", required: false }] }], density: [{ type: i0.Input, args: [{ isSignal: true, alias: "density", required: false }] }] } });
|
|
27
37
|
|
|
28
38
|
class CardHeaderComponent {
|
|
29
39
|
card = inject(CardComponent, { optional: true });
|
|
@@ -7,7 +7,7 @@ import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
|
7
7
|
import { DOCUMENT } from '@angular/common';
|
|
8
8
|
import { filter } from 'rxjs/operators';
|
|
9
9
|
import { ButtonComponent } from '@ojiepermana/angular-component/button';
|
|
10
|
-
import { cn } from '@ojiepermana/angular-component/utils';
|
|
10
|
+
import { cn, radiusBaseValue, densityBaseValue } from '@ojiepermana/angular-component/utils';
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
13
|
* Declarative modal dialog. Renders into the body via CDK overlay when
|
|
@@ -46,6 +46,10 @@ class DialogComponent {
|
|
|
46
46
|
describedBy = input(null, { ...(ngDevMode ? { debugName: "describedBy" } : /* istanbul ignore next */ {}), alias: 'aria-describedby' });
|
|
47
47
|
class = input('', /* @ts-ignore */
|
|
48
48
|
...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
49
|
+
radius = input('inherit', /* @ts-ignore */
|
|
50
|
+
...(ngDevMode ? [{ debugName: "radius" }] : /* istanbul ignore next */ []));
|
|
51
|
+
density = input('inherit', /* @ts-ignore */
|
|
52
|
+
...(ngDevMode ? [{ debugName: "density" }] : /* istanbul ignore next */ []));
|
|
49
53
|
openedChange = output();
|
|
50
54
|
tpl = viewChild.required('tpl');
|
|
51
55
|
overlayRef = null;
|
|
@@ -53,6 +57,10 @@ class DialogComponent {
|
|
|
53
57
|
previousFocus = null;
|
|
54
58
|
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()), /* @ts-ignore */
|
|
55
59
|
...(ngDevMode ? [{ debugName: "surfaceClasses" }] : /* istanbul ignore next */ []));
|
|
60
|
+
radiusBase = computed(() => radiusBaseValue(this.radius()), /* @ts-ignore */
|
|
61
|
+
...(ngDevMode ? [{ debugName: "radiusBase" }] : /* istanbul ignore next */ []));
|
|
62
|
+
densityBase = computed(() => densityBaseValue(this.density()), /* @ts-ignore */
|
|
63
|
+
...(ngDevMode ? [{ debugName: "densityBase" }] : /* istanbul ignore next */ []));
|
|
56
64
|
constructor() {
|
|
57
65
|
this.destroyRef.onDestroy(() => this.detach(false));
|
|
58
66
|
effect(() => {
|
|
@@ -109,7 +117,7 @@ class DialogComponent {
|
|
|
109
117
|
this.requestClose();
|
|
110
118
|
}
|
|
111
119
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.3", ngImport: i0, type: DialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
112
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.3", type: DialogComponent, isStandalone: true, selector: "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 }, showCloseButton: { classPropertyName: "showCloseButton", publicName: "showCloseButton", isSignal: true, isRequired: false, transformFunction: null }, closeButtonLabel: { classPropertyName: "closeButtonLabel", publicName: "closeButtonLabel", 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: `
|
|
120
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.3", type: DialogComponent, isStandalone: true, selector: "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 }, showCloseButton: { classPropertyName: "showCloseButton", publicName: "showCloseButton", isSignal: true, isRequired: false, transformFunction: null }, closeButtonLabel: { classPropertyName: "closeButtonLabel", publicName: "closeButtonLabel", 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 }, radius: { classPropertyName: "radius", publicName: "radius", isSignal: true, isRequired: false, transformFunction: null }, density: { classPropertyName: "density", publicName: "density", 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: `
|
|
113
121
|
<ng-template #tpl>
|
|
114
122
|
<div
|
|
115
123
|
class="dialog-surface"
|
|
@@ -117,7 +125,9 @@ class DialogComponent {
|
|
|
117
125
|
aria-modal="true"
|
|
118
126
|
[attr.aria-labelledby]="labelledBy()"
|
|
119
127
|
[attr.aria-describedby]="describedBy()"
|
|
120
|
-
[class]="surfaceClasses()"
|
|
128
|
+
[class]="surfaceClasses()"
|
|
129
|
+
[style.--radius-base]="radiusBase()"
|
|
130
|
+
[style.--spacing-base]="densityBase()">
|
|
121
131
|
@if (showCloseButton()) {
|
|
122
132
|
<button
|
|
123
133
|
type="button"
|
|
@@ -134,7 +144,7 @@ class DialogComponent {
|
|
|
134
144
|
<ng-content />
|
|
135
145
|
</div>
|
|
136
146
|
</ng-template>
|
|
137
|
-
`, isInline: true, dependencies: [{ kind: "component", type: ButtonComponent, selector: "button[Button], a[Button]", inputs: ["variant", "size", "class"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
147
|
+
`, isInline: true, dependencies: [{ kind: "component", type: ButtonComponent, selector: "button[Button], a[Button]", inputs: ["variant", "size", "class", "radius", "density"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
138
148
|
}
|
|
139
149
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.3", ngImport: i0, type: DialogComponent, decorators: [{
|
|
140
150
|
type: Component,
|
|
@@ -150,7 +160,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.3", ngImpor
|
|
|
150
160
|
aria-modal="true"
|
|
151
161
|
[attr.aria-labelledby]="labelledBy()"
|
|
152
162
|
[attr.aria-describedby]="describedBy()"
|
|
153
|
-
[class]="surfaceClasses()"
|
|
163
|
+
[class]="surfaceClasses()"
|
|
164
|
+
[style.--radius-base]="radiusBase()"
|
|
165
|
+
[style.--spacing-base]="densityBase()">
|
|
154
166
|
@if (showCloseButton()) {
|
|
155
167
|
<button
|
|
156
168
|
type="button"
|
|
@@ -169,7 +181,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.3", ngImpor
|
|
|
169
181
|
</ng-template>
|
|
170
182
|
`,
|
|
171
183
|
}]
|
|
172
|
-
}], 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 }] }], showCloseButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "showCloseButton", required: false }] }], closeButtonLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeButtonLabel", 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 }] }] } });
|
|
184
|
+
}], 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 }] }], showCloseButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "showCloseButton", required: false }] }], closeButtonLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeButtonLabel", 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 }] }], radius: [{ type: i0.Input, args: [{ isSignal: true, alias: "radius", required: false }] }], density: [{ type: i0.Input, args: [{ isSignal: true, alias: "density", required: false }] }], openedChange: [{ type: i0.Output, args: ["openedChange"] }], tpl: [{ type: i0.ViewChild, args: ['tpl', { isSignal: true }] }] } });
|
|
173
185
|
|
|
174
186
|
class DialogCloseDirective {
|
|
175
187
|
dialog = inject(DialogComponent);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { inject, ElementRef, input, output, Directive, computed, ChangeDetectionStrategy, Component, model, forwardRef, ContentChildren, TemplateRef, ViewContainerRef, DestroyRef, signal } from '@angular/core';
|
|
3
|
-
import { cn, connectedPositionFor, oppositeSide } from '@ojiepermana/angular-component/utils';
|
|
3
|
+
import { cn, radiusBaseValue, densityBaseValue, connectedPositionFor, oppositeSide } from '@ojiepermana/angular-component/utils';
|
|
4
4
|
import { FocusKeyManager } from '@angular/cdk/a11y';
|
|
5
5
|
import { Overlay } from '@angular/cdk/overlay';
|
|
6
6
|
import { TemplatePortal } from '@angular/cdk/portal';
|
|
@@ -314,9 +314,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.3", ngImpor
|
|
|
314
314
|
class MenuSurfaceComponent {
|
|
315
315
|
class = input('', /* @ts-ignore */
|
|
316
316
|
...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
317
|
+
radius = input('inherit', /* @ts-ignore */
|
|
318
|
+
...(ngDevMode ? [{ debugName: "radius" }] : /* istanbul ignore next */ []));
|
|
319
|
+
density = input('inherit', /* @ts-ignore */
|
|
320
|
+
...(ngDevMode ? [{ debugName: "density" }] : /* istanbul ignore next */ []));
|
|
317
321
|
items;
|
|
318
322
|
closeRequested = output();
|
|
319
323
|
keyManager = null;
|
|
324
|
+
radiusBase = computed(() => radiusBaseValue(this.radius()), /* @ts-ignore */
|
|
325
|
+
...(ngDevMode ? [{ debugName: "radiusBase" }] : /* istanbul ignore next */ []));
|
|
326
|
+
densityBase = computed(() => densityBaseValue(this.density()), /* @ts-ignore */
|
|
327
|
+
...(ngDevMode ? [{ debugName: "densityBase" }] : /* istanbul ignore next */ []));
|
|
320
328
|
classes = computed(() => cn('z-50 min-w-[8rem] overflow-hidden rounded-md border border-border bg-popover p-1 text-popover-foreground shadow-md outline-none', this.class()), /* @ts-ignore */
|
|
321
329
|
...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
322
330
|
ngAfterContentInit() {
|
|
@@ -346,7 +354,7 @@ class MenuSurfaceComponent {
|
|
|
346
354
|
this.closeRequested.emit();
|
|
347
355
|
}
|
|
348
356
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.3", ngImport: i0, type: MenuSurfaceComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
349
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.3", type: MenuSurfaceComponent, isStandalone: true, selector: "MenuSurface", 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: MenuFocusableItem, descendants: true }], ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
357
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.3", type: MenuSurfaceComponent, isStandalone: true, selector: "MenuSurface", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, radius: { classPropertyName: "radius", publicName: "radius", isSignal: true, isRequired: false, transformFunction: null }, density: { classPropertyName: "density", publicName: "density", 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()", "style.--radius-base": "radiusBase()", "style.--spacing-base": "densityBase()", "attr.role": "\"menu\"" } }, queries: [{ propertyName: "items", predicate: MenuFocusableItem, descendants: true }], ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
350
358
|
}
|
|
351
359
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.3", ngImport: i0, type: MenuSurfaceComponent, decorators: [{
|
|
352
360
|
type: Component,
|
|
@@ -355,6 +363,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.3", ngImpor
|
|
|
355
363
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
356
364
|
host: {
|
|
357
365
|
'[class]': 'classes()',
|
|
366
|
+
'[style.--radius-base]': 'radiusBase()',
|
|
367
|
+
'[style.--spacing-base]': 'densityBase()',
|
|
358
368
|
'[attr.role]': '"menu"',
|
|
359
369
|
tabindex: '-1',
|
|
360
370
|
'(keydown.arrowDown)': 'onArrow($any($event), 1)',
|
|
@@ -365,7 +375,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.3", ngImpor
|
|
|
365
375
|
},
|
|
366
376
|
template: `<ng-content />`,
|
|
367
377
|
}]
|
|
368
|
-
}], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], items: [{
|
|
378
|
+
}], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], radius: [{ type: i0.Input, args: [{ isSignal: true, alias: "radius", required: false }] }], density: [{ type: i0.Input, args: [{ isSignal: true, alias: "density", required: false }] }], items: [{
|
|
369
379
|
type: ContentChildren,
|
|
370
380
|
args: [MenuFocusableItem, { descendants: true }]
|
|
371
381
|
}], closeRequested: [{ type: i0.Output, args: ["closeRequested"] }] } });
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { inject, ElementRef, input, computed, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
|
-
import { cn } from '@ojiepermana/angular-component/utils';
|
|
3
|
+
import { cn, radiusBaseValue, densityBaseValue } from '@ojiepermana/angular-component/utils';
|
|
4
4
|
|
|
5
5
|
const BASE = [
|
|
6
6
|
'flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1',
|
|
@@ -19,23 +19,35 @@ class InputComponent {
|
|
|
19
19
|
el = inject(ElementRef);
|
|
20
20
|
class = input('', /* @ts-ignore */
|
|
21
21
|
...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
22
|
+
radius = input('inherit', /* @ts-ignore */
|
|
23
|
+
...(ngDevMode ? [{ debugName: "radius" }] : /* istanbul ignore next */ []));
|
|
24
|
+
density = input('inherit', /* @ts-ignore */
|
|
25
|
+
...(ngDevMode ? [{ debugName: "density" }] : /* istanbul ignore next */ []));
|
|
22
26
|
classes = computed(() => cn(BASE, this.class()), /* @ts-ignore */
|
|
23
27
|
...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
28
|
+
radiusBase = computed(() => radiusBaseValue(this.radius()), /* @ts-ignore */
|
|
29
|
+
...(ngDevMode ? [{ debugName: "radiusBase" }] : /* istanbul ignore next */ []));
|
|
30
|
+
densityBase = computed(() => densityBaseValue(this.density()), /* @ts-ignore */
|
|
31
|
+
...(ngDevMode ? [{ debugName: "densityBase" }] : /* istanbul ignore next */ []));
|
|
24
32
|
focus() {
|
|
25
33
|
this.el.nativeElement.focus();
|
|
26
34
|
}
|
|
27
35
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.3", ngImport: i0, type: InputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
28
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.3", type: InputComponent, isStandalone: true, selector: "input[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 });
|
|
36
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.3", type: InputComponent, isStandalone: true, selector: "input[Input]", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, radius: { classPropertyName: "radius", publicName: "radius", isSignal: true, isRequired: false, transformFunction: null }, density: { classPropertyName: "density", publicName: "density", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()", "style.--radius-base": "radiusBase()", "style.--spacing-base": "densityBase()" } }, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
29
37
|
}
|
|
30
38
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.3", ngImport: i0, type: InputComponent, decorators: [{
|
|
31
39
|
type: Component,
|
|
32
40
|
args: [{
|
|
33
41
|
selector: 'input[Input]',
|
|
34
42
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
35
|
-
host: {
|
|
43
|
+
host: {
|
|
44
|
+
'[class]': 'classes()',
|
|
45
|
+
'[style.--radius-base]': 'radiusBase()',
|
|
46
|
+
'[style.--spacing-base]': 'densityBase()',
|
|
47
|
+
},
|
|
36
48
|
template: '',
|
|
37
49
|
}]
|
|
38
|
-
}], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
50
|
+
}], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], radius: [{ type: i0.Input, args: [{ isSignal: true, alias: "radius", required: false }] }], density: [{ type: i0.Input, args: [{ isSignal: true, alias: "density", required: false }] }] } });
|
|
39
51
|
|
|
40
52
|
/**
|
|
41
53
|
* Generated bundle index. Do not edit.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { input, inject, ElementRef,
|
|
3
|
-
import { cn } from '@ojiepermana/angular-component/utils';
|
|
2
|
+
import { input, computed, inject, ElementRef, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
|
+
import { radiusBaseValue, densityBaseValue, cn } from '@ojiepermana/angular-component/utils';
|
|
4
4
|
import { cva } from 'class-variance-authority';
|
|
5
5
|
|
|
6
6
|
const itemVariants = cva(['flex w-full flex-wrap items-center gap-x-3 gap-y-3', 'text-foreground', '[&[href]]:no-underline'].join(' '), {
|
|
@@ -70,12 +70,20 @@ class ItemComponent {
|
|
|
70
70
|
...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
71
71
|
class = input('', /* @ts-ignore */
|
|
72
72
|
...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
73
|
+
radius = input('inherit', /* @ts-ignore */
|
|
74
|
+
...(ngDevMode ? [{ debugName: "radius" }] : /* istanbul ignore next */ []));
|
|
75
|
+
density = input('inherit', /* @ts-ignore */
|
|
76
|
+
...(ngDevMode ? [{ debugName: "density" }] : /* istanbul ignore next */ []));
|
|
77
|
+
radiusBase = computed(() => radiusBaseValue(this.radius()), /* @ts-ignore */
|
|
78
|
+
...(ngDevMode ? [{ debugName: "radiusBase" }] : /* istanbul ignore next */ []));
|
|
79
|
+
densityBase = computed(() => densityBaseValue(this.density()), /* @ts-ignore */
|
|
80
|
+
...(ngDevMode ? [{ debugName: "densityBase" }] : /* istanbul ignore next */ []));
|
|
73
81
|
host = inject(ElementRef);
|
|
74
82
|
interactive = ['a', 'button'].includes(this.host.nativeElement.tagName.toLowerCase());
|
|
75
83
|
classes = computed(() => cn(itemVariants({ variant: this.variant(), size: this.size(), interactive: this.interactive }), this.class()), /* @ts-ignore */
|
|
76
84
|
...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
77
85
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.3", ngImport: i0, type: ItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
78
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.3", type: ItemComponent, isStandalone: true, selector: "Item, [Item]", 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-size": "size()", "attr.data-variant": "variant()", "attr.data-interactive": "interactive ? \"true\" : null" } }, ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
86
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.3", type: ItemComponent, isStandalone: true, selector: "Item, [Item]", 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 }, radius: { classPropertyName: "radius", publicName: "radius", isSignal: true, isRequired: false, transformFunction: null }, density: { classPropertyName: "density", publicName: "density", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()", "attr.data-size": "size()", "attr.data-variant": "variant()", "attr.data-interactive": "interactive ? \"true\" : null", "style.--radius-base": "radiusBase()", "style.--spacing-base": "densityBase()" } }, ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
79
87
|
}
|
|
80
88
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.3", ngImport: i0, type: ItemComponent, decorators: [{
|
|
81
89
|
type: Component,
|
|
@@ -87,10 +95,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.3", ngImpor
|
|
|
87
95
|
'[attr.data-size]': 'size()',
|
|
88
96
|
'[attr.data-variant]': 'variant()',
|
|
89
97
|
'[attr.data-interactive]': 'interactive ? "true" : null',
|
|
98
|
+
'[style.--radius-base]': 'radiusBase()',
|
|
99
|
+
'[style.--spacing-base]': 'densityBase()',
|
|
90
100
|
},
|
|
91
101
|
template: `<ng-content />`,
|
|
92
102
|
}]
|
|
93
|
-
}], 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 }] }] } });
|
|
103
|
+
}], 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 }] }], radius: [{ type: i0.Input, args: [{ isSignal: true, alias: "radius", required: false }] }], density: [{ type: i0.Input, args: [{ isSignal: true, alias: "density", required: false }] }] } });
|
|
94
104
|
class ItemGroupComponent {
|
|
95
105
|
class = input('', /* @ts-ignore */
|
|
96
106
|
...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
@@ -13,7 +13,7 @@ class KanbanComponent {
|
|
|
13
13
|
dense = input(false, { ...(ngDevMode ? { debugName: "dense" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
14
14
|
class = input('', /* @ts-ignore */
|
|
15
15
|
...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
16
|
-
classes = computed(() => cn('flex w-full min-w-0 gap-[var(--kanban-column-gap)] overflow-x-auto pb-3 text-sm text-foreground', '[--kanban-card-gap:
|
|
16
|
+
classes = computed(() => cn('flex w-full min-w-0 gap-[var(--kanban-column-gap)] overflow-x-auto pb-3 text-sm text-foreground', '[--kanban-card-gap:calc(var(--spacing)*3)] [--kanban-column-gap:calc(var(--spacing)*4)]', kanbanColumnWidthClasses[this.columnWidth()], this.dense() ? '[--kanban-card-gap:calc(var(--spacing)*2)] [--kanban-column-gap:calc(var(--spacing)*3)]' : '', this.class()), /* @ts-ignore */
|
|
17
17
|
...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
18
18
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.3", ngImport: i0, type: KanbanComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
19
19
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.3", type: KanbanComponent, isStandalone: true, selector: "Kanban", inputs: { columnWidth: { classPropertyName: "columnWidth", publicName: "columnWidth", isSignal: true, isRequired: false, transformFunction: null }, dense: { classPropertyName: "dense", publicName: "dense", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()", "attr.data-slot": "\"kanban\"", "attr.data-column-width": "columnWidth()", "attr.data-dense": "dense() ? \"\" : null" } }, ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
@@ -1,22 +1,34 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { inject, TemplateRef, Directive, InjectionToken, ViewContainerRef, ElementRef, DestroyRef,
|
|
2
|
+
import { inject, TemplateRef, input, computed, Directive, InjectionToken, ViewContainerRef, ElementRef, DestroyRef, output, signal } from '@angular/core';
|
|
3
|
+
import { radiusBaseValue, densityBaseValue, connectedPositionFor, oppositeSide, overlayDismissals, uniqueId } from '@ojiepermana/angular-component/utils';
|
|
3
4
|
import { Overlay } from '@angular/cdk/overlay';
|
|
4
5
|
import { TemplatePortal } from '@angular/cdk/portal';
|
|
5
6
|
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
6
|
-
import { connectedPositionFor, oppositeSide, overlayDismissals, uniqueId } from '@ojiepermana/angular-component/utils';
|
|
7
7
|
|
|
8
8
|
class PopoverContentDirective {
|
|
9
9
|
template = inject(TemplateRef);
|
|
10
|
+
radius = input('inherit', /* @ts-ignore */
|
|
11
|
+
...(ngDevMode ? [{ debugName: "radius" }] : /* istanbul ignore next */ []));
|
|
12
|
+
density = input('inherit', /* @ts-ignore */
|
|
13
|
+
...(ngDevMode ? [{ debugName: "density" }] : /* istanbul ignore next */ []));
|
|
14
|
+
radiusBase = computed(() => radiusBaseValue(this.radius()), /* @ts-ignore */
|
|
15
|
+
...(ngDevMode ? [{ debugName: "radiusBase" }] : /* istanbul ignore next */ []));
|
|
16
|
+
densityBase = computed(() => densityBaseValue(this.density()), /* @ts-ignore */
|
|
17
|
+
...(ngDevMode ? [{ debugName: "densityBase" }] : /* istanbul ignore next */ []));
|
|
10
18
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.3", ngImport: i0, type: PopoverContentDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
11
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
19
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.3", type: PopoverContentDirective, isStandalone: true, selector: "ng-template[PopoverContent]", inputs: { radius: { classPropertyName: "radius", publicName: "radius", isSignal: true, isRequired: false, transformFunction: null }, density: { classPropertyName: "density", publicName: "density", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "style.--radius-base": "radiusBase()", "style.--spacing-base": "densityBase()" } }, exportAs: ["PopoverContent"], ngImport: i0 });
|
|
12
20
|
}
|
|
13
21
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.3", ngImport: i0, type: PopoverContentDirective, decorators: [{
|
|
14
22
|
type: Directive,
|
|
15
23
|
args: [{
|
|
16
24
|
selector: 'ng-template[PopoverContent]',
|
|
17
25
|
exportAs: 'PopoverContent',
|
|
26
|
+
host: {
|
|
27
|
+
'[style.--radius-base]': 'radiusBase()',
|
|
28
|
+
'[style.--spacing-base]': 'densityBase()',
|
|
29
|
+
},
|
|
18
30
|
}]
|
|
19
|
-
}] });
|
|
31
|
+
}], propDecorators: { radius: [{ type: i0.Input, args: [{ isSignal: true, alias: "radius", required: false }] }], density: [{ type: i0.Input, args: [{ isSignal: true, alias: "density", required: false }] }] } });
|
|
20
32
|
|
|
21
33
|
const POPOVER_TRIGGER_DEFAULTS = new InjectionToken('POPOVER_TRIGGER_DEFAULTS');
|
|
22
34
|
class PopoverTriggerDirective {
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { inject, effect, forwardRef, ViewEncapsulation, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
2
|
+
import { inject, input, computed, effect, forwardRef, ViewEncapsulation, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
3
|
import * as i1 from '@angular/cdk/overlay';
|
|
4
4
|
import { OverlayModule } from '@angular/cdk/overlay';
|
|
5
5
|
import { MAT_OPTION_PARENT_COMPONENT, MatOption, MatPseudoCheckbox, MatRipple } from '@angular/material/core';
|
|
6
6
|
import { MatSelect } from '@angular/material/select';
|
|
7
7
|
import { FormFieldContext } from '@ojiepermana/angular-component/form';
|
|
8
|
+
import { radiusBaseValue, densityBaseValue } from '@ojiepermana/angular-component/utils';
|
|
8
9
|
|
|
9
10
|
/**
|
|
10
11
|
* Custom shadcn-styled select.
|
|
@@ -28,6 +29,16 @@ import { FormFieldContext } from '@ojiepermana/angular-component/form';
|
|
|
28
29
|
class SelectComponent extends MatSelect {
|
|
29
30
|
/** Optional bridge to an enclosing edsis `<FormField>` (validation + a11y). */
|
|
30
31
|
formFieldContext = inject(FormFieldContext, { optional: true });
|
|
32
|
+
/** Per-component corner-radius override; `'inherit'` follows the global axis. */
|
|
33
|
+
radius = input('inherit', /* @ts-ignore */
|
|
34
|
+
...(ngDevMode ? [{ debugName: "radius" }] : /* istanbul ignore next */ []));
|
|
35
|
+
/** Per-component spacing-density override; `'inherit'` follows the global axis. */
|
|
36
|
+
density = input('inherit', /* @ts-ignore */
|
|
37
|
+
...(ngDevMode ? [{ debugName: "density" }] : /* istanbul ignore next */ []));
|
|
38
|
+
radiusBase = computed(() => radiusBaseValue(this.radius()), /* @ts-ignore */
|
|
39
|
+
...(ngDevMode ? [{ debugName: "radiusBase" }] : /* istanbul ignore next */ []));
|
|
40
|
+
densityBase = computed(() => densityBaseValue(this.density()), /* @ts-ignore */
|
|
41
|
+
...(ngDevMode ? [{ debugName: "densityBase" }] : /* istanbul ignore next */ []));
|
|
31
42
|
constructor() {
|
|
32
43
|
super();
|
|
33
44
|
const ctx = this.formFieldContext;
|
|
@@ -49,7 +60,7 @@ class SelectComponent extends MatSelect {
|
|
|
49
60
|
this.formFieldContext?.control.set(this.ngControl?.control ?? null);
|
|
50
61
|
}
|
|
51
62
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.3", ngImport: i0, type: SelectComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
52
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.3", type: SelectComponent, isStandalone: true, selector: "SelectField", host: { attributes: { "role": "combobox", "aria-haspopup": "listbox" }, classAttribute: "mat-mdc-select" }, providers: [
|
|
63
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.3", type: SelectComponent, isStandalone: true, selector: "SelectField", inputs: { radius: { classPropertyName: "radius", publicName: "radius", isSignal: true, isRequired: false, transformFunction: null }, density: { classPropertyName: "density", publicName: "density", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "combobox", "aria-haspopup": "listbox" }, properties: { "style.--radius-base": "radiusBase()", "style.--spacing-base": "densityBase()" }, classAttribute: "mat-mdc-select" }, providers: [
|
|
53
64
|
{ provide: MatSelect, useExisting: forwardRef(() => SelectComponent) },
|
|
54
65
|
{ provide: MAT_OPTION_PARENT_COMPONENT, useExisting: forwardRef(() => SelectComponent) },
|
|
55
66
|
], exportAs: ["matSelect"], usesInheritance: true, ngImport: i0, template: `
|
|
@@ -105,6 +116,8 @@ class SelectComponent extends MatSelect {
|
|
|
105
116
|
tabindex="-1"
|
|
106
117
|
class="mat-mdc-select-panel mdc-menu-surface mdc-menu-surface--open select-panel"
|
|
107
118
|
[class]="panelClass"
|
|
119
|
+
[style.--radius-base]="radiusBase()"
|
|
120
|
+
[style.--spacing-base]="densityBase()"
|
|
108
121
|
[class.mat-select-panel-animations-enabled]="!_animationsDisabled"
|
|
109
122
|
[class.mat-primary]="_parentFormField?.color === 'primary'"
|
|
110
123
|
[class.mat-accent]="_parentFormField?.color === 'accent'"
|
|
@@ -118,7 +131,7 @@ class SelectComponent extends MatSelect {
|
|
|
118
131
|
<ng-content></ng-content>
|
|
119
132
|
</div>
|
|
120
133
|
</ng-template>
|
|
121
|
-
`, isInline: true, styles: ["@keyframes _mat-select-enter{0%{opacity:0;transform:scaleY(.8)}to{opacity:1;transform:none}}@keyframes _mat-select-exit{0%{opacity:1}to{opacity:0}}.mat-mdc-select{display:inline-block;width:100%;outline:none;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;color:var(--mat-select-enabled-trigger-text-color, var(--mat-sys-on-surface));font-family:var(--mat-select-trigger-text-font, var(--mat-sys-body-large-font));line-height:var(--mat-select-trigger-text-line-height, var(--mat-sys-body-large-line-height));font-size:var(--mat-select-trigger-text-size, var(--mat-sys-body-large-size));font-weight:var(--mat-select-trigger-text-weight, var(--mat-sys-body-large-weight));letter-spacing:var(--mat-select-trigger-text-tracking, var(--mat-sys-body-large-tracking))}div.mat-mdc-select-panel{box-shadow:var( --mat-select-container-elevation-shadow, 0px 3px 1px -2px rgba(0, 0, 0, .2), 0px 2px 2px 0px rgba(0, 0, 0, .14), 0px 1px 5px 0px rgba(0, 0, 0, .12) )}.mat-mdc-select-disabled,.mat-mdc-select-disabled .mat-mdc-select-placeholder{color:var(--mat-select-disabled-trigger-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-mdc-select-trigger{display:inline-flex;align-items:center;cursor:pointer;position:relative;box-sizing:border-box;width:100%}.mat-mdc-select-disabled .mat-mdc-select-trigger{-webkit-user-select:none;user-select:none;cursor:default}.mat-mdc-select-value{width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mat-mdc-select-value-text{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mat-mdc-select-arrow-wrapper{height:24px;flex-shrink:0;display:inline-flex;align-items:center}.mat-mdc-select-arrow{width:10px;height:5px;position:relative;color:var(--mat-select-enabled-arrow-color, var(--mat-sys-on-surface-variant))}.mat-select-open .mat-mdc-select-arrow{transform:rotate(180deg)}.mat-mdc-select-arrow svg{fill:currentColor;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}@media(forced-colors:active){.mat-mdc-select-arrow svg{fill:CanvasText}.mat-mdc-select-disabled .mat-mdc-select-arrow svg{fill:GrayText}}div.mat-mdc-select-panel{width:100%;max-height:275px;outline:0;overflow:auto;padding:8px 0;box-sizing:border-box;transform-origin:top center;border-radius:0 0 4px 4px;position:relative;background-color:var(--mat-select-panel-background-color, var(--mat-sys-surface-container))}.mat-mdc-select-panel-above div.mat-mdc-select-panel{border-radius:4px 4px 0 0;transform-origin:bottom center}@media(forced-colors:active){div.mat-mdc-select-panel{outline:solid 1px}}.mat-select-panel-animations-enabled{animation:_mat-select-enter .12s cubic-bezier(0,0,.2,1)}.mat-select-panel-animations-enabled.mat-select-panel-exit{animation:_mat-select-exit .1s linear}.mat-mdc-select-placeholder{transition:color .4s .1333333333333s cubic-bezier(.25,.8,.25,1);color:var(--mat-select-placeholder-text-color, var(--mat-sys-on-surface-variant))}._mat-animation-noopable .mat-mdc-select-placeholder{transition:none}.mat-mdc-select-min-line:empty:before{content:\" \";white-space:pre;width:1px;display:inline-block;visibility:hidden}selectfield.mat-mdc-select{display:flex;align-items:center;box-sizing:border-box;width:100%;height:2.25rem;padding:0
|
|
134
|
+
`, isInline: true, styles: ["@keyframes _mat-select-enter{0%{opacity:0;transform:scaleY(.8)}to{opacity:1;transform:none}}@keyframes _mat-select-exit{0%{opacity:1}to{opacity:0}}.mat-mdc-select{display:inline-block;width:100%;outline:none;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;color:var(--mat-select-enabled-trigger-text-color, var(--mat-sys-on-surface));font-family:var(--mat-select-trigger-text-font, var(--mat-sys-body-large-font));line-height:var(--mat-select-trigger-text-line-height, var(--mat-sys-body-large-line-height));font-size:var(--mat-select-trigger-text-size, var(--mat-sys-body-large-size));font-weight:var(--mat-select-trigger-text-weight, var(--mat-sys-body-large-weight));letter-spacing:var(--mat-select-trigger-text-tracking, var(--mat-sys-body-large-tracking))}div.mat-mdc-select-panel{box-shadow:var( --mat-select-container-elevation-shadow, 0px 3px 1px -2px rgba(0, 0, 0, .2), 0px 2px 2px 0px rgba(0, 0, 0, .14), 0px 1px 5px 0px rgba(0, 0, 0, .12) )}.mat-mdc-select-disabled,.mat-mdc-select-disabled .mat-mdc-select-placeholder{color:var(--mat-select-disabled-trigger-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-mdc-select-trigger{display:inline-flex;align-items:center;cursor:pointer;position:relative;box-sizing:border-box;width:100%}.mat-mdc-select-disabled .mat-mdc-select-trigger{-webkit-user-select:none;user-select:none;cursor:default}.mat-mdc-select-value{width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mat-mdc-select-value-text{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mat-mdc-select-arrow-wrapper{height:24px;flex-shrink:0;display:inline-flex;align-items:center}.mat-mdc-select-arrow{width:10px;height:5px;position:relative;color:var(--mat-select-enabled-arrow-color, var(--mat-sys-on-surface-variant))}.mat-select-open .mat-mdc-select-arrow{transform:rotate(180deg)}.mat-mdc-select-arrow svg{fill:currentColor;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}@media(forced-colors:active){.mat-mdc-select-arrow svg{fill:CanvasText}.mat-mdc-select-disabled .mat-mdc-select-arrow svg{fill:GrayText}}div.mat-mdc-select-panel{width:100%;max-height:275px;outline:0;overflow:auto;padding:8px 0;box-sizing:border-box;transform-origin:top center;border-radius:0 0 4px 4px;position:relative;background-color:var(--mat-select-panel-background-color, var(--mat-sys-surface-container))}.mat-mdc-select-panel-above div.mat-mdc-select-panel{border-radius:4px 4px 0 0;transform-origin:bottom center}@media(forced-colors:active){div.mat-mdc-select-panel{outline:solid 1px}}.mat-select-panel-animations-enabled{animation:_mat-select-enter .12s cubic-bezier(0,0,.2,1)}.mat-select-panel-animations-enabled.mat-select-panel-exit{animation:_mat-select-exit .1s linear}.mat-mdc-select-placeholder{transition:color .4s .1333333333333s cubic-bezier(.25,.8,.25,1);color:var(--mat-select-placeholder-text-color, var(--mat-sys-on-surface-variant))}._mat-animation-noopable .mat-mdc-select-placeholder{transition:none}.mat-mdc-select-min-line:empty:before{content:\" \";white-space:pre;width:1px;display:inline-block;visibility:hidden}selectfield.mat-mdc-select{display:flex;align-items:center;box-sizing:border-box;width:100%;height:2.25rem;padding:0 calc(var(--spacing-base) * 3);border:1px solid hsl(var(--input));border-radius:calc(var(--radius-base) - .125rem);background:transparent;color:hsl(var(--foreground));font-family:var(--font-sans);font-size:var(--text-sm);line-height:var(--text-sm--line-height);cursor:pointer}selectfield.mat-mdc-select:focus,selectfield.mat-mdc-select.mat-select-open{outline:none;border-color:hsl(var(--ring));box-shadow:0 0 0 1px hsl(var(--ring))}selectfield.mat-mdc-select-disabled{cursor:not-allowed;opacity:.5;background:hsl(var(--muted) / .4)}selectfield.mat-mdc-select-invalid{border-color:hsl(var(--destructive))}selectfield .mat-mdc-select-value{color:hsl(var(--foreground))}selectfield .mat-mdc-select-placeholder{color:hsl(var(--muted-foreground))}selectfield .mat-mdc-select-arrow{color:hsl(var(--muted-foreground))}.mat-mdc-select-panel.select-panel{--mat-select-panel-background-color: hsl(var(--popover));background-color:hsl(var(--popover));color:hsl(var(--popover-foreground));border:1px solid hsl(var(--border));border-radius:var(--radius-base);box-shadow:var(--shadow-md, 0 8px 18px -14px hsl(var(--foreground) / .24));padding:calc(var(--spacing-base) * 1)}.select-panel .mat-mdc-option{--mat-option-label-text-color: hsl(var(--popover-foreground));--mat-option-label-text-font: var(--font-sans);--mat-option-label-text-size: var(--text-sm);--mat-option-label-text-line-height: var(--text-sm--line-height);--mat-option-label-text-weight: 400;--mat-option-hover-state-layer-color: hsl(var(--accent));--mat-option-focus-state-layer-color: hsl(var(--accent));--mat-option-selected-state-layer-color: hsl(var(--accent));--mat-option-selected-state-label-text-color: hsl(var(--accent-foreground));min-height:2.25rem;border-radius:calc(var(--radius-base) - .125rem)}.select-panel .mat-mdc-option.mdc-list-item--selected:not(.mdc-list-item--disabled) .mdc-list-item__primary-text{color:hsl(var(--accent-foreground))}.select-panel .mat-mdc-optgroup-label{--mat-optgroup-label-text-color: hsl(var(--muted-foreground));--mat-optgroup-label-text-font: var(--font-sans);--mat-optgroup-label-text-size: var(--text-xs);min-height:1.75rem}\n"], dependencies: [{ kind: "ngmodule", type: OverlayModule }, { kind: "directive", type: i1.CdkConnectedOverlay, selector: "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]", inputs: ["cdkConnectedOverlayOrigin", "cdkConnectedOverlayPositions", "cdkConnectedOverlayPositionStrategy", "cdkConnectedOverlayOffsetX", "cdkConnectedOverlayOffsetY", "cdkConnectedOverlayWidth", "cdkConnectedOverlayHeight", "cdkConnectedOverlayMinWidth", "cdkConnectedOverlayMinHeight", "cdkConnectedOverlayBackdropClass", "cdkConnectedOverlayPanelClass", "cdkConnectedOverlayViewportMargin", "cdkConnectedOverlayScrollStrategy", "cdkConnectedOverlayOpen", "cdkConnectedOverlayDisableClose", "cdkConnectedOverlayTransformOriginOn", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayLockPosition", "cdkConnectedOverlayFlexibleDimensions", "cdkConnectedOverlayGrowAfterOpen", "cdkConnectedOverlayPush", "cdkConnectedOverlayDisposeOnNavigation", "cdkConnectedOverlayUsePopover", "cdkConnectedOverlayMatchWidth", "cdkConnectedOverlay"], outputs: ["backdropClick", "positionChange", "attach", "detach", "overlayKeydown", "overlayOutsideClick"], exportAs: ["cdkConnectedOverlay"] }, { kind: "directive", type: i1.CdkOverlayOrigin, selector: "[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]", exportAs: ["cdkOverlayOrigin"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
122
135
|
}
|
|
123
136
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.3", ngImport: i0, type: SelectComponent, decorators: [{
|
|
124
137
|
type: Component,
|
|
@@ -126,6 +139,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.3", ngImpor
|
|
|
126
139
|
class: 'mat-mdc-select',
|
|
127
140
|
role: 'combobox',
|
|
128
141
|
'aria-haspopup': 'listbox',
|
|
142
|
+
'[style.--radius-base]': 'radiusBase()',
|
|
143
|
+
'[style.--spacing-base]': 'densityBase()',
|
|
129
144
|
}, providers: [
|
|
130
145
|
{ provide: MatSelect, useExisting: forwardRef(() => SelectComponent) },
|
|
131
146
|
{ provide: MAT_OPTION_PARENT_COMPONENT, useExisting: forwardRef(() => SelectComponent) },
|
|
@@ -182,6 +197,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.3", ngImpor
|
|
|
182
197
|
tabindex="-1"
|
|
183
198
|
class="mat-mdc-select-panel mdc-menu-surface mdc-menu-surface--open select-panel"
|
|
184
199
|
[class]="panelClass"
|
|
200
|
+
[style.--radius-base]="radiusBase()"
|
|
201
|
+
[style.--spacing-base]="densityBase()"
|
|
185
202
|
[class.mat-select-panel-animations-enabled]="!_animationsDisabled"
|
|
186
203
|
[class.mat-primary]="_parentFormField?.color === 'primary'"
|
|
187
204
|
[class.mat-accent]="_parentFormField?.color === 'accent'"
|
|
@@ -195,8 +212,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.3", ngImpor
|
|
|
195
212
|
<ng-content></ng-content>
|
|
196
213
|
</div>
|
|
197
214
|
</ng-template>
|
|
198
|
-
`, styles: ["@keyframes _mat-select-enter{0%{opacity:0;transform:scaleY(.8)}to{opacity:1;transform:none}}@keyframes _mat-select-exit{0%{opacity:1}to{opacity:0}}.mat-mdc-select{display:inline-block;width:100%;outline:none;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;color:var(--mat-select-enabled-trigger-text-color, var(--mat-sys-on-surface));font-family:var(--mat-select-trigger-text-font, var(--mat-sys-body-large-font));line-height:var(--mat-select-trigger-text-line-height, var(--mat-sys-body-large-line-height));font-size:var(--mat-select-trigger-text-size, var(--mat-sys-body-large-size));font-weight:var(--mat-select-trigger-text-weight, var(--mat-sys-body-large-weight));letter-spacing:var(--mat-select-trigger-text-tracking, var(--mat-sys-body-large-tracking))}div.mat-mdc-select-panel{box-shadow:var( --mat-select-container-elevation-shadow, 0px 3px 1px -2px rgba(0, 0, 0, .2), 0px 2px 2px 0px rgba(0, 0, 0, .14), 0px 1px 5px 0px rgba(0, 0, 0, .12) )}.mat-mdc-select-disabled,.mat-mdc-select-disabled .mat-mdc-select-placeholder{color:var(--mat-select-disabled-trigger-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-mdc-select-trigger{display:inline-flex;align-items:center;cursor:pointer;position:relative;box-sizing:border-box;width:100%}.mat-mdc-select-disabled .mat-mdc-select-trigger{-webkit-user-select:none;user-select:none;cursor:default}.mat-mdc-select-value{width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mat-mdc-select-value-text{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mat-mdc-select-arrow-wrapper{height:24px;flex-shrink:0;display:inline-flex;align-items:center}.mat-mdc-select-arrow{width:10px;height:5px;position:relative;color:var(--mat-select-enabled-arrow-color, var(--mat-sys-on-surface-variant))}.mat-select-open .mat-mdc-select-arrow{transform:rotate(180deg)}.mat-mdc-select-arrow svg{fill:currentColor;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}@media(forced-colors:active){.mat-mdc-select-arrow svg{fill:CanvasText}.mat-mdc-select-disabled .mat-mdc-select-arrow svg{fill:GrayText}}div.mat-mdc-select-panel{width:100%;max-height:275px;outline:0;overflow:auto;padding:8px 0;box-sizing:border-box;transform-origin:top center;border-radius:0 0 4px 4px;position:relative;background-color:var(--mat-select-panel-background-color, var(--mat-sys-surface-container))}.mat-mdc-select-panel-above div.mat-mdc-select-panel{border-radius:4px 4px 0 0;transform-origin:bottom center}@media(forced-colors:active){div.mat-mdc-select-panel{outline:solid 1px}}.mat-select-panel-animations-enabled{animation:_mat-select-enter .12s cubic-bezier(0,0,.2,1)}.mat-select-panel-animations-enabled.mat-select-panel-exit{animation:_mat-select-exit .1s linear}.mat-mdc-select-placeholder{transition:color .4s .1333333333333s cubic-bezier(.25,.8,.25,1);color:var(--mat-select-placeholder-text-color, var(--mat-sys-on-surface-variant))}._mat-animation-noopable .mat-mdc-select-placeholder{transition:none}.mat-mdc-select-min-line:empty:before{content:\" \";white-space:pre;width:1px;display:inline-block;visibility:hidden}selectfield.mat-mdc-select{display:flex;align-items:center;box-sizing:border-box;width:100%;height:2.25rem;padding:0
|
|
199
|
-
}], ctorParameters: () => [] });
|
|
215
|
+
`, styles: ["@keyframes _mat-select-enter{0%{opacity:0;transform:scaleY(.8)}to{opacity:1;transform:none}}@keyframes _mat-select-exit{0%{opacity:1}to{opacity:0}}.mat-mdc-select{display:inline-block;width:100%;outline:none;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;color:var(--mat-select-enabled-trigger-text-color, var(--mat-sys-on-surface));font-family:var(--mat-select-trigger-text-font, var(--mat-sys-body-large-font));line-height:var(--mat-select-trigger-text-line-height, var(--mat-sys-body-large-line-height));font-size:var(--mat-select-trigger-text-size, var(--mat-sys-body-large-size));font-weight:var(--mat-select-trigger-text-weight, var(--mat-sys-body-large-weight));letter-spacing:var(--mat-select-trigger-text-tracking, var(--mat-sys-body-large-tracking))}div.mat-mdc-select-panel{box-shadow:var( --mat-select-container-elevation-shadow, 0px 3px 1px -2px rgba(0, 0, 0, .2), 0px 2px 2px 0px rgba(0, 0, 0, .14), 0px 1px 5px 0px rgba(0, 0, 0, .12) )}.mat-mdc-select-disabled,.mat-mdc-select-disabled .mat-mdc-select-placeholder{color:var(--mat-select-disabled-trigger-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-mdc-select-trigger{display:inline-flex;align-items:center;cursor:pointer;position:relative;box-sizing:border-box;width:100%}.mat-mdc-select-disabled .mat-mdc-select-trigger{-webkit-user-select:none;user-select:none;cursor:default}.mat-mdc-select-value{width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mat-mdc-select-value-text{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mat-mdc-select-arrow-wrapper{height:24px;flex-shrink:0;display:inline-flex;align-items:center}.mat-mdc-select-arrow{width:10px;height:5px;position:relative;color:var(--mat-select-enabled-arrow-color, var(--mat-sys-on-surface-variant))}.mat-select-open .mat-mdc-select-arrow{transform:rotate(180deg)}.mat-mdc-select-arrow svg{fill:currentColor;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}@media(forced-colors:active){.mat-mdc-select-arrow svg{fill:CanvasText}.mat-mdc-select-disabled .mat-mdc-select-arrow svg{fill:GrayText}}div.mat-mdc-select-panel{width:100%;max-height:275px;outline:0;overflow:auto;padding:8px 0;box-sizing:border-box;transform-origin:top center;border-radius:0 0 4px 4px;position:relative;background-color:var(--mat-select-panel-background-color, var(--mat-sys-surface-container))}.mat-mdc-select-panel-above div.mat-mdc-select-panel{border-radius:4px 4px 0 0;transform-origin:bottom center}@media(forced-colors:active){div.mat-mdc-select-panel{outline:solid 1px}}.mat-select-panel-animations-enabled{animation:_mat-select-enter .12s cubic-bezier(0,0,.2,1)}.mat-select-panel-animations-enabled.mat-select-panel-exit{animation:_mat-select-exit .1s linear}.mat-mdc-select-placeholder{transition:color .4s .1333333333333s cubic-bezier(.25,.8,.25,1);color:var(--mat-select-placeholder-text-color, var(--mat-sys-on-surface-variant))}._mat-animation-noopable .mat-mdc-select-placeholder{transition:none}.mat-mdc-select-min-line:empty:before{content:\" \";white-space:pre;width:1px;display:inline-block;visibility:hidden}selectfield.mat-mdc-select{display:flex;align-items:center;box-sizing:border-box;width:100%;height:2.25rem;padding:0 calc(var(--spacing-base) * 3);border:1px solid hsl(var(--input));border-radius:calc(var(--radius-base) - .125rem);background:transparent;color:hsl(var(--foreground));font-family:var(--font-sans);font-size:var(--text-sm);line-height:var(--text-sm--line-height);cursor:pointer}selectfield.mat-mdc-select:focus,selectfield.mat-mdc-select.mat-select-open{outline:none;border-color:hsl(var(--ring));box-shadow:0 0 0 1px hsl(var(--ring))}selectfield.mat-mdc-select-disabled{cursor:not-allowed;opacity:.5;background:hsl(var(--muted) / .4)}selectfield.mat-mdc-select-invalid{border-color:hsl(var(--destructive))}selectfield .mat-mdc-select-value{color:hsl(var(--foreground))}selectfield .mat-mdc-select-placeholder{color:hsl(var(--muted-foreground))}selectfield .mat-mdc-select-arrow{color:hsl(var(--muted-foreground))}.mat-mdc-select-panel.select-panel{--mat-select-panel-background-color: hsl(var(--popover));background-color:hsl(var(--popover));color:hsl(var(--popover-foreground));border:1px solid hsl(var(--border));border-radius:var(--radius-base);box-shadow:var(--shadow-md, 0 8px 18px -14px hsl(var(--foreground) / .24));padding:calc(var(--spacing-base) * 1)}.select-panel .mat-mdc-option{--mat-option-label-text-color: hsl(var(--popover-foreground));--mat-option-label-text-font: var(--font-sans);--mat-option-label-text-size: var(--text-sm);--mat-option-label-text-line-height: var(--text-sm--line-height);--mat-option-label-text-weight: 400;--mat-option-hover-state-layer-color: hsl(var(--accent));--mat-option-focus-state-layer-color: hsl(var(--accent));--mat-option-selected-state-layer-color: hsl(var(--accent));--mat-option-selected-state-label-text-color: hsl(var(--accent-foreground));min-height:2.25rem;border-radius:calc(var(--radius-base) - .125rem)}.select-panel .mat-mdc-option.mdc-list-item--selected:not(.mdc-list-item--disabled) .mdc-list-item__primary-text{color:hsl(var(--accent-foreground))}.select-panel .mat-mdc-optgroup-label{--mat-optgroup-label-text-color: hsl(var(--muted-foreground));--mat-optgroup-label-text-font: var(--font-sans);--mat-optgroup-label-text-size: var(--text-xs);min-height:1.75rem}\n"] }]
|
|
216
|
+
}], ctorParameters: () => [], propDecorators: { radius: [{ type: i0.Input, args: [{ isSignal: true, alias: "radius", required: false }] }], density: [{ type: i0.Input, args: [{ isSignal: true, alias: "density", required: false }] }] } });
|
|
200
217
|
|
|
201
218
|
/**
|
|
202
219
|
* Option for `<SelectField>`.
|
|
@@ -7,7 +7,7 @@ import { DOCUMENT } from '@angular/common';
|
|
|
7
7
|
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
8
8
|
import { filter } from 'rxjs/operators';
|
|
9
9
|
import { ButtonComponent } from '@ojiepermana/angular-component/button';
|
|
10
|
-
import { cn } from '@ojiepermana/angular-component/utils';
|
|
10
|
+
import { cn, radiusBaseValue, densityBaseValue } from '@ojiepermana/angular-component/utils';
|
|
11
11
|
|
|
12
12
|
const SIDE_BASE = {
|
|
13
13
|
top: 'inset-x-0 top-0 border-b border-border',
|
|
@@ -53,6 +53,10 @@ class SheetComponent {
|
|
|
53
53
|
describedBy = input(null, { ...(ngDevMode ? { debugName: "describedBy" } : /* istanbul ignore next */ {}), alias: 'aria-describedby' });
|
|
54
54
|
class = input('', /* @ts-ignore */
|
|
55
55
|
...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
56
|
+
radius = input('inherit', /* @ts-ignore */
|
|
57
|
+
...(ngDevMode ? [{ debugName: "radius" }] : /* istanbul ignore next */ []));
|
|
58
|
+
density = input('inherit', /* @ts-ignore */
|
|
59
|
+
...(ngDevMode ? [{ debugName: "density" }] : /* istanbul ignore next */ []));
|
|
56
60
|
openedChange = output();
|
|
57
61
|
tpl = viewChild.required('tpl');
|
|
58
62
|
overlayRef = null;
|
|
@@ -64,6 +68,10 @@ class SheetComponent {
|
|
|
64
68
|
...(ngDevMode ? [{ debugName: "surfaceClasses" }] : /* istanbul ignore next */ []));
|
|
65
69
|
enterFrom = computed(() => SIDE_ENTER_FROM[this.resolvedSide()], /* @ts-ignore */
|
|
66
70
|
...(ngDevMode ? [{ debugName: "enterFrom" }] : /* istanbul ignore next */ []));
|
|
71
|
+
radiusBase = computed(() => radiusBaseValue(this.radius()), /* @ts-ignore */
|
|
72
|
+
...(ngDevMode ? [{ debugName: "radiusBase" }] : /* istanbul ignore next */ []));
|
|
73
|
+
densityBase = computed(() => densityBaseValue(this.density()), /* @ts-ignore */
|
|
74
|
+
...(ngDevMode ? [{ debugName: "densityBase" }] : /* istanbul ignore next */ []));
|
|
67
75
|
constructor() {
|
|
68
76
|
this.destroyRef.onDestroy(() => this.detach(false));
|
|
69
77
|
effect(() => {
|
|
@@ -126,7 +134,7 @@ class SheetComponent {
|
|
|
126
134
|
return this.host.nativeElement.localName === 'drawer';
|
|
127
135
|
}
|
|
128
136
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.3", ngImport: i0, type: SheetComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
129
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.3", type: SheetComponent, isStandalone: true, selector: "Sheet, Drawer", inputs: { open: { classPropertyName: "open", publicName: "open", isSignal: true, isRequired: false, transformFunction: null }, side: { classPropertyName: "side", publicName: "side", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", 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 }, showCloseButton: { classPropertyName: "showCloseButton", publicName: "showCloseButton", isSignal: true, isRequired: false, transformFunction: null }, closeButtonLabel: { classPropertyName: "closeButtonLabel", publicName: "closeButtonLabel", 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: `
|
|
137
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.3", type: SheetComponent, isStandalone: true, selector: "Sheet, Drawer", inputs: { open: { classPropertyName: "open", publicName: "open", isSignal: true, isRequired: false, transformFunction: null }, side: { classPropertyName: "side", publicName: "side", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", 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 }, showCloseButton: { classPropertyName: "showCloseButton", publicName: "showCloseButton", isSignal: true, isRequired: false, transformFunction: null }, closeButtonLabel: { classPropertyName: "closeButtonLabel", publicName: "closeButtonLabel", 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 }, radius: { classPropertyName: "radius", publicName: "radius", isSignal: true, isRequired: false, transformFunction: null }, density: { classPropertyName: "density", publicName: "density", 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: `
|
|
130
138
|
<ng-template #tpl>
|
|
131
139
|
<div
|
|
132
140
|
class="sheet-surface fixed z-50 bg-background shadow-lg transition ease-in-out"
|
|
@@ -135,7 +143,9 @@ class SheetComponent {
|
|
|
135
143
|
[attr.aria-labelledby]="labelledBy()"
|
|
136
144
|
[attr.aria-describedby]="describedBy()"
|
|
137
145
|
[class]="surfaceClasses()"
|
|
138
|
-
[style.--sheet-from]="enterFrom()"
|
|
146
|
+
[style.--sheet-from]="enterFrom()"
|
|
147
|
+
[style.--radius-base]="radiusBase()"
|
|
148
|
+
[style.--spacing-base]="densityBase()">
|
|
139
149
|
@if (showCloseButton()) {
|
|
140
150
|
<button
|
|
141
151
|
type="button"
|
|
@@ -152,7 +162,7 @@ class SheetComponent {
|
|
|
152
162
|
<ng-content />
|
|
153
163
|
</div>
|
|
154
164
|
</ng-template>
|
|
155
|
-
`, isInline: true, styles: [".sheet-surface{animation:sheet-in .3s cubic-bezier(.2,0,0,1)}@keyframes sheet-in{0%{transform:var(--sheet-from)}to{transform:translate(0)}}@media(prefers-reduced-motion:reduce){.sheet-surface{animation-duration:0ms}}\n"], dependencies: [{ kind: "component", type: ButtonComponent, selector: "button[Button], a[Button]", inputs: ["variant", "size", "class"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
165
|
+
`, isInline: true, styles: [".sheet-surface{animation:sheet-in .3s cubic-bezier(.2,0,0,1)}@keyframes sheet-in{0%{transform:var(--sheet-from)}to{transform:translate(0)}}@media(prefers-reduced-motion:reduce){.sheet-surface{animation-duration:0ms}}\n"], dependencies: [{ kind: "component", type: ButtonComponent, selector: "button[Button], a[Button]", inputs: ["variant", "size", "class", "radius", "density"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
156
166
|
}
|
|
157
167
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.3", ngImport: i0, type: SheetComponent, decorators: [{
|
|
158
168
|
type: Component,
|
|
@@ -165,7 +175,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.3", ngImpor
|
|
|
165
175
|
[attr.aria-labelledby]="labelledBy()"
|
|
166
176
|
[attr.aria-describedby]="describedBy()"
|
|
167
177
|
[class]="surfaceClasses()"
|
|
168
|
-
[style.--sheet-from]="enterFrom()"
|
|
178
|
+
[style.--sheet-from]="enterFrom()"
|
|
179
|
+
[style.--radius-base]="radiusBase()"
|
|
180
|
+
[style.--spacing-base]="densityBase()">
|
|
169
181
|
@if (showCloseButton()) {
|
|
170
182
|
<button
|
|
171
183
|
type="button"
|
|
@@ -183,7 +195,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.3", ngImpor
|
|
|
183
195
|
</div>
|
|
184
196
|
</ng-template>
|
|
185
197
|
`, styles: [".sheet-surface{animation:sheet-in .3s cubic-bezier(.2,0,0,1)}@keyframes sheet-in{0%{transform:var(--sheet-from)}to{transform:translate(0)}}@media(prefers-reduced-motion:reduce){.sheet-surface{animation-duration:0ms}}\n"] }]
|
|
186
|
-
}], 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 }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], closeOnEscape: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeOnEscape", required: false }] }], closeOnBackdropClick: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeOnBackdropClick", required: false }] }], showCloseButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "showCloseButton", required: false }] }], closeButtonLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeButtonLabel", 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 }] }] } });
|
|
198
|
+
}], 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 }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], closeOnEscape: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeOnEscape", required: false }] }], closeOnBackdropClick: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeOnBackdropClick", required: false }] }], showCloseButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "showCloseButton", required: false }] }], closeButtonLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeButtonLabel", 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 }] }], radius: [{ type: i0.Input, args: [{ isSignal: true, alias: "radius", required: false }] }], density: [{ type: i0.Input, args: [{ isSignal: true, alias: "density", required: false }] }], openedChange: [{ type: i0.Output, args: ["openedChange"] }], tpl: [{ type: i0.ViewChild, args: ['tpl', { isSignal: true }] }] } });
|
|
187
199
|
|
|
188
200
|
class SheetCloseDirective {
|
|
189
201
|
sheet = inject(SheetComponent);
|