@ojiepermana/angular-component 22.0.44 → 22.0.46
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/fesm2022/ojiepermana-angular-component-accordion.mjs +9 -11
- package/fesm2022/ojiepermana-angular-component-alert-dialog.mjs +100 -32
- package/fesm2022/ojiepermana-angular-component-alert.mjs +5 -9
- package/fesm2022/ojiepermana-angular-component-aspect-ratio.mjs +2 -3
- package/fesm2022/ojiepermana-angular-component-avatar.mjs +7 -13
- package/fesm2022/ojiepermana-angular-component-badge.mjs +2 -3
- package/fesm2022/ojiepermana-angular-component-breadcrumb.mjs +16 -19
- package/fesm2022/ojiepermana-angular-component-button-group.mjs +4 -7
- package/fesm2022/ojiepermana-angular-component-button.mjs +2 -3
- package/fesm2022/ojiepermana-angular-component-calendar.mjs +7 -5
- package/fesm2022/ojiepermana-angular-component-card.mjs +8 -15
- package/fesm2022/ojiepermana-angular-component-carousel.mjs +15 -18
- package/fesm2022/ojiepermana-angular-component-checkbox.mjs +40 -11
- package/fesm2022/ojiepermana-angular-component-collapsible.mjs +8 -6
- package/fesm2022/ojiepermana-angular-component-combobox.mjs +36 -16
- package/fesm2022/ojiepermana-angular-component-command.mjs +25 -21
- package/fesm2022/ojiepermana-angular-component-composer.mjs +15 -18
- package/fesm2022/ojiepermana-angular-component-date-picker.mjs +36 -11
- package/fesm2022/ojiepermana-angular-component-dialog.mjs +85 -30
- package/fesm2022/ojiepermana-angular-component-dropdown-menu.mjs +31 -26
- package/fesm2022/ojiepermana-angular-component-editor.mjs +37 -28
- package/fesm2022/ojiepermana-angular-component-empty.mjs +7 -13
- package/fesm2022/ojiepermana-angular-component-form.mjs +32 -24
- package/fesm2022/ojiepermana-angular-component-hover-card.mjs +2 -3
- package/fesm2022/ojiepermana-angular-component-icon.mjs +51 -6
- package/fesm2022/ojiepermana-angular-component-input-group.mjs +17 -15
- package/fesm2022/ojiepermana-angular-component-input-otp.mjs +15 -14
- package/fesm2022/ojiepermana-angular-component-input.mjs +2 -3
- package/fesm2022/ojiepermana-angular-component-item.mjs +11 -21
- package/fesm2022/ojiepermana-angular-component-kanban.mjs +27 -26
- package/fesm2022/ojiepermana-angular-component-kbd.mjs +3 -5
- package/fesm2022/ojiepermana-angular-component-label.mjs +2 -3
- package/fesm2022/ojiepermana-angular-component-menubar.mjs +6 -6
- package/fesm2022/ojiepermana-angular-component-native-select.mjs +3 -3
- package/fesm2022/ojiepermana-angular-component-navigation-menu.mjs +25 -12
- package/fesm2022/ojiepermana-angular-component-pagination.mjs +22 -13
- package/fesm2022/ojiepermana-angular-component-pillbox.mjs +70 -36
- package/fesm2022/ojiepermana-angular-component-progress.mjs +7 -5
- package/fesm2022/ojiepermana-angular-component-radio.mjs +21 -10
- package/fesm2022/ojiepermana-angular-component-resizable.mjs +22 -11
- package/fesm2022/ojiepermana-angular-component-scroll-area.mjs +8 -6
- package/fesm2022/ojiepermana-angular-component-select.mjs +29 -17
- package/fesm2022/ojiepermana-angular-component-separator.mjs +2 -3
- package/fesm2022/ojiepermana-angular-component-sheet.mjs +89 -30
- package/fesm2022/ojiepermana-angular-component-skeleton.mjs +2 -3
- package/fesm2022/ojiepermana-angular-component-slider.mjs +25 -13
- package/fesm2022/ojiepermana-angular-component-spinner.mjs +6 -5
- package/fesm2022/ojiepermana-angular-component-switch.mjs +17 -8
- package/fesm2022/ojiepermana-angular-component-table.mjs +9 -17
- package/fesm2022/ojiepermana-angular-component-tabs.mjs +5 -9
- package/fesm2022/ojiepermana-angular-component-textarea.mjs +2 -3
- package/fesm2022/ojiepermana-angular-component-timeline.mjs +22 -17
- package/fesm2022/ojiepermana-angular-component-toggle-group.mjs +12 -6
- package/fesm2022/ojiepermana-angular-component-toggle.mjs +2 -3
- package/fesm2022/ojiepermana-angular-component-tooltip.mjs +7 -6
- package/package.json +10 -1
- package/types/ojiepermana-angular-component-alert-dialog.d.ts +42 -3
- package/types/ojiepermana-angular-component-combobox.d.ts +4 -1
- package/types/ojiepermana-angular-component-command.d.ts +7 -2
- package/types/ojiepermana-angular-component-dialog.d.ts +33 -3
- package/types/ojiepermana-angular-component-form.d.ts +9 -0
- package/types/ojiepermana-angular-component-icon.d.ts +48 -1
- package/types/ojiepermana-angular-component-radio.d.ts +4 -1
- package/types/ojiepermana-angular-component-sheet.d.ts +33 -3
- package/types/ojiepermana-angular-component-timeline.d.ts +2 -1
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Directive, model, input, signal, computed, forwardRef,
|
|
3
|
-
import {
|
|
2
|
+
import { Directive, model, input, signal, computed, forwardRef, Component, inject, ElementRef, output, DestroyRef } from '@angular/core';
|
|
3
|
+
import { uniqueId, cn } from '@ojiepermana/angular-component/utils';
|
|
4
4
|
|
|
5
5
|
/** Base class exposed to children for context lookup. */
|
|
6
6
|
class CommandContextBase {
|
|
7
|
+
/** Shared id linking the combobox input (aria-controls) to the listbox. */
|
|
8
|
+
listboxId = uniqueId('CommandList');
|
|
7
9
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: CommandContextBase, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
8
10
|
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.4", type: CommandContextBase, isStandalone: true, ngImport: i0 });
|
|
9
11
|
}
|
|
@@ -63,13 +65,12 @@ class CommandComponent extends CommandContextBase {
|
|
|
63
65
|
this.items().forEach((item) => item._setActive(item === activeItem));
|
|
64
66
|
}
|
|
65
67
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: CommandComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
66
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.4", type: CommandComponent, isStandalone: true, selector: "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
|
|
68
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.4", type: CommandComponent, isStandalone: true, selector: "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 });
|
|
67
69
|
}
|
|
68
70
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: CommandComponent, decorators: [{
|
|
69
71
|
type: Component,
|
|
70
72
|
args: [{
|
|
71
73
|
selector: 'Command',
|
|
72
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
73
74
|
providers: [{ provide: CommandContextBase, useExisting: forwardRef(() => CommandComponent) }],
|
|
74
75
|
host: { '[class]': 'classes()' },
|
|
75
76
|
template: `<ng-content />`,
|
|
@@ -99,19 +100,19 @@ class CommandInputComponent {
|
|
|
99
100
|
}
|
|
100
101
|
}
|
|
101
102
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: CommandInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
102
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.4", type: CommandInputComponent, isStandalone: true, selector: "input[CommandInput]", inputs: { placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "type": "text", "role": "combobox", "aria-autocomplete": "list", "aria-expanded": "true", "autocomplete": "off" }, listeners: { "input": "onInput($any($event))", "keydown.arrowDown": "onArrow($any($event), 1)", "keydown.arrowUp": "onArrow($any($event), -1)", "keydown.enter": "onEnter($any($event))" }, properties: { "class": "classes()", "attr.aria-activedescendant": "ctx.activeDescendantId()", "value": "ctx.query()", "placeholder": "placeholder()" } }, ngImport: i0, template: ``, isInline: true
|
|
103
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.4", type: CommandInputComponent, isStandalone: true, selector: "input[CommandInput]", inputs: { placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "type": "text", "role": "combobox", "aria-autocomplete": "list", "aria-expanded": "true", "autocomplete": "off" }, listeners: { "input": "onInput($any($event))", "keydown.arrowDown": "onArrow($any($event), 1)", "keydown.arrowUp": "onArrow($any($event), -1)", "keydown.enter": "onEnter($any($event))" }, properties: { "class": "classes()", "attr.aria-controls": "ctx.listboxId", "attr.aria-activedescendant": "ctx.activeDescendantId()", "value": "ctx.query()", "placeholder": "placeholder()" } }, ngImport: i0, template: ``, isInline: true });
|
|
103
104
|
}
|
|
104
105
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: CommandInputComponent, decorators: [{
|
|
105
106
|
type: Component,
|
|
106
107
|
args: [{
|
|
107
108
|
selector: 'input[CommandInput]',
|
|
108
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
109
109
|
host: {
|
|
110
110
|
'[class]': 'classes()',
|
|
111
111
|
type: 'text',
|
|
112
112
|
role: 'combobox',
|
|
113
113
|
'aria-autocomplete': 'list',
|
|
114
114
|
'aria-expanded': 'true',
|
|
115
|
+
'[attr.aria-controls]': 'ctx.listboxId',
|
|
115
116
|
'[attr.aria-activedescendant]': 'ctx.activeDescendantId()',
|
|
116
117
|
autocomplete: 'off',
|
|
117
118
|
'[value]': 'ctx.query()',
|
|
@@ -125,22 +126,29 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.4", ngImpor
|
|
|
125
126
|
}]
|
|
126
127
|
}], propDecorators: { placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
127
128
|
class CommandListComponent {
|
|
129
|
+
ctx = inject(CommandContextBase);
|
|
128
130
|
class = input('', /* @ts-ignore */
|
|
129
131
|
...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
132
|
+
/** Accessible name for the listbox (required on role="listbox"). */
|
|
133
|
+
ariaLabel = input('Suggestions', { ...(ngDevMode ? { debugName: "ariaLabel" } : /* istanbul ignore next */ {}), alias: 'aria-label' });
|
|
130
134
|
classes = computed(() => cn('max-h-[300px] overflow-y-auto overflow-x-hidden p-1', this.class()), /* @ts-ignore */
|
|
131
135
|
...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
132
136
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: CommandListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
133
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.4", type: CommandListComponent, isStandalone: true, selector: "CommandList", 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
|
|
137
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.4", type: CommandListComponent, isStandalone: true, selector: "CommandList", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "aria-label", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "listbox" }, properties: { "class": "classes()", "attr.id": "ctx.listboxId", "attr.aria-label": "ariaLabel()" } }, ngImport: i0, template: `<ng-content />`, isInline: true });
|
|
134
138
|
}
|
|
135
139
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: CommandListComponent, decorators: [{
|
|
136
140
|
type: Component,
|
|
137
141
|
args: [{
|
|
138
142
|
selector: 'CommandList',
|
|
139
|
-
|
|
140
|
-
|
|
143
|
+
host: {
|
|
144
|
+
'[class]': 'classes()',
|
|
145
|
+
role: 'listbox',
|
|
146
|
+
'[attr.id]': 'ctx.listboxId',
|
|
147
|
+
'[attr.aria-label]': 'ariaLabel()',
|
|
148
|
+
},
|
|
141
149
|
template: `<ng-content />`,
|
|
142
150
|
}]
|
|
143
|
-
}], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
151
|
+
}], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-label", required: false }] }] } });
|
|
144
152
|
class CommandEmptyComponent {
|
|
145
153
|
ctx = inject(CommandComponent);
|
|
146
154
|
class = input('', /* @ts-ignore */
|
|
@@ -148,13 +156,12 @@ class CommandEmptyComponent {
|
|
|
148
156
|
classes = computed(() => cn('py-6 text-center text-sm text-muted-foreground', this.class()), /* @ts-ignore */
|
|
149
157
|
...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
150
158
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: CommandEmptyComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
151
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.4", type: CommandEmptyComponent, isStandalone: true, selector: "CommandEmpty", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()", "hidden": "ctx.hasVisibleItems()" } }, ngImport: i0, template: `<ng-content>No results found.</ng-content>`, isInline: true
|
|
159
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.4", type: CommandEmptyComponent, isStandalone: true, selector: "CommandEmpty", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()", "hidden": "ctx.hasVisibleItems()" } }, ngImport: i0, template: `<ng-content>No results found.</ng-content>`, isInline: true });
|
|
152
160
|
}
|
|
153
161
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: CommandEmptyComponent, decorators: [{
|
|
154
162
|
type: Component,
|
|
155
163
|
args: [{
|
|
156
164
|
selector: 'CommandEmpty',
|
|
157
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
158
165
|
host: {
|
|
159
166
|
'[class]': 'classes()',
|
|
160
167
|
'[hidden]': 'ctx.hasVisibleItems()',
|
|
@@ -175,13 +182,12 @@ class CommandGroupComponent {
|
|
|
175
182
|
<div class="px-2 py-1.5 text-xs font-medium text-muted-foreground">{{ heading() }}</div>
|
|
176
183
|
}
|
|
177
184
|
<ng-content />
|
|
178
|
-
`, isInline: true
|
|
185
|
+
`, isInline: true });
|
|
179
186
|
}
|
|
180
187
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: CommandGroupComponent, decorators: [{
|
|
181
188
|
type: Component,
|
|
182
189
|
args: [{
|
|
183
190
|
selector: 'CommandGroup',
|
|
184
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
185
191
|
host: { '[class]': 'classes()', role: 'group' },
|
|
186
192
|
template: `
|
|
187
193
|
@if (heading()) {
|
|
@@ -197,14 +203,14 @@ class CommandSeparatorComponent {
|
|
|
197
203
|
classes = computed(() => cn('-mx-1 h-px bg-border block', this.class()), /* @ts-ignore */
|
|
198
204
|
...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
199
205
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: CommandSeparatorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
200
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.4", type: CommandSeparatorComponent, isStandalone: true, selector: "CommandSeparator", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "
|
|
206
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.4", type: CommandSeparatorComponent, isStandalone: true, selector: "CommandSeparator", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "aria-hidden": "true" }, properties: { "class": "classes()" } }, ngImport: i0, template: '', isInline: true });
|
|
201
207
|
}
|
|
202
208
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: CommandSeparatorComponent, decorators: [{
|
|
203
209
|
type: Component,
|
|
204
210
|
args: [{
|
|
205
211
|
selector: 'CommandSeparator',
|
|
206
|
-
|
|
207
|
-
host: { '[class]': 'classes()',
|
|
212
|
+
// Decorative divider — a separator is not an allowed child of role="listbox".
|
|
213
|
+
host: { '[class]': 'classes()', 'aria-hidden': 'true' },
|
|
208
214
|
template: '',
|
|
209
215
|
}]
|
|
210
216
|
}], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
@@ -249,13 +255,12 @@ class CommandItemComponent {
|
|
|
249
255
|
this.ctx.activateOnly(this);
|
|
250
256
|
}
|
|
251
257
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: CommandItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
252
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.4", type: CommandItemComponent, isStandalone: true, selector: "CommandItem, button[CommandItem]", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { selected: "selected" }, host: { listeners: { "click": "_select($any($event))", "mousemove": "onHover()" }, properties: { "class": "classes()", "attr.id": "itemId", "attr.role": "\"option\"", "attr.tabindex": "-1", "attr.aria-selected": "active()", "attr.data-active": "active() ? \"true\" : null", "attr.data-disabled": "disabled() ? \"true\" : null", "hidden": "!visible()" } }, ngImport: i0, template: `<ng-content />`, isInline: true
|
|
258
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.4", type: CommandItemComponent, isStandalone: true, selector: "CommandItem, button[CommandItem]", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { selected: "selected" }, host: { listeners: { "click": "_select($any($event))", "mousemove": "onHover()" }, properties: { "class": "classes()", "attr.id": "itemId", "attr.role": "\"option\"", "attr.tabindex": "-1", "attr.aria-selected": "active()", "attr.data-active": "active() ? \"true\" : null", "attr.data-disabled": "disabled() ? \"true\" : null", "hidden": "!visible()" } }, ngImport: i0, template: `<ng-content />`, isInline: true });
|
|
253
259
|
}
|
|
254
260
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: CommandItemComponent, decorators: [{
|
|
255
261
|
type: Component,
|
|
256
262
|
args: [{
|
|
257
263
|
selector: 'CommandItem, button[CommandItem]',
|
|
258
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
259
264
|
host: {
|
|
260
265
|
'[class]': 'classes()',
|
|
261
266
|
'[attr.id]': 'itemId',
|
|
@@ -277,13 +282,12 @@ class CommandShortcutComponent {
|
|
|
277
282
|
classes = computed(() => cn('ml-auto text-xs tracking-widest text-muted-foreground', this.class()), /* @ts-ignore */
|
|
278
283
|
...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
279
284
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: CommandShortcutComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
280
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.4", type: CommandShortcutComponent, isStandalone: true, selector: "span[CommandShortcut]", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()" } }, ngImport: i0, template: `<ng-content />`, isInline: true
|
|
285
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.4", type: CommandShortcutComponent, isStandalone: true, selector: "span[CommandShortcut]", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()" } }, ngImport: i0, template: `<ng-content />`, isInline: true });
|
|
281
286
|
}
|
|
282
287
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: CommandShortcutComponent, decorators: [{
|
|
283
288
|
type: Component,
|
|
284
289
|
args: [{
|
|
285
290
|
selector: 'span[CommandShortcut]',
|
|
286
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
287
291
|
host: { '[class]': 'classes()' },
|
|
288
292
|
template: `<ng-content />`,
|
|
289
293
|
}]
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { numberAttribute, input, booleanAttribute, output, computed,
|
|
2
|
+
import { numberAttribute, input, booleanAttribute, output, computed, Component, inject, ElementRef, signal, forwardRef } from '@angular/core';
|
|
3
3
|
import { NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
4
4
|
import { cn } from '@ojiepermana/angular-component/utils';
|
|
5
5
|
|
|
@@ -56,7 +56,9 @@ class ComposerComponent {
|
|
|
56
56
|
if (this.disabled() || event.key !== 'Enter' || event.defaultPrevented) {
|
|
57
57
|
return;
|
|
58
58
|
}
|
|
59
|
-
const shouldSubmit = this.submit() === 'enter'
|
|
59
|
+
const shouldSubmit = this.submit() === 'enter'
|
|
60
|
+
? !event.shiftKey && !event.isComposing
|
|
61
|
+
: event.metaKey || event.ctrlKey;
|
|
60
62
|
if (!shouldSubmit) {
|
|
61
63
|
return;
|
|
62
64
|
}
|
|
@@ -81,7 +83,8 @@ class ComposerComponent {
|
|
|
81
83
|
data-slot="composer-shell"
|
|
82
84
|
[class]="shellClasses()"
|
|
83
85
|
[attr.data-disabled]="disabled() ? 'true' : null"
|
|
84
|
-
[attr.aria-invalid]="invalid() ? 'true' : null"
|
|
86
|
+
[attr.aria-invalid]="invalid() ? 'true' : null"
|
|
87
|
+
>
|
|
85
88
|
<ng-content select="ComposerHeader" />
|
|
86
89
|
<div data-slot="composer-body" [class]="bodyClasses()">
|
|
87
90
|
<ng-content select="ComposerActionsLeading" />
|
|
@@ -90,13 +93,12 @@ class ComposerComponent {
|
|
|
90
93
|
</div>
|
|
91
94
|
<ng-content select="ComposerFooter" />
|
|
92
95
|
</div>
|
|
93
|
-
`, isInline: true
|
|
96
|
+
`, isInline: true });
|
|
94
97
|
}
|
|
95
98
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: ComposerComponent, decorators: [{
|
|
96
99
|
type: Component,
|
|
97
100
|
args: [{
|
|
98
101
|
selector: 'Composer',
|
|
99
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
100
102
|
host: {
|
|
101
103
|
'[class]': 'classes()',
|
|
102
104
|
'[attr.data-slot]': '"composer"',
|
|
@@ -112,7 +114,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.4", ngImpor
|
|
|
112
114
|
data-slot="composer-shell"
|
|
113
115
|
[class]="shellClasses()"
|
|
114
116
|
[attr.data-disabled]="disabled() ? 'true' : null"
|
|
115
|
-
[attr.aria-invalid]="invalid() ? 'true' : null"
|
|
117
|
+
[attr.aria-invalid]="invalid() ? 'true' : null"
|
|
118
|
+
>
|
|
116
119
|
<ng-content select="ComposerHeader" />
|
|
117
120
|
<div data-slot="composer-body" [class]="bodyClasses()">
|
|
118
121
|
<ng-content select="ComposerActionsLeading" />
|
|
@@ -130,13 +133,12 @@ class ComposerHeaderComponent {
|
|
|
130
133
|
classes = computed(() => cn('flex min-w-0 flex-wrap gap-2 border-b border-[hsl(var(--border)/var(--opacity-70))] px-2.5 py-2', this.class()), /* @ts-ignore */
|
|
131
134
|
...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
132
135
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: ComposerHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
133
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.4", type: ComposerHeaderComponent, isStandalone: true, selector: "ComposerHeader", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()", "attr.data-slot": "\"composer-header\"" } }, ngImport: i0, template: `<ng-content />`, isInline: true
|
|
136
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.4", type: ComposerHeaderComponent, isStandalone: true, selector: "ComposerHeader", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()", "attr.data-slot": "\"composer-header\"" } }, ngImport: i0, template: `<ng-content />`, isInline: true });
|
|
134
137
|
}
|
|
135
138
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: ComposerHeaderComponent, decorators: [{
|
|
136
139
|
type: Component,
|
|
137
140
|
args: [{
|
|
138
141
|
selector: 'ComposerHeader',
|
|
139
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
140
142
|
host: {
|
|
141
143
|
'[class]': 'classes()',
|
|
142
144
|
'[attr.data-slot]': '"composer-header"',
|
|
@@ -150,13 +152,12 @@ class ComposerFooterComponent {
|
|
|
150
152
|
classes = computed(() => cn('border-t border-[hsl(var(--border)/var(--opacity-70))] px-2.5 py-1.5 text-xs leading-5 text-muted-foreground', this.class()), /* @ts-ignore */
|
|
151
153
|
...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
152
154
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: ComposerFooterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
153
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.4", type: ComposerFooterComponent, isStandalone: true, selector: "ComposerFooter", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()", "attr.data-slot": "\"composer-footer\"" } }, ngImport: i0, template: `<ng-content />`, isInline: true
|
|
155
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.4", type: ComposerFooterComponent, isStandalone: true, selector: "ComposerFooter", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()", "attr.data-slot": "\"composer-footer\"" } }, ngImport: i0, template: `<ng-content />`, isInline: true });
|
|
154
156
|
}
|
|
155
157
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: ComposerFooterComponent, decorators: [{
|
|
156
158
|
type: Component,
|
|
157
159
|
args: [{
|
|
158
160
|
selector: 'ComposerFooter',
|
|
159
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
160
161
|
host: {
|
|
161
162
|
'[class]': 'classes()',
|
|
162
163
|
'[attr.data-slot]': '"composer-footer"',
|
|
@@ -170,13 +171,12 @@ class ComposerActionsLeadingComponent {
|
|
|
170
171
|
classes = computed(() => cn('flex min-h-8 shrink-0 items-center gap-1', this.class()), /* @ts-ignore */
|
|
171
172
|
...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
172
173
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: ComposerActionsLeadingComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
173
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.4", type: ComposerActionsLeadingComponent, isStandalone: true, selector: "ComposerActionsLeading", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()", "attr.data-slot": "\"composer-actions-leading\"" } }, ngImport: i0, template: `<ng-content />`, isInline: true
|
|
174
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.4", type: ComposerActionsLeadingComponent, isStandalone: true, selector: "ComposerActionsLeading", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()", "attr.data-slot": "\"composer-actions-leading\"" } }, ngImport: i0, template: `<ng-content />`, isInline: true });
|
|
174
175
|
}
|
|
175
176
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: ComposerActionsLeadingComponent, decorators: [{
|
|
176
177
|
type: Component,
|
|
177
178
|
args: [{
|
|
178
179
|
selector: 'ComposerActionsLeading',
|
|
179
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
180
180
|
host: {
|
|
181
181
|
'[class]': 'classes()',
|
|
182
182
|
'[attr.data-slot]': '"composer-actions-leading"',
|
|
@@ -190,13 +190,12 @@ class ComposerActionsTrailingComponent {
|
|
|
190
190
|
classes = computed(() => cn('flex min-h-8 shrink-0 items-center justify-end gap-1', this.class()), /* @ts-ignore */
|
|
191
191
|
...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
192
192
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: ComposerActionsTrailingComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
193
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.4", type: ComposerActionsTrailingComponent, isStandalone: true, selector: "ComposerActionsTrailing", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()", "attr.data-slot": "\"composer-actions-trailing\"" } }, ngImport: i0, template: `<ng-content />`, isInline: true
|
|
193
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.4", type: ComposerActionsTrailingComponent, isStandalone: true, selector: "ComposerActionsTrailing", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()", "attr.data-slot": "\"composer-actions-trailing\"" } }, ngImport: i0, template: `<ng-content />`, isInline: true });
|
|
194
194
|
}
|
|
195
195
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: ComposerActionsTrailingComponent, decorators: [{
|
|
196
196
|
type: Component,
|
|
197
197
|
args: [{
|
|
198
198
|
selector: 'ComposerActionsTrailing',
|
|
199
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
200
199
|
host: {
|
|
201
200
|
'[class]': 'classes()',
|
|
202
201
|
'[attr.data-slot]': '"composer-actions-trailing"',
|
|
@@ -220,13 +219,12 @@ class ComposerInputComponent {
|
|
|
220
219
|
this.composer?.handleInputKeydown(event);
|
|
221
220
|
}
|
|
222
221
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: ComposerInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
223
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.4", type: ComposerInputComponent, isStandalone: true, selector: "ComposerInput", inputs: { disabledInput: { classPropertyName: "disabledInput", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, invalidInput: { classPropertyName: "invalidInput", publicName: "aria-invalid", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "keydown": "handleKeydown($event)" }, properties: { "class": "classes()", "attr.data-slot": "\"composer-input\"", "attr.data-disabled": "disabled() ? \"true\" : null", "attr.aria-disabled": "disabled() ? \"true\" : null", "attr.aria-invalid": "invalid() ? \"true\" : null" } }, ngImport: i0, template: `<ng-content />`, isInline: true
|
|
222
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.4", type: ComposerInputComponent, isStandalone: true, selector: "ComposerInput", inputs: { disabledInput: { classPropertyName: "disabledInput", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, invalidInput: { classPropertyName: "invalidInput", publicName: "aria-invalid", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "keydown": "handleKeydown($event)" }, properties: { "class": "classes()", "attr.data-slot": "\"composer-input\"", "attr.data-disabled": "disabled() ? \"true\" : null", "attr.aria-disabled": "disabled() ? \"true\" : null", "attr.aria-invalid": "invalid() ? \"true\" : null" } }, ngImport: i0, template: `<ng-content />`, isInline: true });
|
|
224
223
|
}
|
|
225
224
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: ComposerInputComponent, decorators: [{
|
|
226
225
|
type: Component,
|
|
227
226
|
args: [{
|
|
228
227
|
selector: 'ComposerInput',
|
|
229
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
230
228
|
host: {
|
|
231
229
|
'[class]': 'classes()',
|
|
232
230
|
'[attr.data-slot]': '"composer-input"',
|
|
@@ -316,13 +314,12 @@ class ComposerTextareaComponent {
|
|
|
316
314
|
useExisting: forwardRef(() => ComposerTextareaComponent),
|
|
317
315
|
multi: true,
|
|
318
316
|
},
|
|
319
|
-
], ngImport: i0, template: '', isInline: true
|
|
317
|
+
], ngImport: i0, template: '', isInline: true });
|
|
320
318
|
}
|
|
321
319
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: ComposerTextareaComponent, decorators: [{
|
|
322
320
|
type: Component,
|
|
323
321
|
args: [{
|
|
324
322
|
selector: 'textarea[ComposerInput]',
|
|
325
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
326
323
|
providers: [
|
|
327
324
|
{
|
|
328
325
|
provide: NG_VALUE_ACCESSOR,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { model, input, signal, computed, effect, inject, DestroyRef, untracked, forwardRef,
|
|
2
|
+
import { model, input, signal, computed, effect, inject, DestroyRef, untracked, forwardRef, Component } from '@angular/core';
|
|
3
3
|
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
4
4
|
import { provideNativeDateAdapter } from '@angular/material/core';
|
|
5
5
|
import { MatDatepicker, MatDatepickerInput } from '@angular/material/datepicker';
|
|
@@ -108,15 +108,23 @@ class DatePickerComponent {
|
|
|
108
108
|
[min]="min()"
|
|
109
109
|
[max]="max()"
|
|
110
110
|
[formControl]="control"
|
|
111
|
-
(blur)="handleTouched()"
|
|
111
|
+
(blur)="handleTouched()"
|
|
112
|
+
/>
|
|
112
113
|
<button
|
|
113
114
|
matIconSuffix
|
|
114
115
|
type="button"
|
|
115
116
|
class="date-picker-toggle"
|
|
116
117
|
aria-label="Open calendar"
|
|
117
118
|
[disabled]="control.disabled"
|
|
118
|
-
(click)="picker.open()"
|
|
119
|
-
|
|
119
|
+
(click)="picker.open()"
|
|
120
|
+
>
|
|
121
|
+
<svg
|
|
122
|
+
aria-hidden="true"
|
|
123
|
+
viewBox="0 0 24 24"
|
|
124
|
+
fill="none"
|
|
125
|
+
stroke="currentColor"
|
|
126
|
+
stroke-width="2"
|
|
127
|
+
>
|
|
120
128
|
<path d="M8 2v4" />
|
|
121
129
|
<path d="M16 2v4" />
|
|
122
130
|
<rect width="18" height="18" x="3" y="4" rx="2" />
|
|
@@ -129,13 +137,21 @@ class DatePickerComponent {
|
|
|
129
137
|
[startAt]="startAt()"
|
|
130
138
|
[startView]="startView()"
|
|
131
139
|
[touchUi]="touchUi()"
|
|
132
|
-
(closed)="handleTouched()"
|
|
140
|
+
(closed)="handleTouched()"
|
|
141
|
+
></mat-datepicker>
|
|
133
142
|
</mat-form-field>
|
|
134
|
-
`, isInline: true, styles: [":host{display:inline-block}: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));width:100%;font-family:var(--font-sans);font-size:var(--text-sm);line-height:var(--text-sm--line-height)}:host ::ng-deep .mat-mdc-text-field-wrapper{height:2.25rem;padding:0 .25rem 0 .75rem;background:transparent}:host ::ng-deep .mat-mdc-form-field-flex{height:2.25rem;align-items:center}:host ::ng-deep .mat-mdc-form-field-infix{display:flex;min-height:2.25rem;height:2.25rem;align-items:center;padding:0;width:auto}:host ::ng-deep .mat-mdc-form-field-icon-suffix{align-self:center;padding-right:.25rem!important;padding-left:.25rem!important;color:hsl(var(--muted-foreground))}.date-picker-toggle{display:inline-flex;width:1.75rem;height:1.75rem;align-items:center;justify-content:center;color:hsl(var(--muted-foreground));border-radius:calc(var(--radius) - .125rem);transition:color .15s ease,background-color .15s ease}.date-picker-toggle:hover{color:hsl(var(--foreground));background:hsl(var(--accent))}.date-picker-toggle:focus-visible{outline:2px solid hsl(var(--ring));outline-offset:2px}.date-picker-toggle:disabled{cursor:not-allowed;opacity:.5}.date-picker-toggle svg{width:1rem;height:1rem}:host ::ng-deep .mat-mdc-input-element{font-family:var(--font-sans);font-size:var(--text-sm);line-height:var(--text-sm--line-height)}:host ::ng-deep .mat-mdc-input-element::placeholder{color:hsl(var(--muted-foreground))}: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-form-field.mat-focused .date-picker-toggle{color:hsl(var(--foreground))}:host ::ng-deep .mat-mdc-form-field.mat-form-field-disabled .date-picker-toggle{opacity:.5}::ng-deep mat-datepicker-content:has(.datepicker-panel){--mat-datepicker-calendar-container-background-color: hsl(var(--popover));--mat-datepicker-calendar-container-text-color: hsl(var(--popover-foreground));--mat-datepicker-calendar-container-shape: var(--radius);--mat-datepicker-calendar-container-touch-shape: var(--radius);--mat-datepicker-calendar-container-elevation-shadow: var( --shadow-md, 0 8px 18px -14px hsl(var(--foreground) / .24) );--mat-datepicker-calendar-container-touch-elevation-shadow: var( --shadow-lg, 0 18px 36px -28px hsl(var(--foreground) / .34) );--mat-datepicker-calendar-text-font: var(--font-sans);--mat-datepicker-calendar-date-text-color: hsl(var(--popover-foreground));--mat-datepicker-calendar-date-outline-color: transparent;--mat-datepicker-calendar-date-hover-state-background-color: hsl(var(--accent));--mat-datepicker-calendar-date-focus-state-background-color: hsl(var(--accent));--mat-datepicker-calendar-date-selected-state-background-color: hsl(var(--primary));--mat-datepicker-calendar-date-selected-state-text-color: hsl(var(--primary-foreground));--mat-datepicker-calendar-date-selected-disabled-state-background-color: hsl(var(--muted));--mat-datepicker-calendar-date-disabled-state-text-color: hsl(var(--muted-foreground) / .5);--mat-datepicker-calendar-date-today-outline-color: hsl(var(--primary));--mat-datepicker-calendar-date-today-selected-state-outline-color: hsl(var(--primary-foreground));--mat-datepicker-calendar-date-today-disabled-state-outline-color: hsl(var(--muted-foreground) / .5);--mat-datepicker-calendar-date-in-range-state-background-color: hsl(var(--accent));--mat-datepicker-calendar-date-in-comparison-range-state-background-color: hsl(var(--accent) / .5);--mat-datepicker-calendar-date-preview-state-outline-color: hsl(var(--ring));--mat-datepicker-calendar-header-text-color: hsl(var(--muted-foreground));--mat-datepicker-calendar-header-divider-color: transparent;--mat-datepicker-calendar-body-label-text-color: hsl(var(--muted-foreground));--mat-datepicker-calendar-period-button-text-color: hsl(var(--popover-foreground));--mat-datepicker-calendar-period-button-icon-color: hsl(var(--muted-foreground));--mat-datepicker-calendar-navigation-button-icon-color: hsl(var(--muted-foreground));border:1px solid hsl(var(--border))}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox]):not([ngNoCva])[formControlName],textarea:not([ngNoCva])[formControlName],input:not([type=checkbox]):not([ngNoCva])[formControl],textarea:not([ngNoCva])[formControl],input:not([type=checkbox]):not([ngNoCva])[ngModel],textarea:not([ngNoCva])[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { 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: MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { 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"] }]
|
|
143
|
+
`, isInline: true, styles: [":host{display:inline-block}: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));width:100%;font-family:var(--font-sans);font-size:var(--text-sm);line-height:var(--text-sm--line-height)}:host ::ng-deep .mat-mdc-text-field-wrapper{height:2.25rem;padding:0 .25rem 0 .75rem;background:transparent}:host ::ng-deep .mat-mdc-form-field-flex{height:2.25rem;align-items:center}:host ::ng-deep .mat-mdc-form-field-infix{display:flex;min-height:2.25rem;height:2.25rem;align-items:center;padding:0;width:auto}:host ::ng-deep .mat-mdc-form-field-icon-suffix{align-self:center;padding-right:.25rem!important;padding-left:.25rem!important;color:hsl(var(--muted-foreground))}.date-picker-toggle{display:inline-flex;width:1.75rem;height:1.75rem;align-items:center;justify-content:center;color:hsl(var(--muted-foreground));border-radius:calc(var(--radius) - .125rem);transition:color .15s ease,background-color .15s ease}.date-picker-toggle:hover{color:hsl(var(--foreground));background:hsl(var(--accent))}.date-picker-toggle:focus-visible{outline:2px solid hsl(var(--ring));outline-offset:2px}.date-picker-toggle:disabled{cursor:not-allowed;opacity:.5}.date-picker-toggle svg{width:1rem;height:1rem}:host ::ng-deep .mat-mdc-input-element{font-family:var(--font-sans);font-size:var(--text-sm);line-height:var(--text-sm--line-height)}:host ::ng-deep .mat-mdc-input-element::placeholder{color:hsl(var(--muted-foreground))}: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-form-field.mat-focused .date-picker-toggle{color:hsl(var(--foreground))}:host ::ng-deep .mat-mdc-form-field.mat-form-field-disabled .date-picker-toggle{opacity:.5}::ng-deep mat-datepicker-content:has(.datepicker-panel){--mat-datepicker-calendar-container-background-color: hsl(var(--popover));--mat-datepicker-calendar-container-text-color: hsl(var(--popover-foreground));--mat-datepicker-calendar-container-shape: var(--radius);--mat-datepicker-calendar-container-touch-shape: var(--radius);--mat-datepicker-calendar-container-elevation-shadow: var( --shadow-md, 0 8px 18px -14px hsl(var(--foreground) / .24) );--mat-datepicker-calendar-container-touch-elevation-shadow: var( --shadow-lg, 0 18px 36px -28px hsl(var(--foreground) / .34) );--mat-datepicker-calendar-text-font: var(--font-sans);--mat-datepicker-calendar-date-text-color: hsl(var(--popover-foreground));--mat-datepicker-calendar-date-outline-color: transparent;--mat-datepicker-calendar-date-hover-state-background-color: hsl(var(--accent));--mat-datepicker-calendar-date-focus-state-background-color: hsl(var(--accent));--mat-datepicker-calendar-date-selected-state-background-color: hsl(var(--primary));--mat-datepicker-calendar-date-selected-state-text-color: hsl(var(--primary-foreground));--mat-datepicker-calendar-date-selected-disabled-state-background-color: hsl(var(--muted));--mat-datepicker-calendar-date-disabled-state-text-color: hsl(var(--muted-foreground) / .5);--mat-datepicker-calendar-date-today-outline-color: hsl(var(--primary));--mat-datepicker-calendar-date-today-selected-state-outline-color: hsl(var(--primary-foreground));--mat-datepicker-calendar-date-today-disabled-state-outline-color: hsl(var(--muted-foreground) / .5);--mat-datepicker-calendar-date-in-range-state-background-color: hsl(var(--accent));--mat-datepicker-calendar-date-in-comparison-range-state-background-color: hsl(var(--accent) / .5);--mat-datepicker-calendar-date-preview-state-outline-color: hsl(var(--ring));--mat-datepicker-calendar-header-text-color: hsl(var(--muted-foreground));--mat-datepicker-calendar-header-divider-color: transparent;--mat-datepicker-calendar-body-label-text-color: hsl(var(--muted-foreground));--mat-datepicker-calendar-period-button-text-color: hsl(var(--popover-foreground));--mat-datepicker-calendar-period-button-icon-color: hsl(var(--muted-foreground));--mat-datepicker-calendar-navigation-button-icon-color: hsl(var(--muted-foreground));border:1px solid hsl(var(--border))}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox]):not([ngNoCva])[formControlName],textarea:not([ngNoCva])[formControlName],input:not([type=checkbox]):not([ngNoCva])[formControl],textarea:not([ngNoCva])[formControl],input:not([type=checkbox]):not([ngNoCva])[ngModel],textarea:not([ngNoCva])[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { 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: MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { 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"] }] });
|
|
135
144
|
}
|
|
136
145
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: DatePickerComponent, decorators: [{
|
|
137
146
|
type: Component,
|
|
138
|
-
args: [{ selector: 'DatePicker',
|
|
147
|
+
args: [{ selector: 'DatePicker', imports: [
|
|
148
|
+
ReactiveFormsModule,
|
|
149
|
+
MatFormField,
|
|
150
|
+
MatSuffix,
|
|
151
|
+
MatInput,
|
|
152
|
+
MatDatepicker,
|
|
153
|
+
MatDatepickerInput,
|
|
154
|
+
], host: { '[class]': 'classes()' }, providers: [
|
|
139
155
|
provideNativeDateAdapter(),
|
|
140
156
|
{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => DatePickerComponent), multi: true },
|
|
141
157
|
], template: `
|
|
@@ -152,15 +168,23 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.4", ngImpor
|
|
|
152
168
|
[min]="min()"
|
|
153
169
|
[max]="max()"
|
|
154
170
|
[formControl]="control"
|
|
155
|
-
(blur)="handleTouched()"
|
|
171
|
+
(blur)="handleTouched()"
|
|
172
|
+
/>
|
|
156
173
|
<button
|
|
157
174
|
matIconSuffix
|
|
158
175
|
type="button"
|
|
159
176
|
class="date-picker-toggle"
|
|
160
177
|
aria-label="Open calendar"
|
|
161
178
|
[disabled]="control.disabled"
|
|
162
|
-
(click)="picker.open()"
|
|
163
|
-
|
|
179
|
+
(click)="picker.open()"
|
|
180
|
+
>
|
|
181
|
+
<svg
|
|
182
|
+
aria-hidden="true"
|
|
183
|
+
viewBox="0 0 24 24"
|
|
184
|
+
fill="none"
|
|
185
|
+
stroke="currentColor"
|
|
186
|
+
stroke-width="2"
|
|
187
|
+
>
|
|
164
188
|
<path d="M8 2v4" />
|
|
165
189
|
<path d="M16 2v4" />
|
|
166
190
|
<rect width="18" height="18" x="3" y="4" rx="2" />
|
|
@@ -173,7 +197,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.4", ngImpor
|
|
|
173
197
|
[startAt]="startAt()"
|
|
174
198
|
[startView]="startView()"
|
|
175
199
|
[touchUi]="touchUi()"
|
|
176
|
-
(closed)="handleTouched()"
|
|
200
|
+
(closed)="handleTouched()"
|
|
201
|
+
></mat-datepicker>
|
|
177
202
|
</mat-form-field>
|
|
178
203
|
`, styles: [":host{display:inline-block}: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));width:100%;font-family:var(--font-sans);font-size:var(--text-sm);line-height:var(--text-sm--line-height)}:host ::ng-deep .mat-mdc-text-field-wrapper{height:2.25rem;padding:0 .25rem 0 .75rem;background:transparent}:host ::ng-deep .mat-mdc-form-field-flex{height:2.25rem;align-items:center}:host ::ng-deep .mat-mdc-form-field-infix{display:flex;min-height:2.25rem;height:2.25rem;align-items:center;padding:0;width:auto}:host ::ng-deep .mat-mdc-form-field-icon-suffix{align-self:center;padding-right:.25rem!important;padding-left:.25rem!important;color:hsl(var(--muted-foreground))}.date-picker-toggle{display:inline-flex;width:1.75rem;height:1.75rem;align-items:center;justify-content:center;color:hsl(var(--muted-foreground));border-radius:calc(var(--radius) - .125rem);transition:color .15s ease,background-color .15s ease}.date-picker-toggle:hover{color:hsl(var(--foreground));background:hsl(var(--accent))}.date-picker-toggle:focus-visible{outline:2px solid hsl(var(--ring));outline-offset:2px}.date-picker-toggle:disabled{cursor:not-allowed;opacity:.5}.date-picker-toggle svg{width:1rem;height:1rem}:host ::ng-deep .mat-mdc-input-element{font-family:var(--font-sans);font-size:var(--text-sm);line-height:var(--text-sm--line-height)}:host ::ng-deep .mat-mdc-input-element::placeholder{color:hsl(var(--muted-foreground))}: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-form-field.mat-focused .date-picker-toggle{color:hsl(var(--foreground))}:host ::ng-deep .mat-mdc-form-field.mat-form-field-disabled .date-picker-toggle{opacity:.5}::ng-deep mat-datepicker-content:has(.datepicker-panel){--mat-datepicker-calendar-container-background-color: hsl(var(--popover));--mat-datepicker-calendar-container-text-color: hsl(var(--popover-foreground));--mat-datepicker-calendar-container-shape: var(--radius);--mat-datepicker-calendar-container-touch-shape: var(--radius);--mat-datepicker-calendar-container-elevation-shadow: var( --shadow-md, 0 8px 18px -14px hsl(var(--foreground) / .24) );--mat-datepicker-calendar-container-touch-elevation-shadow: var( --shadow-lg, 0 18px 36px -28px hsl(var(--foreground) / .34) );--mat-datepicker-calendar-text-font: var(--font-sans);--mat-datepicker-calendar-date-text-color: hsl(var(--popover-foreground));--mat-datepicker-calendar-date-outline-color: transparent;--mat-datepicker-calendar-date-hover-state-background-color: hsl(var(--accent));--mat-datepicker-calendar-date-focus-state-background-color: hsl(var(--accent));--mat-datepicker-calendar-date-selected-state-background-color: hsl(var(--primary));--mat-datepicker-calendar-date-selected-state-text-color: hsl(var(--primary-foreground));--mat-datepicker-calendar-date-selected-disabled-state-background-color: hsl(var(--muted));--mat-datepicker-calendar-date-disabled-state-text-color: hsl(var(--muted-foreground) / .5);--mat-datepicker-calendar-date-today-outline-color: hsl(var(--primary));--mat-datepicker-calendar-date-today-selected-state-outline-color: hsl(var(--primary-foreground));--mat-datepicker-calendar-date-today-disabled-state-outline-color: hsl(var(--muted-foreground) / .5);--mat-datepicker-calendar-date-in-range-state-background-color: hsl(var(--accent));--mat-datepicker-calendar-date-in-comparison-range-state-background-color: hsl(var(--accent) / .5);--mat-datepicker-calendar-date-preview-state-outline-color: hsl(var(--ring));--mat-datepicker-calendar-header-text-color: hsl(var(--muted-foreground));--mat-datepicker-calendar-header-divider-color: transparent;--mat-datepicker-calendar-body-label-text-color: hsl(var(--muted-foreground));--mat-datepicker-calendar-period-button-text-color: hsl(var(--popover-foreground));--mat-datepicker-calendar-period-button-icon-color: hsl(var(--muted-foreground));--mat-datepicker-calendar-navigation-button-icon-color: hsl(var(--muted-foreground));border:1px solid hsl(var(--border))}\n"] }]
|
|
179
204
|
}], ctorParameters: () => [], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], 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 }] }], startView: [{ type: i0.Input, args: [{ isSignal: true, alias: "startView", required: false }] }], touchUi: [{ type: i0.Input, args: [{ isSignal: true, alias: "touchUi", required: false }] }], dateFilter: [{ type: i0.Input, args: [{ isSignal: true, alias: "dateFilter", required: false }] }], panelClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "panelClass", 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 }] }], 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 }] }] } });
|